Page 1 of 1

need help finding the parse error

Posted: Wed Jun 11, 2003 9:31 am
by m3rajk
this is a long file. it's got 5 pages that it displays based on which "step" you are on. i'm trying to get it to display right and check certain things before you move on prior to adding the databse connection and another level of complexity (checking the username hasn't been chosen before).
i bult this up by getting the set of pages in a layout iliked, then adding the javascript to it, and doing the e-mail in a seperate test. i know the parts work when alone, but it's not working together.

i get this parse error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/html/findyourdesire/signup.php on line 288
which i know means on or before 288
here's line 288:

Code: Select all

and your assigned "validation code": $_SESSIONї'uid']
this is the block 288 is in:

Code: Select all

function su3(){
#send out the e-mail so they can validate the form
  $subject='your mysite confirmation code'; $bcc1='register@mysite'; 
  $header="bcc: $bcc1\n"; $body="sorry if you got this in err. If this was sent in err, then someone is using your e-mail address to try to sign up at our site. If you do nothing, in 24 hours their profile will be deleted. If you wish to report this to us, we shall add you to a 'do not mail' list which will prohibt use of this e-mail address in the future. Just forward this to register@mysite with subject 'i do not wish to have future e-mails'. 

if not in err, then you have selected the following: 
for a user name: $un 
for a password: $pw 

and your assigned "validation code": $_SESSION['uid']

-mysite Administration"; 
  
  mail($email, $subject, $body, $header);

  ?>
edit: removed unecessary code so others can look at this and get it faster

Posted: Wed Jun 11, 2003 9:41 am
by twigletmac
You can't have quoted array elements within a double quoted string, so instead of:

Code: Select all

$string = "mystring has an array element - $array['element'] in it";
you should have:

Code: Select all

$string = "mystring has an array element - $array[element] in it";
or

Code: Select all

$string = "mystring has an array element - {$array['element']} in it";
or

Code: Select all

$string = 'mystring has an array element - '.$array['element'].' in it';
Mac

Posted: Wed Jun 11, 2003 9:42 am
by twigletmac
It's normally sufficient just to post the part of the script that is causing the parse error - the whole script takes up a lot of room, so there's lots of scrolling to be done before you can see what's posted below it.

Mac