?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Re: Newbie Form help
Author:??(65.48.205.---)
Date:???10-14-03 06:15

form structure incorrect



First Name


Last Name


Email


Comments


VALUE="Submit!">

the empty brackets at the end of the element name are the indicators that it is an array..the array keyword is not needed

you will also need to implode the array to add some commas to separate the multiple values from the form...

$lastname=implode(",",($_POST['LastName']));

also note the use of $_POST['varname'] to access the variables from the form..so the query should be modified to this:

$LastName=implode(",",($_POST['LastName']));
$Email=implode(",",($_POST['Email']));
$Comments=implode(",",($_POST['Comments']));

$Query = "INSERT into $TableName VALUES ('0', '$FirstName', '$LastName', '$Email', '$Comments')";


hth

?Topics Author? Date
?Newbie Form help??new
Prophit 10-13-03 17:36?
?Re: Newbie Form help??new
bastien 10-14-03 06:15?
?Re: Newbie Form help??new
Prophit 10-14-03 06:56?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > form structure incorrect > >
> > First Name
> > Last Name
> > Email
> > Comments
> > VALUE="Submit!"> > > the empty brackets at the end of the element name are the > indicators that it is an array..the array keyword is not needed > > you will also need to implode the array to add some commas to > separate the multiple values from the form... > > $lastname=implode(",",($_POST['LastName'])); > > also note the use of $_POST['varname'] to access the > variables from the form..so the query should be modified to > this: > > $LastName=implode(",",($_POST['LastName'])); > $Email=implode(",",($_POST['Email'])); > $Comments=implode(",",($_POST['Comments'])); > > $Query = "INSERT into $TableName VALUES ('0', '$FirstName', > '$LastName', '$Email', '$Comments')"; > > > hth ">??

Provided By
Phorum