busboy
1
Here is my simple page:
<?php
include 'startSession.php';
include 'db.inc.php';
$uID = $_REQUEST['uID'];
print ("$uID");
?>
Why do I get an error on line 21 when my code is only 11 lines long?
Parse error: syntax error, unexpected ‘)’ in /home2/recordte/public_html/tools/wantInfo.php on line 21
The code looks fine and is most probably in one of the files that are included.
Try this:
<?php
/*
error_reporting(-1);
ini_set('display_errors', 1);
include 'startSession.php';
include 'db.inc.php';
$uID = $_REQUEST['uID'];
print ("$uID");
*/
// ?> // not required
Start at the top and gradually start revealing the code one line at a time until you hit the error again.
busboy
3
What do you mean gradually start revealing the code? The piece that you gave me seems to be completely commented out.
thanks.
Yes, so uncomment the first line. If no error, uncomment the second line, If no error uncomment the third line.
Which file is wantInfo.php ?
Have you look at its line 21?
move the /* down a line to ‘un-comment’ it line by line…
Mandes
6
As pointed out by Cranial_Bore your error lies in the script wantInfo.php
Post the contents of wantInfo.php
I suspect that one of your included files also includes the wantInfo.php file