Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

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


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...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.