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? Quote Link to comment Share on other sites More sharing options...
blueman378 Posted May 14, 2008 Share Posted May 14, 2008 is your form sending via post? Quote Link to comment Share on other sites More sharing options...
Orionsbelter Posted May 14, 2008 Author Share Posted May 14, 2008 yes. Quote Link to comment 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? Quote Link to comment 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> Quote Link to comment 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 Quote Link to comment 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"> Quote Link to comment 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']); Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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.