woodplease Posted February 3, 2010 Share Posted February 3, 2010 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 More sharing options...
Bottyz Posted February 3, 2010 Share Posted February 3, 2010 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 More sharing options...
aeroswat Posted February 3, 2010 Share Posted February 3, 2010 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 More sharing options...
aeroswat Posted February 3, 2010 Share Posted February 3, 2010 btw is your username from Age of Empires? Lol Link to comment https://forums.phpfreaks.com/topic/190806-form-action/#findComment-1006156 Share on other sites More sharing options...
woodplease Posted February 3, 2010 Author Share Posted February 3, 2010 yes it is lol, its an joke we have going in my house Link to comment https://forums.phpfreaks.com/topic/190806-form-action/#findComment-1006178 Share on other sites More sharing options...
aeroswat Posted February 3, 2010 Share Posted February 3, 2010 yes it is lol, its an joke we have going in my house Nice. My friends and I used to say that shit all the time after a good game of AoE Did the solution work for you or did you need any additional help? If not please hit the solved button under the thread Link to comment https://forums.phpfreaks.com/topic/190806-form-action/#findComment-1006183 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.