Some observations:
Use the $_POST array instead of $HTTP_POST_VARS... The $HTTP_POST_VARS is deprecated and should be avoided... That is unless you're using PHP 3 or PHP 4 prior to 4.1.
Saying that you cannot include the quoted array inside quotes isn't entirely true...
You can use curly braces around a variable inside a quoted string and PHP will expect that to be a variable or constant thereby treating the quotes as you would expect it to, as part of the array variable. (hopefully I am quoting that correcting...)...all I know is it works! I got that from Nik a few months ago and has been one of the most useful things I've learned!
$Query = "INSERT INTO $TableName VALUES ('{$_POST['mytextbox']}')";
And unless your query is always changing its easier to just stick it right into the function.. it also helps to clean up the code a bit.
mysql_query ("INSERT INTO $TableName VALUES ('{$_POST[mytextbox]}')";, $Link)
Also, if you are using the $_POST array,
There would be no need for this statement:
global $HTTP_POST_VARS;
As $_POST is an autoglobal.
As for your error, I'm not sure, your variable is not quoted, and neither is the field... Do you have only one field in your database?
This is not syntactically correct:
$Query = "INSERT INTO $TableName VALUES ($HTTP_POST_VARS[mytextbox])";
The [mytextbox] should be quoted. If it isn't quoted it would be assumed a constant first and then a string. Try the curly braces, or try Nik's suggestion, by doing the join.
Check that you database is set-up correctly. Your VALUES() attribute of the query string must match field for field. If you have three fields in your database, your query string must also show three fields. The field name shouldn't matter as you're not explicitly defining the field in the query string.
hth,
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::