I am having problems with this code:
<?php
$new_value = 'testing';
$con = mysql_connect("localhost","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
mysql_query("INSERT INTO myDB (myField) VALUES ('$new_value')");
mysql_close($con);
?>
2 issues are happening:
1st - 2 records are being inserted instead of 1
2nd - $new_value is not changed and it's creating multiple instances with the same $new_value value when I only want 1.
include/require)? It seems impossible for two records to be inserted instead of single one....