Send email using PHP


#1

So basically I’ve done this so far and it worked one of the times but then I changed something maybe some quotations and for some reason it just doesn’t wok anymore… Here’s the code:

[php]<?php
//if “email” variable is filled out, send email
if (isset($_REQUEST[‘email’])) {

//Email information
$admin_email = “nagukatk@naguka.tk”;
$email = $_REQUEST[‘email’];
$name = $_REQUEST[‘name’];
$message = $_REQUEST[‘message’];

//send email
mail($admin_email, “$name”, $message, “From:” . $email);

//Email response
echo “

Your message has just been sent!

”;
}

//if “email” variable is not filled out, display the form
else {
?>

									<form method="post" action="#contact">
										<div class="field half">
											<label for="name">Name</label>
											<input type="text" name="name" id="name" />
										</div>
										<div class="field half">
											<label for="email">Email</label>
											<input type="email" name="email" id="email" />
										</div>
										<div class="field">
											<label for="message">Message</label>
											<textarea name="message" id="message" rows="4"></textarea>
										</div>
										<ul class="actions">
											<li><input type="submit" value="Send Message" class="button special" style="background:white;opacity:0.75;" /></li>
										</ul>
									</form>
<?php } ?>[/php]

Can anyone tell me what I’m doing wrong?
PS.: I’m a newie/noob.


#2

Define “Doesn’t work”