Okay, im a little new to php ( learned it last night ) So what im missing here is probably just something small im not noticing..
I am trying to get variables from a form field that POSTed it to the current php page, and insert those variables into my mysql_query to create a new recordset.
When I try to declare the information manuely, it works fine..
<?php
$db = mysql_connect("localhost", "dembark", "******");
mysql_select_db("modern",$db);
$result = mysql_query("INSERT INTO storyteller VALUES ( 'stname', 'passwd' )", $db);
$result
?>
But when I try to get the variables from the form to replace stname and passd, ( using the form field information stname and password )it gives me a parse error..
<?php
$db = mysql_connect("localhost", "dembark", "*****");
mysql_select_db("modern",$db);
$result = mysql_query("INSERT INTO storyteller VALUES ( $HTTP_POST_VARS("stname"), $HTTP_POST_VARS("password") )", $db);
$result
?>
Can anyone give me some help? If i a variable like $name =$HTTP_POST_VARS("stname") then try sticking it into the mysql_query string, I still get errors, but instead it says undefined function array..
Id really like some help if possible, thanks..