ainoy31 Posted December 6, 2007 Share Posted December 6, 2007 Hello- I need a second eye to look at this piece of code. Some of my variables are posting and some are not on the next page. Here is what I got: <form name="form1" method="post" action="form2.php"> <tr> <td>Country:</td> <td><input type="text" name="origin_country" size="20"></td> </tr> <tr> <td>Port:</td> <td><input type="text" name="origin_port" size="20"></td> </tr> <tr> <td>Destination(Door) - US</td> <td><input type="radio" name="dest_zip" onClick="zip(this)">Postal Code <input type="radio" name="dest_zip" onClick="zip(this)">Other - Specify</td> <td><input type="text" name="dest_zip" id="postal" style="display: none"></td> <td><input type="text" name="dest_zip" id="other" style="display: none"></td> </tr> </form> Then, on the form2.php page I have: echo "Origin Country:" . $e = $_POST["origin_country"] . "<br>"; echo "Origin Port:" . $f = $_POST["origin_port"] . "<br>"; echo "Destination Zip:" . $g = $_POST["dest_zip"] . "<br>"; The country and port data are displayed but not the zip data. Much appreciation. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 6, 2007 Share Posted December 6, 2007 You dont have a submit button Quote Link to comment Share on other sites More sharing options...
ainoy31 Posted December 6, 2007 Author Share Posted December 6, 2007 Yes I do, I just forgot to include... Quote Link to comment Share on other sites More sharing options...
therealwesfoster Posted December 6, 2007 Share Posted December 6, 2007 Its because you have more than 1 field with the name dest_zip So, even if you select 1, it's getting overwritten by the others. Name them something like dest_zip1, 2, 3 etc... and just check which one isn't blank and use it Quote Link to comment Share on other sites More sharing options...
ainoy31 Posted December 6, 2007 Author Share Posted December 6, 2007 Thanks Wesf90. That solved my issue. 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.