HTML not being recognized
Posted: Sun Feb 03, 2008 5:24 pm
Hey. I just coded this simple email script. I am a beginner to html.
I have 2 problems. The first is that It will not recognize the <br /> as breaks. it just displays them in the email as "</br >". For example, if the user types "Gloss Metal" for a theme name, and then "Harry J" for developer name, and clicks submit, the email will be outputed as "Gloss Metal<br />Harry J".
The second problem is that it is giving me this When I click submit:
However, the email is still sent.
Here is the code for my HTML page (index.html):
Here is the code for my PHP page:
And the thanks.html is just a simple html page.
Help, please.
I have 2 problems. The first is that It will not recognize the <br /> as breaks. it just displays them in the email as "</br >". For example, if the user types "Gloss Metal" for a theme name, and then "Harry J" for developer name, and clicks submit, the email will be outputed as "Gloss Metal<br />Harry J".
The second problem is that it is giving me this When I click submit:
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/u/g/sug15/html/sendmail.php:6) in /home/content/s/u/g/sug15/html/sendmail.php on line 19Here is the code for my HTML page (index.html):
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Theme Upload</title>
</head>
<body>
<h2>Add your theme to our database
</h2>
<form method="post" action="sendmail.php">
<p>Your Email:
<br>
<input name="email" type="text" />
</p>
<p>
Theme's name:
<br />
<input name="tname" type="text" size="35" />
</p>
<p>Developer's name:
<br>
<input name="dname" type="text" size="35" />
</p>
<p>Theme's description:
<br>
<textarea name="desciption" cols="45" rows="3"></textarea>
</p>
<p>Screenshot link 1:
<br>
<input name="ss1" type="text" size="40" />
<p>Screenshot link 2:
<br>
<input name="ss2" type="text" size="40" />
</p>
<p>Screenshot link 3:
<br>
<input name="ss3" type="text" size="40" />
<blockquote>
<p>
<input type="submit" />
<input name="" type="reset" value="Reset" />
</p>
</blockquote>
</form>
</body>
</html>Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<p>
<?php
$email = $_REQUEST['email'] ;
$tname = $_REQUEST['tname'] ;
$dname = $_REQUEST['dname'] ;
$description = $_REQUEST['description'] ;
$ss1 = $_REQUEST['ss1'] ;
$ss2 = $_REQUEST['ss2'] ;
$ss3 = $_REQUEST['ss3'] ;
$return = ("<br />");
$message = $tname . $return . $dname . $return . $description . $return . $ss1 . $return . $ss2 . $return . $ss3;
mail( "12345@email.com", "Theme",
$message, "From: $email" );
header( "Location: http://website.com/thanks.html" );
?>
</body>
</html>Help, please.