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. Link to comment https://forums.phpfreaks.com/topic/80490-solved-second-eye/ Share on other sites More sharing options...
revraz Posted December 6, 2007 Share Posted December 6, 2007 You dont have a submit button Link to comment https://forums.phpfreaks.com/topic/80490-solved-second-eye/#findComment-408040 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... Link to comment https://forums.phpfreaks.com/topic/80490-solved-second-eye/#findComment-408041 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 Link to comment https://forums.phpfreaks.com/topic/80490-solved-second-eye/#findComment-408047 Share on other sites More sharing options...
ainoy31 Posted December 6, 2007 Author Share Posted December 6, 2007 Thanks Wesf90. That solved my issue. Link to comment https://forums.phpfreaks.com/topic/80490-solved-second-eye/#findComment-408049 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.