hello… i have a question to a problem i’ve been trying to figure out for a month.
i’m working on a “bidding” script that i can’t get to work pulling out my hair.
i set mc_gross to 03.00 from the paypal ipn. now once mc_gross reaches ‘00.00’ it’s meant to
say “bid failed”, but instead it keeps saying “bid placed” when there is no money left in mc_gross.
please tell me what i’m doing wrong.
thank you in advance!
<?php mysql_connect("localhost", "user", "pass") or die(mysql_error()); mysql_Select_db("mydatabase") or die(mysql_error()); mysql_query("CREATE TABLE bids( id INT NOT NULL auto_increment, PRIMARY KEY(id), highbidder VARCHAR(100), payer_email varchar(100), seller VARCHAR(100), seller_email VARCHAR(100), weight varchar(100), composition varchar(100), color VARCHAR(100), mc_gross VARCHAR(5) )") or die(mysql_error()); echo "table created!"; ?> <?php session_start(); mysql_connect("localhost", "user", "pass") or die(mysql_error()); mysql_select_db("mydatabase") or die(mysql_error()); if($_SESSION[mc_gross] == 00.00){ print "Bid failed!"; }else{ mysql_query("UPDATE members SET mc_gross = mc_gross - 1 WHERE mc_gross > 0 AND id = '$_GET[id]'") or die(mysql_error()); mysql_query("COMMIT"); print "Bid Placed!"; } ?>