Page 1 of 1

Parse error: parse error, unexpected T_STRING, expecting ','

Posted: Thu Nov 06, 2003 6:07 pm
by falvarado
Could someone please help??

this is the error:
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /usr/home/americansall/docs/admin_modrecord.php3 on line 596


This is what is on that line:
<form name="form" action="admin_modrecord2.php3" onSubmit="return wordFilter('form',['ASD','School_Name','Principal_Salutation','Principal_First','Principal_Middle','Principal_Last','Principal_Email','Address','Address2','City','State','Zip','Phone','Fax','Email','Enrollment','School_Type','Lower_Grade','Upper_Grade','updated']);">

Thanks.

Posted: Thu Nov 06, 2003 6:12 pm
by d3ad1ysp0rk
can you give us 2 or 3 lines above that too?

Posted: Thu Nov 06, 2003 6:19 pm
by falvarado
";

}else{




echo "



<form name="form" action="admin_modrecord2.php3" onSubmit="return wordFilter('form',['ASD','School_Name','Principal_Salutation','Principal_First','Principal_Middle','Principal_Last','Principal_Email','Address','Address2','City','State','Zip','Phone','Fax','Email','Enrollment','School_Type','Lower_Grade','Upper_Grade','updated']);">

<table border=0 cellpadding=0 cellspacing=0 width=400>

Posted: Thu Nov 06, 2003 6:53 pm
by d3ad1ysp0rk
u need to escape the quotes

Code: Select all

";
}
else { 
echo "<form name="form" action="admin_modrecord2.php3" onSubmit="return wordFilter('form',['ASD','School_Name','Principal_Salutation','Principal_First','Principal_Middle','Principal_Last','Principal_Email','Address','Address2','City','State','Zip','Phone','Fax','Email','Enrollment','School_Type','Lower_Grade','Upper_Grade','updated']);"> 

<table border="0" cellpadding="0" cellspacing="0" width="400">

Posted: Thu Nov 06, 2003 9:22 pm
by m3mn0n
You forgot a few, but yeah. Escaping quotes or using a different quote for the echo.

eg.

Code: Select all

<?php
echo '<img src="images/picture.gif" border="0" width="50" height="50">';
?>
Though not escaped, it wouldn't return any parse errors.

Reference material: http://www.php.net/manual/en/language.types.string.php

Posted: Thu Nov 06, 2003 9:29 pm
by d3ad1ysp0rk
Where did i forget some?

the 's dont need to be escaped..