jefflong
02-10-2011, 08:28 AM
Hello community
I am having some troubles with the following statement:
<?php
if (isset($_POST["checkout"])) {
//button 1 action
echo "<form action='https://www.paypal.com/cgi-bin/webscr' name='order' method='POST' onsubmit='return ReadForm(this, true)'>";
}
elseif (isset($_POST["update"])) {
//button 2 action
print " <br>NAME: <b>".$_POST['name']."</b><br> EMAIL: <b>".$_POST['email']."</b><br>Address: <b>".$_POST['address']."</b><br>City: <b>".$_POST['city']."</b><br>Postal Code/Zip Code: <b>".$_POST['postal']."</b><br> ";
print "ORDER:<br/>";
foreach ($order as $f) {
echo $f."<br />";
}
}
else {
}
?>
Bassically the first button should send the info to paypal, and the second button updates a list so the person can see what they have in their cart without going to paypal. The second button works fine, but checkout simply does nothing. I've been staring at this for hours and am out of ideas. If anyone knows of a solution that would be great.
Let me know if I need to add anything else.
Thanks in advance
I am having some troubles with the following statement:
<?php
if (isset($_POST["checkout"])) {
//button 1 action
echo "<form action='https://www.paypal.com/cgi-bin/webscr' name='order' method='POST' onsubmit='return ReadForm(this, true)'>";
}
elseif (isset($_POST["update"])) {
//button 2 action
print " <br>NAME: <b>".$_POST['name']."</b><br> EMAIL: <b>".$_POST['email']."</b><br>Address: <b>".$_POST['address']."</b><br>City: <b>".$_POST['city']."</b><br>Postal Code/Zip Code: <b>".$_POST['postal']."</b><br> ";
print "ORDER:<br/>";
foreach ($order as $f) {
echo $f."<br />";
}
}
else {
}
?>
Bassically the first button should send the info to paypal, and the second button updates a list so the person can see what they have in their cart without going to paypal. The second button works fine, but checkout simply does nothing. I've been staring at this for hours and am out of ideas. If anyone knows of a solution that would be great.
Let me know if I need to add anything else.
Thanks in advance