Mon site ne redirige plus vers la bonne page
Résolu
bighawa
Messages postés
24
Statut
Membre
-
bighawa Messages postés 24 Statut Membre -
bighawa Messages postés 24 Statut Membre -
Bonjour j'ai fait des pages web avec HTML et PHP (pour faire rediriger un formulaire a 2 adresses de courriel en même temps). et le tout fonctionnait parfaitement pendant plus d'une semaine. Je n'ai rien changer et en faisant des tests je vois qu'il ne redirige plus vers la bonne page et n'envoie aucun courriel. Pourquoi une réaction différente si le tout fonctionnait déja?
Mon script php se termine de la sorte:
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to, $subject, $message, $headers);
mail($from, $subject2, $message3, $headers2); // sends a copy of the message to the sender
header('location: thanks-purchase.html');
} else {
header('location: products.html');
}
?>
Le tout allait pourtant vers la page 'thanks-purchase.html', mais soudainement il redirige seulement vers 'products.html'
une aide sera fortement apprécié.
Merci
Mon script php se termine de la sorte:
$headers = "From:" . $from;
$headers2 = "From:" . $to;
mail($to, $subject, $message, $headers);
mail($from, $subject2, $message3, $headers2); // sends a copy of the message to the sender
header('location: thanks-purchase.html');
} else {
header('location: products.html');
}
?>
Le tout allait pourtant vers la page 'thanks-purchase.html', mais soudainement il redirige seulement vers 'products.html'
une aide sera fortement apprécié.
Merci
A voir également:
- Mon site ne redirige plus vers la bonne page
- Site de telechargement - Accueil - Outils
- Site comme coco - Accueil - Réseaux sociaux
- Supprimer page word - Guide
- Quel site remplace coco - Accueil - Réseaux sociaux
- Site pour vendre des objets d'occasion - Guide
<?php if(isset($_POST['submit'])){ $to = "info@MonSite.com"; // this is your Email address $from = $_POST['email']; // this is the sender's Email address $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $total = $_POST['subtotal']; $subject = "Purchase - MonSite.com"; $subject2 = "Copy of your purchase - MonSite.com"; $message = '1. ESSENTIAL INFORMATION TO START YOUR PROJECT'."\n" .'Product: '.$_POST['product']."\n" .'Name of project: '.$_POST['project']."\n" .'Quantity: '.$_POST['quantity']."\n" .'Size: '.$_POST['size']."\r\n\r\n" .'2. INFORMATION TO WRITE ON YOUR ENVELOPES '."\n" .'First name: '.$_POST['firstname']."\n" .'Last name: '.$_POST['lastname']."\n" .'Company name: '.$_POST['company']."\n" .'Profession: '.$_POST['jobposition']."\n" .'Phone: '.$_POST['phone']."\n" .'Email: '.$_POST['email']."\n" .'Website: '.$_POST['website']."\r\n\r\n" .'3. SHIPPING INFORMATION '."\n" .'First name: '.$_POST['firstname-shipping']."\n" .'Last name: '.$_POST['lastname-shipping']."\n" .'Address: '.$_POST['address-shipping']."\n" .'City: '.$_POST['city-shipping']."\n" .'State: '.$_POST['state-shipping']."\n" .'Postal code: '.$_POST['postalcode-shipping']."\n" .'Country: '.$_POST['country-shipping']."\r\n\r\n" .'4. PAYMENT INFORMATION '."\n" .'First name (Owner of the credit card): '.$_POST['firstname-payment']."\n" .'Last name (Owner of the credit card): '.$_POST['lastname-payment']."\n" .'Address: '.$_POST['address-payment']."\n" .'City: '.$_POST['city- payment']."\n" .'State: '.$_POST['state-payment']."\n" .'Postal code: '.$_POST['postalcode-payment']."\n" .'Country: '.$_POST['country-payment']."\n" .'Method of payment: '.$_POST['creditcardtype']."\n" .'Credit card number: '.$_POST['creditcard']."\n" .'Expiry month: '.$_POST['month']."\n" .'Expiry year: '.$_POST['year']."\n" .'CVV: '.$_POST['cvv']; $message2 = '1. ESSENTIAL INFORMATION TO START YOUR PROJECT'."\n" .'Name of project: '.$_POST['project']."\n" .'Quantity: '.$_POST['quantity']."\n" .'Size: '.$_POST['size']."\r\n\r\n" .'2. INFORMATION TO WRITE ON YOUR ENVELOPES '."\n" .'First name: '.$_POST['firstname']."\n" .'Last name: '.$_POST['lastname']."\n" .'Company name: '.$_POST['company']."\n" .'Profession: '.$_POST['jobposition']."\n" .'Phone: '.$_POST['phone']."\n" .'Email: '.$_POST['email']."\n" .'Website: '.$_POST['website']."\r\n\r\n" .'3. SHIPPING INFORMATION '."\n" .'First name: '.$_POST['firstname-shipping']."\n" .'Last name: '.$_POST['lastname-shipping']."\n" .'Address: '.$_POST['address-shipping']."\n" .'City: '.$_POST['city-shipping']."\n" .'State: '.$_POST['state-shipping']."\n" .'Postal code: '.$_POST['postalcode-shipping']."\n" .'Country: '.$_POST['country-shipping']."\r\n\r\n" .'4. PAYMENT INFORMATION '."\n" .'First name (Owner of the credit card): '.$_POST['firstname-payment']."\n" .'Last name (Owner of the credit card): '.$_POST['lastname-payment']."\n" .'Address: '.$_POST['address-payment']."\n" .'City: '.$_POST['city- payment']."\n" .'State: '.$_POST['state-payment']."\n" .'Postal code: '.$_POST['postalcode-payment']."\n" .'Country: '.$_POST['country-payment']."\n" .'Your Method of payment: '.$_POST['creditcardtype']."\n"; $message3 = "Dear " . $name . ",\r\n\r\nThank you for choosing MonSite.com.\r\n\r\nThis email confirms that your message has been received and you should get a reply as soon as possible.\r\n\r\nHere is the copy of your message : \r\n" . $message2 . "\r\n\r\n\r\n" .'We appreciate your interest on our website.'."\r\n\r\n" .'Customer Service Team'."\r\n" .'MonSite.com'; $headers = "From:" . $from; $headers2 = "From:" . $to; mail($to, $subject, $message, $headers); mail($from, $subject2, $message3, $headers2); // sends a copy of the message to the sender header('location: thanks-purchase.html'); } exit(); ?>