HTML Editor
Posted: Fri Feb 25, 2005 4:31 pm
Can you use php in it?
Premium hosting with SSD VPS, cPanel/WHM hosting and dedicated servers support and discussion forums. Get help from co-webmasters and professionals!
https://smokyhosts.com/forums/
Code: Select all
<?php
$email1 = "admin@kon-clan.recongamer.com";
$from = stripslashes($_POST['email']);
if($_POST['emailwhich'] == 1){
$sendTo = $email1;
}
else if($_POST['emailwhich'] == 2){
$sendTo = $email2;
}
if($from){
$subject = stripslashes($_POST['subject']);
$message = stripslashes($_POST['message']);
$headers = "From: $from\n";
$headers .= "Content-type: text;\r\n";
mail($sendTo,$subject,$message,$headers);
header("location:http://www.yourdomain.com/thankyou.htm");
exit;
}
else{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Contact us</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1>Contact Form</h1>
<form name="contact" action="<? echo $_SERVER['PHP_SELF']; ?>" method="POST">
Please use this form to contact us:</p>
Your e-mail will be sent to::
<select name="emailwhich">
<option value="1">email 1</option>
</select></p>
Enter Your Email Address:
<input type="text" name="email" style="width:150px;"></p>
Enter Your Website:
<input type="text" name="subject" style="width:250px;"></p>
Enter Your Message:
<textarea name="message" cols="0" rows="0" style="width:300px;height;200px;"></textarea>
</p>
<input type="submit" value="Send Email">
<input type="reset" name="Reset" value="Reset">
<a>[b]Copyright ELRocco of ELRocco.co.nr</a>[/b]
</form>
</body>
</html>
<?
}
?>
Code: Select all
<?
switch($_GET['act']) {
case '':
include('contact');
break;
default:
include('contact');
break;
}
?>
ELRocco wrote:youmust have php and appache installed to view a php file on your computer something like this doesnt need an interperator, i tdont know why
But this scripts needs appache and php interpiter installedCode: Select all
<?php $email1 = "admin@kon-clan.recongamer.com"]Copyright ELRocco of ELRocco.co.nr</a>[/b] </form> </body> </html> <? } ?>
Code: Select all
<? switch($_GET['act']) { case '': include('contact'); break; default: include('contact'); break; } ?>