Hi ive been trying to run the following code to update a database table but it keeps failing, im not sure where i am going wrong. If anyone has any ideas that would be great !!
<?php
session_start();
$cat = $_GET['cat'];
$var = $_GET['var'];
$style = $_GET['style'];
$price = $_GET['price'];
$pid = $_SESSION['product'];
$Conn = mssql_connect("UADSDS01","sql0503401","B1r12-36") or die("Unable to connect to server");
$Db=mssql_select_db("sql0503401",$Conn);
echo "Product ID: {$pid}";
$query = mssql_query("UPDATE product set cat='$cat', var='$var', style='$style', price='$price' WHERE pid = '$pid' ");
mssql_query($query) or die ('Error Updatating Database');
?>