Morning.

I'm new to all this forum malarque, but lets give it a stab!

I need to prove some PHP code works and does what it should for college, but the server doesn't run PHP apparently.

I thought I could somehow get the website to relay what the user has inputted in the form, but I don't seem to be able to make it work.

I'm using an external PHP file

<?php 
$contactname = $_POST['ContactName']; 
$address = $_POST['Address']; 
$postcode = $_POST['Postcode']; 
$telephone = $_POST['Telephone']; 
$emaddress = $_POST['Emaddress']; 
$enquiry = $_POST['Enquiry']; 


$message .= "Contact Name: \n"; 
$message .= $contactname; 
$message .= "\n"; 
$message .= "\n"; 
$message .= "Address: \n"; 
$message .= $address; 
$message .= "\n"; 
$message .= "\n"; 
$message .= "Postcode: \n"; 
$message .= $postcode; 
$message .= "\n"; 
$message .= "\n"; 
$message .= "Telephone: \n"; 
$message .= $telephone; 
$message .= "\n"; 
$message .= "\n"; 
$message .= "Email Address: \n"; 
$message .= $emaddress; 
$message .= "\n"; 
$message .= "\n"; 
$message .= "Enquiry: \n"; 
$message .= $enquiry; 
$message .= "\n"; 
$message .= "\n"; 






mail("myemail@email.co.uk", "Subject: Website (Contact) Enquiry", $message, "From: $email"); 
Header("Location: index.htm"); 
?>

I know I need to edit the last section somehow, but not sure where to start. Looking it up on the Internet I can find solutions that work alongside a database, but I haven't done that...

Any help gratefully received!
Thankyou

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.