Website using an old PHP form/script... sometimes?

Soldato
Joined
27 Dec 2005
Posts
17,296
Location
Bristol
I've got a simple brochure request form/script that users fill out their details into and it pings them off an email with a prices link.

I updated it a few months ago to reflect a change of employee etc and sometimes that's the CC'd version we receive, other times it's the old one.

How is that possible? It's difficult for me to debug because it works correctly when I test it! I don't even have a copy of the old script on my machine and I've downloaded the hosted version and it's up-to-date.

Page in question: idoweddingfilms.co.uk/wedding-video-packages

The script itself is as simple as including the brochure script which in turn includes the form.

If anyone of you request it please put OcUK as the heard from otherwise you might get followed up :p. The most obvious bit that's changed is that the email should be signed off by 'Emma', not 'Zoe'.

Otherwise what should I be looking for?!

Bizarre!
 
Soldato
OP
Joined
27 Dec 2005
Posts
17,296
Location
Bristol
There's really not a lot to see but see shortened versions below:

Packages page:
PHP:
<?include('../includes/brochurescript.php');?>

brochurescript.php:
PHP:
<?
$date = "";
$a = mysql_real_escape_string($_GET['a']);

if($a == "brochure"){
// GET ALL THE $_POSTs

if($email){

	if($date == ""){$date = "Not provided";};
	if($phone == ""){$phone = "Not provided";};
	if($source == ""){$source = "Not provided";};
    $to = "$name <$email>"; 
    $from = "Ido Wedding Films <[email protected]>";
    $subject = "Thank you for requesting our brochure"; 
	
    $message = "// LONG MESSAGE HERE"; 

    $headers = "MIME-Version: 1.0\r\n"; 
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
    $headers .= "From: $from\r\n"; 
    $headers .= "Cc: [email protected]";
	
	if($phone == "Not provided"){$phone = "";}
	if($source == "Not provided"){$source = "";}
	$today = date("y-m-d");
	$query = "// INSERT INTO DB";
	$result = mysql_query($query, $link);
     
if(mail($to, $subject, $message, $headers)){
?>
// SENT CONFIRMATION
<?
}
} else {
?>
<div class="column3"><p><label class="error" style="display:inline;padding-left;20px;">You forgot to fill in your email address! Please try again...</label></p></div>
<?
include('../includes/brochureform.php');
}
} else {
include('../includes/brochureform.php');
}
?>

brochureform.php is just the raw HTML for the form which you can see from the page's source.
 
Back
Top Bottom