JQuery to PHP - thats all

Hi there,

I have been trying for hours to just pass a variable from my HTML to a JQuery post which connects to my PHP file, reading the variable sent in the POST, and updating my database.

Basically - my PHP is not getting the variable im sending to it - though it is definitely going as my HTML says so.

my HTML click function says:

$.post("setDB.php",{id:$('#myTxt').val()});

my PHP - connects to its DB with its new MySQLi set to $mysqli - says:

$id = $_POST['id'];
$query = "INSERT videos SET src = $id";
$result = $mysqli->query($query) or die($mysqli_error($mysqli));

Any hints for how to get my PHP to read $id… /… /./.??