?

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

?
?Newbie Form help
Author:??(4.20.98.---)
Date:???10-13-03 17:36

Well im having this problem trying to get my from to add to info into the DB, here is what i have
The form



HTML Form




First Name


Last Name


Email


Comments


VALUE="Submit!">





Handle Form



<br>


$Host = "localhost";
$User = "page";
$DBname = "test";
$TableName = "feedback";

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

print ("The query is:
$Query

\n");

if (mysql_db_query ($DBname, $Query, $Link)) {

print "Record updated/edited!

";

} else {

print "Record was not uploaded!

";
}



mysql_close ($Link);
?>

?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: > > Well im having this problem trying to get my from to add to > info into the DB, here is what i have > The form > > > > HTML Form > > >
> > First Name
> > Last Name
> > Email
> > Comments
> > VALUE="Submit!"> > >
> > > > Handle Form > > > > > > > > $Host = "localhost"; > $User = "page"; > $DBname = "test"; > $TableName = "feedback"; > > $Link = mysql_connect ($Host, $User); > $Query = "INSERT into $TableName VALUES ('0', '$FirstName', > '$LastName', '$Email', '$Comments')"; > > print ("The query is:
$Query

\n"); > > if (mysql_db_query ($DBname, $Query, $Link)) { > > print "Record updated/edited!

"; > > } else { > > print "Record was not uploaded!

"; > } > > > > mysql_close ($Link); > ?> > > ">??


Provided By
Phorum