Can anybody see what im doing wrong here? Im trying to update a record in mysql db and it works fine until I add the variable $soldtrader. Here is the code.
<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("mssystems1", $con);
$id = $_POST['id'];
$name = $_POST['name'];
$score = $_POST['score'];
$pricesold = $_POST['pricesold'];
$soldtrader = $_POST['traderid'];
mysql_query("UPDATE vehiclerequests SET collected='0', sold='1', soldfor= $pricesold tradersoldto= $soldtrader WHERE id = $id ");
mysql_close($con);
?>
Thanks
Chris


Sign In
Create Account


Back to top









