how can i run this php script and html

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hakimade
Forum Newbie
Posts: 2
Joined: Tue Dec 02, 2008 5:59 am

how can i run this php script and html

Post by hakimade »

please can anybody tell me how i can run this php html with php without hosting

{code}

<form method="post" action="sendmail.php">
Email: <input name="email" type="text" /><br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea><br />
<input type="submit" />
</form>



<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "yourname@example.com", "Feedback Form Results", $message, "From: $email" );
header( "Location: http://www.example.com/thankyou.html" );
?>

{code}
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: how can i run this php script and html

Post by jaoudestudios »

please can anybody tell me how i can run this php html with php without hosting
That does not make sense! Please state your issue clearly!

Plus on a side note your email headers are not protected from injection!
Post Reply