Hi guys here is a bit of code im unsure why it isnt working but its driving me insane trying to figure it out. any ideas?
<?PHP
require ($_SERVER['DOCUMENT_ROOT']. '/includes/header.php');
include ('c:/web/db_connect.php');
$setquery = "SELECT paypal_name FROM settings WHERE clubid = 1";
$setres = mysql_query($setquery); //becomes = to the sql
$setquery = mysql_fetch_assoc($setres);
$setquery = $setquery['paypal_name'];
echo "got here 2";
$stockquery = "SELECT * FROM stock ORDER BY itemid";
$stockres = mysql_query($stockquery);
echo "got here 3";
while ($row = mysql_fetch_assoc($stockres)) {
// if ($stockquery['stock'] => 1) { was if ($row['stock'] => 1)
?>
<tr>
<td width="780" colspan="4" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="<?php echo $setquery['paypal_name']; ?>">
<input type="hidden" name="item_name" value="<?php echo $stockquery['name']; ?>">
<input type="hidden" name="item_number" value="<?php echo $stockquery['itemid']; ?>">
<input type="hidden" name="amount" value="<?php echo $stockquery['guest_price']; ?>">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="return" value="">
<input type="hidden" name="cancel_return" value="">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="lc" value="GB">
</form>
</td>
</tr>
<?PHP
}
}
mysql_free_result($setres);
mysql_free_result($stockres);
require ($_SERVER['DOCUMENT_ROOT']. '/includes/footer.php');
?>