I am so unbelievably stuck with this, I have tried so many ways to do it , but I just cant seem to change the submit button of my contact form from the default button to an image I created. I have tried changing <input type="submit" to image, that changes the button to the image I want but then when you click on it, the form fails and the error message comes up. So I tried using .CSS and that changed the image, but again once you clicked on it then the form failed. I am absolutley lost and really need some help, I cant help thinking that I must have made a mistake in my form code, so here it is:
contactus.php
<?php
if(isset($_POST['submit'])) {
$to = "email@example.com";
$subject = "email@example.com";
$name_field = $_POST['username'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "Username: $name_field\n Email: $email_field\n Message:\n $message";
print "<meta http-equiv=\"refresh\" content=\"0;URL=contactus.html\">";
mail($to, $subject, $body);
} else {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
}
?>
contactus.html
<form method="POST" action="contactus.php">
<tr>
<td> </td>
<td align="left" valign="top" class="sel4">Username:</td>
<td height="25" align="left" valign="top" class="text"><input type="text" name="username" style="width: 200px; height: 18px"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top" class="sel4">Email:</td>
<td height="25" align="left" valign="top" class="text"><input type="text" name="email" style="width: 200px; height: 18px"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="left" valign="top" class="text">Message:</td>
<td height="25" align="left" valign="top" class="text"><textarea name="message" style="width: 250px; height: 120px"></textarea></td>
<td> </td>
</tr>
<tr>
<td width="12"> </td>
<td align="left" valign="top" class="text"> </td>
<td height="30" align="right" valign="bottom">
<input type="submit" src="images/send.jpg" name="submit">
</tr>
</form>
at the moment it is just the standard submit button, but I want to change it so it shows the image /images/send.jpg but everything I have tried has caused the form to fail.
I would be extremely grateful if anyone could help me with this, it may seem like a trivial task to many, but I have spent hours browseing the web for a solution, all of which result in the form failing. I know there is a way to do it, but I cant seem to do it, can ayone help?
thanks