Can Someone help me alter this code so when someone posts the html entites it will insert it into a mysql database(i named it MVHSFBLA) i named the table Contact and two fields name and emails. But at the same time i would like it also to run the function of what i have below.
heres my PHP code.
<?php
if (isset($_POST['name']))
{
$name = htmlentities($_POST['name']);
$email= htmlentities($_POST['email']);
printf("Thanks <strong>%s!</strong> <br/>" , $name);
printf("Mountain View FBLA will contact you through your email: <strong>%s</strong> shortly! <br/>", $email);
}
?>
<fieldset>
<p><legend> Contact us</legend>
<form action="contactus.php" method="post">
<p>
Name:<br />
<input type="text" id="name" name="name" size="40" maxlength="40" />
</p>
<p>
Email Address:<br />
<input type="text" id="email" name="email" size="40" maxlength="40" />
</p>
<input type="submit" id="submit" name="submit" value="Go!" />
</form>
</p
></fieldset>
</td>
heres my PHP code.
<?php
if (isset($_POST['name']))
{
$name = htmlentities($_POST['name']);
$email= htmlentities($_POST['email']);
printf("Thanks <strong>%s!</strong> <br/>" , $name);
printf("Mountain View FBLA will contact you through your email: <strong>%s</strong> shortly! <br/>", $email);
}
?>
<fieldset>
<p><legend> Contact us</legend>
<form action="contactus.php" method="post">
<p>
Name:<br />
<input type="text" id="name" name="name" size="40" maxlength="40" />
</p>
<p>
Email Address:<br />
<input type="text" id="email" name="email" size="40" maxlength="40" />
</p>
<input type="submit" id="submit" name="submit" value="Go!" />
</form>
</p
></fieldset>
</td>