Forum Moderators: coopster
Hello,
I new to PHP and i'm using WA Ecart and DW MX2004 to create a very simple shop. For learning purposes.
The checkout page seems to have a error on line 47 which is the submit button. My code is below:
<?php
//WA eCart Include
require_once("WA_eCart/WA_eCart1_PHP.php");
?>
<?php
$WA_eCart1->GetContent();
?>
<?php
// WA eCart Redirect
if ($WA_eCart1->redirStr!= "") {
header("Location: ".$WA_eCart1->redirStr);
}
?>
<html>
<head>
<title>The Checkout</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<p><img src="quicklogo.jpg" width="225" height="102"> <span class="style1">The Checkout
</span></p>
<form name="checkout_ians_WorldPay_Basic" method="POST" action="https://select.worldpay.com/wcc/purchase">
<input type="hidden" name="instId" value="#####">
<input type="hidden" name="cartId" value="<?php echo session_id()?>">
<table>
<tr>
<td align="right"> Amount of purchase:</td>
<td>
<input type="text" name="amount" value="<?php echo $WA_eCart1->GrandTotal()?>">
<input type="hidden" name="currency" value="GBP"></td>
</tr>
<tr>
<td align="right"> Order description:</td>
<td>
<input type="text" name="desc" value="<?php echo $WA_eCart1->TotalColumn(">;
</td>
</tr>
<tr>
<td></td>;
*47* <td><input type="submit" name="Checkout" value="Checkout"></td>;
</tr>
</table>
</form>
<p></p>
</body>
</html>
Any help is greatly appreciated. I have tried to use as little code as possible in order to understand how it works but I can't see any errors for looking.
I have tried <td> <input type=\"submit" etc but then it says error on line 53 which is the final line with nothing on.
Also I have hashed out the Id
cheers in advance
Ian
[edited by: jatar_k at 4:33 pm (utc) on July 11, 2005]
[edit reason] removed personal url [/edit]
On this line:
<input type="text" name="desc" value="<?php echo $WA_eCart1->TotalColumn(">;
It looks like your missing a '?' at the end, as well as the rest of the function call? ... try something like :
<input type="text" name="desc" value="<?php echo $WA_eCart1->TotalColumn(?>" />
I don't know if 'TotalColumn' is a variable, or a function, so the lone '(' at the end of it is mystifying to me .... maybe it should be '()'?
-sned