Hello all, need help...bad. I Know nothing about PHP, so I've been searching tutorials to achieve what I want but no luck. Here is my form on my contact.html.
<form name="contactform" action="contactform.php" method="post" window.onload=function() {document.contactform.reset();};>
<table border="0" cellpadding="3">
<tr>
<td><font size="6"><a href="http://www.somesite.com/" style="text-decoration:none">HOME</a></font></td>
<td rowspan="7" width="1020"><center><font size="3">IF YOU HAVE A QUESTION, COMMENT, OR INQUIRY REGARDING RATES PLEASE CONTACT US AT:<br />INFO@SOMEEMAIL.COM<br /><br />YOU MAY ALSO CONTACT US THROUGH OUR FORM:<br /><br />
NAME:<input type="text" size="36" name="name" class="text1" style="font-family: times" />
<br />
EMAIL:<input type="text" size="36" name="email" class="text2" style="font-family: times" />
<br />
<br />
<textarea name="text" rows="5" cols="139" style="font-family: times">
</textarea>
<br />
<br />
<a onclick="document.contactform.reset();return false;" href="#"><img alt="Reset" src="reset.gif" border="0" /></a> /
<input type="image" src="submit.gif" alt="Submit" />
</font></center></td>
</tr>
<tr>
Here is my contactform.php file. Got info from a site called http://teamtutorials.com/web-development-tutorials/php-tutorials/inserting-data-into-a-mysql-database-using-php it was called inserting data into mysql database using php tutorial. I just mimic.
<?php
$name = $_post['name'];
$email = $_post['email'];
$text = $_post['text'];
mysql_connect ("localhost"), "projectc_testuse", "password") or die ('Error: ' . mysql_error());
mysql_select_db ("projectc_Test");
$query="INSERT INTO contacttable (ID, name, email, text)VALUES ('NULL','".$name."','.$email."','".$text."')";
mysql_query($query) or die ('error updating database');
?>
What I would like is the data sebmitted from my form, to mysql database using this form. What am I doing wrong? Maybe I am putting host info, database name in wrong area, but I tired several combinations. Help!
Thanks,
ADLE