You may have to use $_POST.

Like - $ime = $_POST["ime"];

Just put the form component name inside the square brackets of the post
function to get it to work.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 12, 2004 3:44 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql_query

1. place your query string into a variable for easy dumping...
i.e. $query = "insert into obiskovalci (ime, priimek, ulica, hstevilka, 
              pstevilka, posta) values('$ime', '$priimek', '$ulica', 
              '$hstevilka', '$pstevilka', '$posta')";
echo $query;
(See if there are problems that come to light when you dump it out)

2. Print out the debug...
i.e. mysql_query($query) or die(mysql_error());

(If this doesn't help you at the very least it should help the list more in
answering your question.)

-B



----- Original Message -----
From: [EMAIL PROTECTED]
Date: Tuesday, October 12, 2004 8:15 am
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
> 
> 

-- 
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

Reply via email to