Orionsbelter Posted May 14, 2008 Share Posted May 14, 2008 $idm2=strip_tags($_POST['idm2']); <input type=hidden name=idm2 value=3> Why is $idm2 showing a 0 when its clearly 3? Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/ Share on other sites More sharing options...
blueman378 Posted May 14, 2008 Share Posted May 14, 2008 is your form sending via post? Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540702 Share on other sites More sharing options...
Orionsbelter Posted May 14, 2008 Author Share Posted May 14, 2008 yes. Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540703 Share on other sites More sharing options...
blueman378 Posted May 14, 2008 Share Posted May 14, 2008 can we see your whole form? and is the action sending to the page that that code is on? Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540704 Share on other sites More sharing options...
mraiur Posted May 14, 2008 Share Posted May 14, 2008 <form action="" method="post" name="somename"> <input type="hidden" name="idm2" value="3"> </form> Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540705 Share on other sites More sharing options...
blueman378 Posted May 14, 2008 Share Posted May 14, 2008 aw u bet me to asking that. if ur echoing use <form action=\"example.php\" method=\"post\" name=\"somename\"> <input type=\"hidden\" name=\"idm2\" value=\"3\"> </form> also i may point out please make your titles appropriate to your question as you are more likely to get answers Help meeeeeeeeeeeeeeeeee is not appropriate however Form problems or similar is pelase keep this in mind Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540706 Share on other sites More sharing options...
gnawz Posted May 14, 2008 Share Posted May 14, 2008 Please put quotes as follows: <input type="hidden" name="idm2" value="3"> Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540709 Share on other sites More sharing options...
jaymc Posted May 14, 2008 Share Posted May 14, 2008 I bet this is your problem $idm2 = strip_tags($_POST['idm2']); PHP does not allow you to use numbers in variable names, atleast I tried last week and it didn't let me Try $idm_two = strip_tags($_POST['idm2']); Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540834 Share on other sites More sharing options...
kenrbnsn Posted May 14, 2008 Share Posted May 14, 2008 PHP does not allow you to use numbers in variable names, atleast I tried last week and it didn't let me That is not correct. You can not start a variable name with a number, but you can have numbers anywhere else in the variable name. Ken Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540906 Share on other sites More sharing options...
The Little Guy Posted May 14, 2008 Share Posted May 14, 2008 <input type=hidden name=idm2 value=3> Make sure you are not restating the value of idm2 in your HTML, or between the point where you set $idm2 and where you echo it. Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540908 Share on other sites More sharing options...
kenrbnsn Posted May 14, 2008 Share Posted May 14, 2008 I don't see a submit button in your form. Also, is the form in the same file as the PHP code used to display the values or a different file? Ken Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540911 Share on other sites More sharing options...
The Little Guy Posted May 14, 2008 Share Posted May 14, 2008 another good thing to see other than just the form, would be a better chunk of code instead of that one line. Link to comment https://forums.phpfreaks.com/topic/105550-help-meeeeeeeeeeeeeeeeee/#findComment-540916 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.