hi i'm a newbie on php and i want to create a for that will collect the name and contact number of the person and send it to my email.
can anyone help me on this?
i've tried this code but doesn't send email to my email account
<?php if(isset($_POST['submit'])) {
$to = "myemail@sample.com"; $name = $_POST['name']; $contact = $_POST['contactl']; $body = "From: $name\n E-Mail: $contact; echo "Data has been submitted to $to!"; mail($to, $body);} else { echo "error!";} ?>can you help me on this?
Thanks