zeem Posted March 4, 2007 Share Posted March 4, 2007 ive been trying to make a for that you can enter ur billing information, and if its different from the shipping , it will show it. like any type of orderform. this is a snipit of my code: <p><?php echo $city?> <P><h3>Billing Address<font size=1>(if different from above)</font>*</h3></p> <?php $_POST["sadr"]; if (sadr == ""){ $sadr = $adr; $scity = $city; $sstate = $state; $szip = $zip; $scountry = $country; $sdphone = $dphone; $sephone = $ephone; echo "Address:". $sadr; echo "City:". $scity; echo "State:".$sstate; echo "Zip Code:".$szip; echo "Day Phone(with area code 4011234567):".$sdphone; echo "Evening Phone:".$ephone; } else{ $_POST["sadr"]; $_POST["scity"]; $_POST["sstate"]; $_POST["szip"]; $_POST["sdphone"]; $_POST["sephone"]; } $_POST["note"]; ?> <p> Address: <?php echo $sadr;?> <p> City: <?php echo $scity;?> <p> State: <?php echo $sstate;?> <p> Zip : <?php echo $szip;?> <p> Day Phone <?php echo $dphone;?> <p> Evening Phone <?php echo $ephone;?> <p> Note: <?php echo $note?> i am asuming that my method of getting variables is off. I used $_post to get them, was that wrong? Link to comment https://forums.phpfreaks.com/topic/41137-newb-attempting-to-make-form/ Share on other sites More sharing options...
play_ Posted March 4, 2007 Share Posted March 4, 2007 What error(s) are you getting? Link to comment https://forums.phpfreaks.com/topic/41137-newb-attempting-to-make-form/#findComment-199228 Share on other sites More sharing options...
interpim Posted March 4, 2007 Share Posted March 4, 2007 looks like you need to load the old info from your database, or assign variables from $_POST to the variables... noticed $sadr=$adr if $sadr was empty... what is the data in $adr? Link to comment https://forums.phpfreaks.com/topic/41137-newb-attempting-to-make-form/#findComment-199231 Share on other sites More sharing options...
zeem Posted March 4, 2007 Author Share Posted March 4, 2007 $adr is the adress of the person, and $sadr is the shipping address. If $sadr is blank, it woudl be set to $adr Link to comment https://forums.phpfreaks.com/topic/41137-newb-attempting-to-make-form/#findComment-199296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.