EchoFool Posted February 7, 2008 Share Posted February 7, 2008 I have a select box in my form which is this: <select name="MailBan" size="1"> <option value=""></option> <option value="0">First Time spamming mail box!</option> <option value="5">Second Time spamming mail box!</option> <option value="15">Third Time spamming mail box!</option> <option value="30">Fourth Time spamming mail box!</option> <option value="31">Fifth Time or more spamming mail box!</option> The problem is my form is not getting the option value its always coming out blank... this happens on any of the options . The first option it is meant to be blank to avoid any one accidentally having the first option set and hitting submit. Then in my php i have: <?php $Value = mysql_real_escape_string($_POST['MailBan']); Echo $Value; If($Value == ''){ ?> <br><br> <p align=center> <span class="NegativeMoney">You must choose the players offence from the box!</span><br><br> <a href="<?=$_SESSION['url1']?>">Back</a> </p> <br><br><br><br> <?php } ?> All i get it this error which is in the above script.. any help is much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/89921-form-help/ Share on other sites More sharing options...
roshanbh Posted February 7, 2008 Share Posted February 7, 2008 I think you have for got to close the select tag try using </select> to close the select tag after the options tag.. Quote Link to comment https://forums.phpfreaks.com/topic/89921-form-help/#findComment-460983 Share on other sites More sharing options...
amites Posted February 7, 2008 Share Posted February 7, 2008 that's the first thing I see as well, if that doesn't work verify that no variables are bing passed, you can do this with an excellent plugin for Firefox called LIve HTTP Headers it will tell you what data is in the post field, following that you'll know whether your problem lies in the HTML or the PHP Quote Link to comment https://forums.phpfreaks.com/topic/89921-form-help/#findComment-461044 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.