I'm trying to create a website using some PHP.
I created an order form for my school company to let people order products this way. Only orders are made - no payments or anything.
Now I have create the whole website. It is very simple. Every different product has a different combobox to select the number of items from.
Then on the end of the page the client's details are asked.
Now I created this PHP file that would handle everything, that is collecting all information and creating a well-formatted e-mail to send to the company's e-mail address.
I thought everything I coded was right - but I guess there must be something wrong.
When I try it out, the page get redirected to a blank page (though I tell the script to relocate to the website) and no email is sent.
I have attached the PHP code (it's quite long so I cut out a part) and I was wondering if any of you can see something wrong with the code that is causing this problem ?
CODE
<?
// requesting client's information
$email = $_REQUEST['email'];
$name = $_REQUEST['name'];
$phone = $_REQUEST['phone'];
$GSM = $_REQUEST['GSM'];
// getting the product's information
$2in1name = "2 in 1 Kaarsen";
$2in1price = 4.00;
$2in1 = $_REQUEST['2in1'];
$total2in1 = $2in1* $2in1price;
$eikaarskleinname = "Eikaars Klein";
$eikaarskleinprice = 4.00;
$eikaarsklein = $_REQUEST['eikaarsklein'];
$totaleikaarsklein = $eikaarsklein * $eikaarskleinprice;
// they are all the same from here - name, price, number and total
$gpLMname = "Geurparels Limoen:Meiklokjes";
$gpLMprice = 4.00;
$gpLM = $_REQUEST['gpLM'];
$totalgpLM = $gpLM * $gpLMprice;
//this should be created the email message
$message = "Bestelling door $name\n Te bereiken op $phone, of op de GSM $GSM\n \n Bestelling\n \n $2in1 keer $2in1name = $total2in1";
//this should be sending the message
mail("spammail@gmail.com", "$name Aromax Bestelling", $message, "From: $email");
header("Location: http://aromax.bizhat.com");
?>
All help will be highly appreciated!
Here you can check out the script in action (with the real emailaddress - I have replaced it because I don't like spam )
As you see only the first product would be included in the e-mail for now - I would expand it in the future of course. So selecting only the first items and filling in some details should do it I suppose.
Thanks in advance to all!

