Jump to content

[SOLVED] Form submit issues


denoteone

Recommended Posts

I have a form that submits data to a script. But when I put in a <textarea></textarea> in the form the submit button does not work in Fire Fox? I have made many pages with forms before. Has any one ran into this issue before?

 

Could it be a doctype issue?

 

<form action="<?=$_SERVER['PHP_SELF']?>" method=POST>
Comments:
    <textarea rows="5" cols="35" name="contact_comments"></textarea>

</form>

Link to comment
https://forums.phpfreaks.com/topic/159716-solved-form-submit-issues/
Share on other sites

<?PHP
ini_set("display_errors","2");
ERROR_REPORTING(E_ALL);

//this conditional will send the email after the submit 
if(isset($_POST["B1"])) { 
$name = $_POST['contact_name'];
$company = $_POST['contact_company'];
$email = $_POST['contact_email'];
$phone = $_POST['contact_phone'];
$comments = $_POST['contact_comments'];
$my_message = ' Please contact '.$name.' here is there info:'.$email.' '.$company.' '.$phone.' here are the comments '.$comments.'  ';
$subject = 'SuperLumin Contact Request';
$headers = "From: ".$email."\r\n";
$headers .= "Reply-To: [email protected]\r\n";
$headers .= "CC: [email protected]\r\n";
$headers .= "Content-type: text/html\r\n";
mail('[email protected]',$subject,$my_message,$headers);
?>
<html> 
<head>
</head> 
<body> 
<b>Thank You!</b>
<META HTTP-EQUIV = 'Refresh' Content = '2; URL = index.html'>
</body>
</html>

<?PHP
}else{ 
?>  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> Contact Request</title>
</head>
<body>
<form action="<?=$_SERVER['PHP_SELF']?>" method="POST">
<table style="font:bold 12px Verdana, Arial, Helvetica, sans-serif; margin:0px auto; margin-top:20px;" width="80%" border="0" align="center" cellspacing="10">
<tr>
<td align="right" width="40%">*Full Name:</td>
    <td width="60%"><input type="text" name="contact_name" size="40" /></td>
    </tr>
    <tr>
<td align="right" width="40%">*Company:</td>
    <td width="60%"><input type="text" name="contact_company" size="40" /></td>
    </tr>
    <tr>
<td align="right" width="40%">*Email:</td>
    <td width="60%"><input type="text" name="contact_email" size="40" /></td>
    </tr>
        <tr>
<td align="right" width="40%">Phone:</td>
    <td width="60%"><input type="text" name="contact_phone" size="40" /></td>
    </tr> 
    <tr>
    <td align="right">Comments:</td>
    <td><textarea rows="5" cols="35" name="contact_comments"></textarea></td>
    </tr>
     <tr>
    <td align="right"><a href="test.html">tester</a></td>
    <td><input type="submit" value="Submit" border="0" name="B1"> <input type="reset" value="Reset" name="reset">
</td>
    </tr>
    </table>
</form>
</body>
</html>
<?php
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.