/    Sign up×
Community /Pin to ProfileBookmark

checkout page PHP language not working

Hello,

I have a website with a checkout page with a lot of PHP code on it. It used to be a working page that would keep track of what was added to an internal shopping cart (not processing order online) and then submit the items ordered, shipping information, and credit card information to the company email for manual processing in-office. I need to know what is wrong with the source code, if anything, and how to get the pages talking to one another. The website is [url]www.ergopad.com[/url]. Here is most of the source code:

<?php
session_start();
include_once(‘display_func.php’);
include_once(‘sc_fns.php’);
include(‘html_fnc.php’);
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<head>
<title>Ergopad – Checkout</title><br />
<link href=”layout/style.php” rel=”stylesheet” type=”text/css”>
<meta name=”Description” content=”…ERGOPAD comes in six vibrant colors and is the most comfortable shoulder strap pad you will ever use.” />
<meta name=”Keywords” content=”ergopad,europad,epad,kidspad,luggagepad,sportspad,ergonomic,shoulder strap,pad,stuffits,purse” />
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />
</head>
<body>
<!– Start of header section –>
<center>
<table style=”margin-top: 15px; margin-bottom: 10px; margin-left: 10px” cellspacing=”0″ cellpadding=”0″ width=”700″ border=”0″>
<tr valign=”top”>
<td width=”159″><a href=”http://www.ergopad.com/”><img src=”images1/Ergopad_logo” width=”150″ height=”52″ border=”0″ alt=”ErgoPad Home Page” /></a></td>
<td align=”right” width=”532″>
<table cellspacing=”0″ cellpadding=”0″ border=”0″>

<tr>
<td align=”left”>
<table cellspacing=”0″ cellpadding=”0″ border=”0″>
<tr>
<td class=”GlobalLink”>
<a href=”checkout.php?PHPSESSID=ef85605be2b2c01c666405ffef32be6b”><font size=”-2″ color=”#393939″ face=”verdana”>Cart &amp; Checkout</font></a>
</td>
<td width=”10″><img height=”8″ alt=”” src=”images1/spacer.gif.gif” width=”10″ /></td>
<td class=”GlobalLink” align=”left”><a href=”contact_us.php?PHPSESSID=ef85605be2b2c01c666405ffef32be6b”><font size=”-2″ color=”#393939″ face=”verdana”>Contact Us</font></a></td>

</tr>
</table>
</td>
</tr>
<tr>
<td class=”GlobalTotal” height=”2″ align=”left”><font size=”-2″ face=”verdana”>
<?php
if(isset($_SESSION[‘admin_user’]))
echo ‘<a href=”admin.php”>Admin Menu</a>’;
else
echo ‘Total Items = ‘.number_format($_SESSION[‘items’]);
?>
</font></td>
</tr>
</table>

</td>
</tr>
</table><!– End of header section –>
<!– Start of tab section –>
<table cellspacing=”0″ cellpadding=”0″ width=”711″ border=”0″>
<tr>
<td align=”right” width=”707″ height=”21″>
<table cellspacing=”0″ cellpadding=”0″ border=”0″ bgcolor=”white”>
<tr>
<td width = “90”><a href=”wholsale.php”><img src=”images1/wholesale.gif” alt= “Wholesale” width = “90” height = “20” border = “0” /></a></td>
<td width=”80″><img height=”8″ alt=”” src=”images1/spacer.gif.gif” width=”10″ /></td>
<td width = “90”><a title=”home page” href=”index.php” target=”_parent”><img src=”images1/welcome.gif” alt= “Welcome” width = “90” height = “20” border = “0” /></a></td>
<td width = “90”><a title=”euro” href=”europad.php” target=”_self”><img src=”images1/europad.gif” alt= “EuroPad” width = “90” height = “20” border = “0” /></a></td>
<td width = “90”><a title=”epad” href=”epad.php” target=”_self”><img src=”images1/e_pad.gif” alt= “E_Pad” width = “90” height = “20” border = “0” /></a></td>
<td width = “90”><a title=”kids” href=”kidspad.php” target=”_self”><img src=”images1/kidspad.gif” alt= “KidsPad” width = “90” height = “20” border = “0” /></a></td>
<td width = “90”><a title=”sports” href=”sportspad.php” target=”_self”><img src=”images1/sportspad.gif” alt= “SportsPad” width = “90” height = “20” border = “0” /></a></td>
<td width = “90”><a title=”luggage” href=”luggage.php” target=”_self”><img src=”images1/luggagepad.gif” alt= “LuggagePad” width = “90” height = “20” border = “0” /></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=”#999999″ height=”2″><img height=”2″ alt=”” src=”images1/spacer.gif” width=”700″ /></td>
</tr>
</table>
<table width=”710″ border=”0″ cellspacing=”2″ cellpadding=”0″ bgcolor=”#003399″ height=”10″>
<tr>
<td></td>
</tr>
</table>
</td></tr>

</table>
<!– End of tab section –>
<table cellspacing=”0″ cellpadding=”0″ width=”708″ border=”0″>
<!– This table separates the header from the body. It is used for formatting only –>
<tr><td height=”10″></td></tr>
<tr><td></td></tr>
</table><!– End of formatting table –>
<table width=”710″ height=”100%” border=”0″ cellpadding=”0″ cellspacing=”0″>
<!– Main body starts here –>
<tr>
<td style = “text-align: left; padding-left: 0px; padding-top: 15px; height=100%;”>
<h1>Checkout</h1>
<p style=”font: 12px Arial, Verdana; margin-left: 30px;”>
Note:&nbsp;&nbsp;All fields in this form are required
</p>
<p style=”font: 12px/150% Arial, Verdana; margin-left: 30px;”>
<?php
if($_SESSION[‘cart’]&&array_count_values($_SESSION[‘cart’]))
{
display_cart($_SESSION[‘cart’], false, 0);
display_shipping(calculate_shipping_cost($_
SESSION[‘items’] – 1));
display_checkout_form();
}
else
echo ‘<p style=”font: 12px/150% Arial, Verdana; margin-left: 30px;”>There are no items in your cart</p>’;

?>

<?php
function display_checkout_form()
{
//display the form that asks for name and address
?>

<form action = “process.php” method = “post”>
<table border = “0” width = “100%” cellspacing = “0”>
<tr>
<th colspan = “2” bgcolor=”#cccccc” align = “center”>Shipping Address</th>
</tr>
<tr>
<td colspan=”2″>&nbsp;</td>
</tr>
<tr>
<td>Name</td>
<td><input type = “text” name = “name” value = “” maxlength = “40” size = “40” /></td>
</tr>
<tr>
<td>Address</td>
<td><input type = “text” name = “address” value = “” maxlength = “40” size = “40” /></td>
</tr>
<tr>
<td>City/Suburb</td>
<td><input type = “text” name = “city” value = “” maxlength = “20” size = “40” /></td>
</tr>
<tr>
<td>State/Province</td>
<td><input type = “text” name = “state” value = “” maxlength = “20” size = “40” /></td>
</tr>
<tr>
<td>Postal Code or Zip Code</td>
<td><input type = “text” name = “zip” value = “” maxlength = “10” size = “40” /></td>
</tr>
<tr>
<td>Country</td>
<td><input type = “text” name = “country” value = “” maxlength = “10” size = “40” /></td>
</tr>
<tr>
<td>Email address</td>
<td><input type = “text” name = “email” value = “” maxlength = “40” size = “40” /></td>
</tr>
</table>
<br />

<table border = “0” width = “100%” cellspacing = “0”>

<tr><th colspan = “2” bgcolor=”#cccccc” align=”center”>Credit Card Details</th></tr>
<tr><td colspan=”2″>&nbsp;</td></tr>
<tr>
<td>Name on Card</td>
<td><input type = “text” name = “name_on_card” value = “” maxlength = “40” size = “40” /></td>
</tr>
<tr>
<td>Number</td>
<td><input type = “text” name = “card_card_number” value = “” maxlength = “16” size = “40” /></td>
</tr>
<tr>
<td>Type</td>
<td>
<select name = “card_card_name”>
<option>VISA</option>
<option>MasterCard</option>
<option>American Express</option>
<option>Discover</option>
</select></td>
</tr>

<tr>
<td>Exp Date</td>
<td>
<select name = “exp_date”>
<option>January</option>
<option>February</option>
<option>March</option>
<option>April</option>
<option>May</option>
<option>June</option>
<option>July</option>
<option>August</option>
<option>September</option>
<option>October</option>
<option>November</option>
<option>December</option>
</select><select name = “year”>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
<option>2011</option>
<option>2012</option>
</select></td>
</tr>

<tr>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @htmlignorant spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...