RE: mysql_query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx [mailto:edifice@xxxxxxxxxxxxxxx] On Behalf Of
ballo1@xxxxxxxxxxxx
Sent: Tuesday, 12 October 2004 10:15 PM
To: php-db@xxxxxxxxxxxxx
Subject:  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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux