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.
 
Soldato
Joined
13 Jun 2009
Posts
4,233
Location
My own head
Yeah you beat me. I sat down when I got home and was like "MOBILE!". Funny how stepping away from something then makes it so blindingly obvious :rolleyes:.

I honestly wouldn't have even thought that, as this is not good practice these days!

Experience should be seamless for both mobile/desktop users, which means the preference is responsiveness these days, rather than separated content. You'll also get better google rankings with a responsive website, those changes came in last year.

Just a tip :). The site is quite basic, and could be converted to be responsive very easily, would definitely recommend.
 
Last edited:
Soldato
Joined
13 Jun 2009
Posts
4,233
Location
My own head
Yeah I need to redo it. My worry was heavy on video content, especially the blog, but mobiles can cope a bit better with that now since I made the original mobile version.

Yeah I just had a bigger browse. A few things would need cleaning up marginally like the video page, and reviews page but definitely still an easy job.

With the videos, having 5 in a row would work, but I personally hate it as you scroll down you end up playing them by accident!
 
Back
Top Bottom