Jump to content

[SOLVED] Parse error: parse error, expecting `','' or `';''


remshad

Recommended Posts

when i  try to make a script that omit desired number of text box for entering data

 

when i run the script  error showing "Parse error: parse error, expecting `','' or `';'' in L:\xampp\htdocs\forums\me\PROJECT\first.php on line"

 

i below add the php script

 

 

echo "<form action="finish.php" method="post">";
echo "STD: <input type="text" name="std" />";
echo "DIVISION:<input type="text" name="division" />";
for($i=1;$i<=$number;$i++)
{ echo "enter".$i." th subject =: <input type="text" name="".$i."std" />";
}
echo "<input type="submit" />";

 

 

could you help me for fix this problem

Either escape the " in the middle or enclose in single quotes. Try this:

 

echo '<form action="finish.php" method="post">';
echo 'STD: <input type="text" name="std" />';
echo 'DIVISION:<input type="text" name="division" />';
for($i=1;$i<=$number;$i++)
   { echo 'enter'.$i.' th subject =: <input type="text" name="'.$i.'std" />';
   }
echo '<input type="submit" />';

 

Not sure what the line in conditionals is meant to do...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.