On Thursday 04 March 2004 08:08, Rich Hutchins wrote:
> Oh, and, normally, you reference the variables like so: $_POST["varname"].
> I typically use the following syntax:
>
> "INSERT INTO tablename
> VALUES('".$_POST["varone"]."','".$_POST["vartwo"]."');
IMO it is better to use the braces syntax:
"insert into show
values('','{$_POST['Accnt_name']}','{$_POST['acc_num']}', ...)"
> In your query you have omitted the quotes. Don't know if that causes
> problems, but echoing out $addtocart would show that anyway.
Also ...
> mysql_close();
> $error = mysql_error();
call mysql_error() before you close the connection.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
If you give Congress a chance to vote on both sides of an issue, it
will always do it.
-- Les Aspin, D., Wisconsin
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php