![]() |
|
? |
![]() 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
|
? |
|
|||||||||||||||||||||||||||||||||||||||||||||
?Reply To This Message | ||||||||||||||||||||||||||||||||||||||||||||||||
?Your Name: | ||||||||||||||||||||||||||||||||||||||||||||||||
?Your Email: | ||||||||||||||||||||||||||||||||||||||||||||||||
?Subject: | ||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||
Email replies to this thread, to the address above. | ||||||||||||||||||||||||||||||||||||||||||||||||
??wrote: > > i got this from a tutorial page. I'm doing this for a > volunteer project and it's due in a week. I really need help > with this. when i try to send the info collected from an html > form to mysql...it doesn't send anything to the database. > Anyone knows why. your help is greatly appreciated. > > $title=$_POST['title']; > $message=$_POST['message']; > $author=$_POST['author']; > $email=$_POST['email']; > > $location="localhost"; > $username="your_db_username"; > $password="your_db_password"; > $database="database_name"; > $conn = mysql_connect("$location","$username","$password"); > if (!$conn) die ("Could not connect MySQL"); > mysql_select_db($database,$conn) or die ("Could not open > database"); > $query = "INSERT INTO student(id,title,message,author,email) > VALUES('','$title','$msg','author','email')"; > > $result=mysql_query($query); > mysql_close(); > > print " Your Information is entered into our database! "; > > ?> ">?? |