Jump to content

form action


woodplease

Recommended Posts

i have some php echoing out a form, i'm trying to set the form action as

 

<form action="questionlist.php?id=.$row[quizref]">

 

but i keep getting the error:

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /berw/ugrad1/base/a/agd8/public_html/quizdom/adminquizlist.php on line 53

 

any ideas?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/190806-form-action/
Share on other sites

how is it echoing?

 

like you had it? :

 

echo "<form action="questionlist.php?id=.$row[quizref]">";

 

if so it will be wrong. to correct it you should do something like this:

 

echo "<form action='questionlist.php?id=" . $row[quizref] . "'>";

 

 

If not the above, then it may be a missing ; from the previous line?

Link to comment
https://forums.phpfreaks.com/topic/190806-form-action/#findComment-1006152
Share on other sites

As far as i know that's not a valid form action. If you are trying to do a GET method then you just need to id your form controls and set the action to simply the php file and the method to get. It will do the rest for you.

 

i.e. this

echo <form action='questionlist.php' method='get'>;

Link to comment
https://forums.phpfreaks.com/topic/190806-form-action/#findComment-1006154
Share on other sites

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.