Hi, i am new in php
Whats wrong with my codes?
My server is using PHP Version 5.2.11
Code:<?php $con = mysql_connect("localhost","username","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_database", $con); mysql_query("UPDATE my_table SET machinetime = '$_POST[strDate]', server = '$_POST[strServer]', name = '$_POST[struser]', imei = '$_POST[strImei]', model = '$_POST[strModel]', price = '$_POST[strPrice]', refnum = '$_POST[strRef]' WHERE PID = '$_POST[processID]'"); if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Record Updated"; mysql_close($con) ?>
When i click submit in my Form
It always throw me an error "Error: Query was empty"




Reply With Quote