Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
Purchase Script Mishaps
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JayC" data-source="post: 374690" data-attributes="member: 36373"><p>[CODE]if(isset($_GET['buy'])){</p><p> $buyAmount = filter($_GET['buy']);</p><p> </p><p> $infoSell = mysql_query("SELECT * FROM info_sell WHERE id = '".$buyAmount."' AND added = '".$row['username']."'";</p><p> </p><p> if(mysql_num_rows($infoSell) > 0){</p><p> $buyQuery = mysql_fetch_assoc($infoSell);</p><p> </p><p> $buyCredit = $row['credit'];</p><p> $buyPrice = $buyQuery['price'];</p><p> </p><p> if($buyCredit < $buyPrice){</p><p> echo "<font color="red">Cannot buy with $row['price'] </font>";</p><p> }else{</p><p> echo "Thank you for your purchase";</p><p> }</p><p> </p><p> }else{</p><p> echo "You are not found in our database";</p><p> }</p><p></p><p></p><p>}[/CODE]</p><p></p><p>Now, Where the fuck is $row coming from because if your posting to a new page to use the GET and you do not declare $row in that page then it's not going to magically work. So please, where is $row coming from</p></blockquote><p></p>
[QUOTE="JayC, post: 374690, member: 36373"] [CODE]if(isset($_GET['buy'])){ $buyAmount = filter($_GET['buy']); $infoSell = mysql_query("SELECT * FROM info_sell WHERE id = '".$buyAmount."' AND added = '".$row['username']."'"; if(mysql_num_rows($infoSell) > 0){ $buyQuery = mysql_fetch_assoc($infoSell); $buyCredit = $row['credit']; $buyPrice = $buyQuery['price']; if($buyCredit < $buyPrice){ echo "<font color="red">Cannot buy with $row['price'] </font>"; }else{ echo "Thank you for your purchase"; } }else{ echo "You are not found in our database"; } }[/CODE] Now, Where the fuck is $row coming from because if your posting to a new page to use the GET and you do not declare $row in that page then it's not going to magically work. So please, where is $row coming from [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
Purchase Script Mishaps
Top