Re: PHP and MySQL

From: Date: Thu, 15 Mar 2001 15:33:55 +0000
Subject: Re: PHP and MySQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7514@lists.php.net to get a copy of this message
hi, you could do it in a easier way, first put real names for the fields in your form: <div align="left">login : <input type="text" name="login"> </div> <br> <div align="left">group : <input type="text" name="group"> </div> <br> <div align="left">password : <input type="text" name="pasword"> </div> , second you could do this: INSERT INTO $table_name (id, login, group, password) VALUES ('', '$login', $group', '$password') try this... luck... Vanstaen Laurent wrote: > Hi all, > I have a few questions about PHP and databases : > > - how do you insert a character string into a database when it is stored in an > array ? For example I have the name of a person in an array called "$name" and > when I insert it into the field "name" in my table, I get a field with > "array" > written in it. > > - I have a form, where users fill in several pieces of information (login, > forename, lastname, age, etc ...). When I submit the form, I get the following > error : "Unknown column 'foo' in 'field list' " where foo is the > information > that was typed in the form in the field login for example. Has anyone > encountered such problem before ?? > > Laurent Vanstaen > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Romeo Manzur Web Application Developer iSilicom Av. 27 de Febrero 904 Altos Despacho 1, Centro Villahermosa, Tabasco, Mexico Tel: (52)(9)3-12-4790

« previous php.db (#7514) next »