NogDog wrote:Within the PHP code.
Here's my code:
<?php
include 'db.php';
if(isset($_GET['id']))
$ID = $_GET['id'];
else
die('<p> Invalid Product.');
$ship_factor = 2
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>SKY EATS AIRPLANE || PURCHASE PRODUCT</title>
<style type="text/css">
<!--
body {
background-color: #5795D3;
}
-->
</style></head>
<body link="#FFFF00" vlink="#FFFFFF">
<?
$sql = mysql_query("SELECT * FROM products where ID=$id");
if(!$sql) die("SQL ERROR: ".mysql_error());
while ($row=mysql_fetch_array($sql))
{
?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="tyrone_cragg@hotmail.com">
<input type="hidden" name="item_name" value='<?php echo($row['description']) ?>'>
<input type="hidden" name="item_number" value='<?php echo($row['id']) ?>'>
<?
$Cost = $row['price'];
$SandH = ($row['weight'] * $ship_factor);
$Price = $Cost + $SandH;
?>
<input type="hidden" name="amount" value='<?php echo($Price) ?>'>
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
<?
}
?>
</body>
</html>
Any idea what's wrong there?