FW: [PHP-DB] mysql_query

From: Date: Tue, 12 Oct 2004 14:11:11 +0000
Subject: FW: [PHP-DB] mysql_query
Groups: php.db 
Request: Send a blank email to php-db+get-36753@lists.php.net to get a copy of this message
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: bbonkosk@tampabay.rr.com [mailto:bbonkosk@tampabay.rr.com] Sent: Tuesday, October 12, 2004 3:44 PM To: darko.golec@mobitel.si Cc: php-db@lists.php.net 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: ballo1@pinkponk.com 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

« previous php.db (#36753) next »