RE: [PHP] Insert problem

From: Date: Sat, 29 Sep 2001 05:14:45 +0000
Subject: RE: [PHP] Insert problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69254@lists.php.net to get a copy of this message
On 28-Sep-2001 Martin Kampherbeek wrote: > I hope some some can help me. > > I made a form to put some data in a database. > I the form I lmade a security so all fields are filled in. > When I submit the form I get the data on my screen, but it will not be put > in the database. > > To see the form check: > http://www.martinkampherbeek.com/test.php > To see the code, check the source. > > At submit, it will start adduser.php > The insert line is this: > mysql_connect(".....", ".....", "....."); > mysql_select_db (...............); > > mysql_query ("INSERT INTO users (id, username, naam, adres, postcode, > woonplaats, telefoonnummer, geboortedatum, emailadres, password) > VALUES ('$id', '$username', '$naam', > '$adres', '$postcode', > '$woonplaats', '$telefoonnummer', '$geboortedatum', > '$emailadres', > '$password') > "); > a debuging hint: $qry="INSERT INTO users (id, username, naam, adres, postcode, woonplaats, telefoonnummer, geboortedatum, emailadres, password) VALUES ('$id', '$username', '$naam', '$adres', '$postcode', '$woonplaats', '$telefoonnummer', '$geboortedatum', '$emailadres', '$password')"; echo $qry, '<br>'; mysql_query($qry); --- cut & paste the echoed query into the mysql monitor. comment out the echo line when fixed; --- > I hope someone can tell me why the data will not be put in my database. > Not from here, what does mysql_errno() / mysql_error() say ? Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#69254) next »