Hola guys!!
Why oh why can't I get this to work?
The idea is this: This file is processed via an action in a form. The information is added to the database, then the mail functions sends the mails with the configurations from the order-process-config.php file, and then the user get's redirected via header method.
The mail funcion and the redirection isn't working!
PHP Code:
<?php
include_once("../admin/admin/config.php");
require("scripts/order-process-config.php");
// Check user logged in already:
checkLoggedIn("yes");
doCSS();
$timestamp = time()+date("P");
gmdate("YmdHis", $timestamp);
$ordertime = gmdate("YmdHis", $timestamp);
// A query to INSERT data
$query = "INSERT INTO orders
SET
clientname = '$cname'
,
clientemail = '$cemail'
"
;
$result=mysql_query($query, $link) or die("Died inserting login info into db. Error returned if any: ".mysql_error());
{
mail("$your_email", "$your_subject", "$your_message", "From: $email");
mail( "$email", "$auto_subject", "$auto_message", "$headers");
}
if ($pgm=="Tranferência Bancária") {
header("Location: /comprar-transferencia-bancaria.php");
} elseif ($pgm=="Cartão de Crédito") {
header("Location: /comprar-cartao-de-credito.php");
} elseif ($pgm=="Paypal") {
header("Location: /comprar-paypal.php");
} elseif ($coupon=="A Dinheiro") {
header("Location: /comprar-a-dinheiro.php");
}
?>







Bookmarks