"); // Connect to mysql server $conn = mysql_pconnect($servername,$username,$password ) or die("Connection failed! ".mysql_error()); // Select database mysql_select_db($dbname,$conn) or die ("Database selection failed! ".mysql_error()); $now = new DateTime(); $datenow = $now->format("Y-m-d H:i:s"); $sql = "INSERT INTO writeread (logdata, field, value) VALUES ('$datenow','$field','$value')"; $result = mysql_query($sql) or die("Invalid query: ".mysql_error()); echo "

The Field and Value data have been sent

"; mysql_close($conn); ?>