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 Like 18 Dislike
Previous forums Next forums
Other forums

Pass sql into pl/sql and create RMAN duplicate script.
Hi,

I'm new to pl/sql and I'm trying to write a script that will generate some RMAN comma

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following col

remove innitial

and

tags
i am using tiny_mce as a text editor for my CMS.
buy now the problem is it add <p>

Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot

Accessing Infotype data in dialog program
Hi All
In Dialog programs attributes I didn't see any logical database field. How can I access

Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this

How to make a input/output field with multiple lines
Hello.
I put a input/output field on the screen but I could not change height of it. I need to

How do I know when getBounds Method is ready to be called.
I have an application that changes out stylesheets client side. Once I change stylesheet the browse

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash