RE: [PHP-DB] mysql_query
| From: | Murray @ PlanetThoughtful | Date: | Tue, 12 Oct 2004 14:11:49 +0000 |
| Subject: | RE: [PHP-DB] mysql_query | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36754@lists.php.net to get a copy of this message | ||
Hi,
Unless you have 'register globals' on, are you retrieving the value of the
variables passed by your form from the $_GET or $_POST super variables
(whichever is appropriate)?
In other words, at the top of the page that is performing your insert query,
do you have lines such as:
$ime = $_GET['ime']; // (or, if your form is POSTing the data, $ime =
$_POST['ime'];)
From what limited information you've included below it seems that perhaps
you aren't retrieving these values prior to attempting to insert them into
the table.
Please ignore this if your installation of PHP is running with 'register
globals' on.
Much warmth,
Murray
-----Original Message-----
From: edifice@nj1.fxsonet.com [mailto:edifice@nj1.fxsonet.com] On Behalf Of
ballo1@pinkponk.com
Sent: Tuesday, 12 October 2004 10:15 PM
To: php-db@lists.php.net
Subject: [PHP-DB] mysql_query
hello,
I have a begining question.
I've got simple html form and php script, but insert doesn' t work. What is
wrong in my insert mysql_query?
mysql_query( "insert into obiskovalci (ime, priimek, ulica, hstevilka,
pstevilka, posta) values('$ime', '$priimek', '$ulica',
'$hstevilka',
'$pstevilka', '$posta')");
There is also id, which is auto_increment. After fill form and press Submit,
id
is writen in table, but there is no other inputs. Nothing, except "id".
thanks for answers
BR, Balo
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php