Had a simple form script that suddenly stopped working
Posted on
16th Feb 2014 07:03 pm by
admin
It was made about a year ago and had been working fine. Last time it was known to work for sure was in early October. I got a message from someone saying they didn't think it work and I tried it through both Firefox and IE and it didn't work.
What it does do right now is load up fine but when you fill out the form and hit submit it just clears the form. Since it's having the same issue on two different browsers I'm wondering if maybe my host (yahoo) did something or if it's some universal browser change. Any help would be great because I don't see anything wrong with it but I'm far from an expert. I just need to get it working again.
Also here is the website to where it is if you want to see how it acts.
http://www.thebrocadeblackbird.com/ then click on anything and then go to consultation.
Code: <html>
<head>
<style type="text/css">
head { margin: 0 0 0 0 }
body { margin: 0 0 0 0 }
img
{
position:absolute;
top:0px;
left:20px;
}
div.alertone
{
position:absolute;
top:10px;
left:295px;
z-index: 1;
}
div.alerttwo
{
position:absolute;
top:30px;
left:68px;
z-index: 1;
}
div.alertthree
{
position:absolute;
top:10px;
left:45px;
z-index: 1;
}
div.one
{
position:absolute;
top:35px;
right:355px;
z-index: 1;
}
div.two
{
position:absolute;
top:35px;
right:50px;
z-index: 1;
}
div.three
{
position:absolute;
top:74px;
right:355px;
z-index: 1;
}
div.four
{
position:absolute;
top:72px;
right:103px;
z-index: 1;
}
div.five
{
position:absolute;
top:112px;
right:355px;
z-index: 1;
}
div.six
{
position:absolute;
top:112px;
right:50px;
z-index: 1;
}
div.seven
{
position:absolute;
top:145px;
right:505px;
z-index: 1;
}
div.eight
{
position:absolute;
top:145px;
right:48px;
z-index: 1;
}
div.nine
{
position:absolute;
top:73px;
right:50px;
z-index: 1;
}
div.submit
{
position:absolute;
top:240px;
right:60px;
z-index: 1;
}
div.required
{
position:absolute;
top:338px;
right:285px;
font-size: 85%;
color: #808284;
z-index: 1;
}
</style>
</head>
<body>
<?php
# ATTENTION! - IF YOU COPY THIS CODE, CHANGE THE NEXT LINE!
$to = "design@thebrocadeblackbird.com";
$ask = 0;
if (($FName == "") && ($Email == "") && ($PriPhone == "") && ($TimeContact == "") && ($TypeEvent == "") && ($DateEvent == "") && ($Additional == ""))
{
$ask = 1;
}
elseif (($FName == "") || ($Email == "") || ($TypeEvent == "") || ($DateEvent == ""))
{
$ask = 1;
echo "<div class='alertone'>You missed some fields.</div>";
}
if ($ask == 1)
{
echo "
<img src='Consultation_BlueBox.jpg' />
<form name='form' method='post' action='Formmiddle.php'>
<div class='one'><font color='#808284'>*</font>Name <input type='text' name='FName' value='$FName' size='20'></div>
<div class='two'><font color='#808284'>*</font>E-Mail Address <input type='text' name='Email' value='$Email' size='20'></div>
<div class='three'>Phone Number <input type='text' name='PriPhone' value='$PriPhone' size='20'></div>
<div class='four'>Best Time to Contact <input type='text' name='TimeContact' value='$TimeContact' size='11'></div><div class='nine'><select name='AMPM' value='$AMPM'><option value='AM'>am</option><option value='PM'>pm</option></select></div>
<div class='five'><font color='#808284'>*</font>Type of Event <input type='text' name='TypeEvent' value='$TypeEvent' size='20'></div>
<div class='six'><font color='#808284'>*</font>Date of Event <input type='text' name='DateEvent' value='$DateEvent' size='20'></div>
<div class='seven'>Additional Notes </div><div class='eight'><textarea name='Additional' rows='4' cols='54' wrap='hard'>$Additional</textarea></div>
<div class='required'>*required fields</div>";
echo "<div class='submit'><input type='image'SRC='SubmitBox.jpg'></div>";
echo "</form>";
}
else
{
$message = "Name: $FNamenE-mail: $EmailnPrimary Phone: $PriPhonenBest Time to Contact: $TimeContact $AMPMnType of Event: $TypeEventnDate of Event: $DateEventn Additional: $Additionaln";
$eLog="/tmp/mailError.log";
//Get the size of the error log
//ensure it exists, create it if it doesn't
$fh= fopen($eLog, "a+");
fclose($fh);
$originalsize = filesize($eLog);
mail ($to, "Website Email", $message);
/*
* NOTE: PHP caches file status so we need to clear
* that cache so we can get the current file size
*/
clearstatcache();
$finalsize = filesize($eLog);
//Check if the error log was just updated
if ($originalsize != $finalsize) {
print "<div class='alertthree'>There was a problem sending the mail. Please try again later or send the message to<a href="$to">$to</a> using your own mail client progam.</div>";
} else {
echo "<div class='alerttwo'>Thank you for your interest in The Brocade Blackbird. You will be contacted shortly.</div> <img src='Consultation_BlueBox.jpg' />";
}
}
?>
</body>
</html>
No comments posted yet
Your Answer:
Login to answer
178
18
Other forums
How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a
Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...
Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site
upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t
Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website
first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see
Php - mysql store data and use it later?
Hi, i' making a login page at the moment, however my username + password is stored many different pl
fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and
How to pass parameter to tag query?
Hi,
I want to get the value of a tag at a specific time (like 10/27/09 15:29:59), I need to giv
How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.
I have a form with several drop down me