vajra_hendry Posted August 11, 2007 Share Posted August 11, 2007 This is my code : <FORM ACTION="php_steptwo001.php" METHOD="POST"> <INPUT TYPE="HIDDEN" NAME="duration" VALUE=3> <INPUT TYPE="HIDDEN" NAME="banner" VALUE="test"> <INPUT TYPE="SUBMIT" VALUE"3 DAYS"> </FORM> Only the 1st Variable 'duration' gets passed!! Help!! Quote Link to comment https://forums.phpfreaks.com/topic/64378-posting-multiple-variables-to-_post-using-html-forms/ Share on other sites More sharing options...
Chevy Posted August 11, 2007 Share Posted August 11, 2007 $duration = $_POST['duration']; $banner = $_POST['banner']; I think that is what you mean Quote Link to comment https://forums.phpfreaks.com/topic/64378-posting-multiple-variables-to-_post-using-html-forms/#findComment-320997 Share on other sites More sharing options...
MadTechie Posted August 11, 2007 Share Posted August 11, 2007 form is fine, problem is in your php code, please post that Quote Link to comment https://forums.phpfreaks.com/topic/64378-posting-multiple-variables-to-_post-using-html-forms/#findComment-321009 Share on other sites More sharing options...
lewis987 Posted August 11, 2007 Share Posted August 11, 2007 your form should be this: <FORM ACTION="php_steptwo001.php" METHOD="POST"> <INPUT TYPE="HIDDEN" NAME="duration" VALUE="3"> <INPUT TYPE="HIDDEN" NAME="banner" VALUE="test"> <INPUT TYPE="SUBMIT" VALUE="3 DAYS" NAME="3 DAYS"> </FORM> and please post your PHP Quote Link to comment https://forums.phpfreaks.com/topic/64378-posting-multiple-variables-to-_post-using-html-forms/#findComment-321020 Share on other sites More sharing options...
MadTechie Posted August 11, 2007 Share Posted August 11, 2007 How will adding a name to the button cause a problem...? its a php issule! Quote Link to comment https://forums.phpfreaks.com/topic/64378-posting-multiple-variables-to-_post-using-html-forms/#findComment-321038 Share on other sites More sharing options...
lewis987 Posted August 11, 2007 Share Posted August 11, 2007 read the two codes... my one has "" around the 3 and the original doesnt! Quote Link to comment https://forums.phpfreaks.com/topic/64378-posting-multiple-variables-to-_post-using-html-forms/#findComment-321043 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.