RE: [PHP-DB] adding troubles revisited
| From: | Shrock, Court | Date: | Tue, 21 May 2002 18:00:35 +0000 |
| Subject: | RE: [PHP-DB] adding troubles revisited | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19331@lists.php.net to get a copy of this message | ||
Where do the variables, $first_name and $last_name come from? QueryString
or Form submittal? Do you have register_globals=on or have you taken the
fact that they are not registered into account?
> -----Original Message-----
> From: cin [mailto:ting@chat.carleton.ca]
> Sent: Tuesday, May 21, 2002 11:01 AM
> To: php-db@lists.php.net
> Subject: [PHP-DB] adding troubles revisited
>
>
> hi everyone. please bear with me as i am trying to troubleshoot this
> problem to the best of my abilities ...
>
> as it stands, i can create both databases and tables remotely
> using php
> scripts *read as i can do it from a web browser client*.
> connecting to the
> database and displaying output is also troublefree. however,
> whenever i try
> to add data to the tables, i either get blank entries or
> absolutely nothing.
>
> the following script ...
>
> <html>
> <body>
> <? php
> mysql_connect("localhost", "test", "testpw");
> mysql_select_db("testdb");
> mysql_query("insert into firsttab (first_name, last_name) values
> ('$first_name', '$last_name')");
> print ($first_name);
> print (" ");
> print ($last_name);
> print ("<p>");
> print ("blah blah blah");
> ?>
> </body>
> </html>
>
> with the appropriate mysql_error() statement gave the
> following error msg:
>
> string(35) "insert into firsttab values(",");
>
> any help is greatly appreciated at this point.
>
>
>
> cin
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>