Hi,
My e-mail form seems to work fine in IE7 but doesn't work in FireFox2.0 - it just goes to the index.php instead of echoing the completed message.
Hope someone can help me out. Form.html - <html>
-
<style type="text/css">
-
<!--
-
.style10 {color: #6A3292}
-
.style9 {font-size: 12px}
-
-->
-
</style>
-
<form action="email.php" method="post">
-
<body>
-
<table width="423" border="0" align="left" cellpadding="3" cellspacing="0">
-
<tr>
-
<td width="91">Event Date:</td>
-
<td width="195"><label>
-
<select name="eventDate" id="eventDate">
-
<option value="2008-3-18">2008-3-18</option>
-
</select>
-
</label></td>
-
<td width="119"> </td>
-
</tr>
-
<tr>
-
<td>Venue:</td>
-
<td><select name="venueName" id="venueName">
-
<option value="Aura">Aura</option>
-
</select></td>
-
<td> </td>
-
</tr>
-
<tr>
-
<td>Fullname:</td>
-
<td><input type="text" name="fullName" maxlength="50" id="fullName" /></td>
-
<td> </td>
-
</tr>
-
<tr>
-
<td>E-mail</td>
-
<td><input type="text" name="emailAddress" maxlength="50" id="emailAddress" /></td>
-
<td> </td>
-
</tr>
-
<tr>
-
<td height="31">Guests:</td>
-
<td><label>
-
<textarea name="guests" id="guests" cols="30" rows="5">Fullname, E-mail</textarea>
-
</label></td>
-
<td> </td>
-
</tr>
-
-
<tr>
-
<td>Mobile:</td>
-
<td><input type="text" name="mobile" maxlength="50" /></td>
-
<td> </td>
-
</tr>
-
<tr>
-
<td>Table:</td>
-
<td><label>
-
<select name="table" size="1" id="table">
-
<option value="no" selected>No</option>
-
<option value="Yes">Yes</option>
-
</select>
-
</label></td>
-
<td> </td>
-
</tr>
-
<tr>
-
<td colspan="2" align="right"><a href="index.php" class="style10">
-
<input name="Submit" type="submit" value="Submit!" />
-
</a></td>
-
</tr>
-
</table>
-
</form>
-
</body>
-
</html>
-
Email.php -
<?php
-
error_reporting(E_ALL);
-
ini_set('display_errors', true);
-
-
// Rest of the PHP code
-
mysql_query($query, $link_id) or die('<hr />MySQL Error: ' .mysql_error(). '<hr />');
-
?>
-
<?php
-
-
// Receiving variables
-
@$pfw_ip= $_SERVER['REMOTE_ADDR'];
-
@$eventDate = addslashes($_POST['eventDate']);
-
@$venueName = addslashes($_POST['venueName']);
-
@$fullName = addslashes($_POST['fullName']);
-
@$emailAddress = addslashes($_POST['emailAddress']);
-
@$guests = addslashes($_POST['guests']);
-
@$mobile = addslashes($_POST['mobile']);
-
@$table = addslashes($_POST['table']);
-
-
// Validation
-
//Sending Email to form owner
-
$pfw_header = "From: $emailAddress\n"
-
. "Reply-To: $emailAddress\n";
-
$pfw_subject = " $eventDate - $venueName";
-
$pfw_email_to = "vip@aaaaaa.com";
-
$pfw_message = "Visitor's IP: $pfw_ip\n"
-
. "Date: $eventDate\n"
-
. "Venue: $venueName\n"
-
. "FullName: $fullName\n"
-
. "Email: $emailAddress\n"
-
. "Guests:\n$guests\n"
-
. "Mobile: $mobile\n"
-
. "Table: $table\n";
-
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
-
-
//Sending auto respond Email to visitor
-
$pfw_header = "From: vip@v-parties.com\n"
-
. "Reply-To: vip@aaaa.com\n";
-
$pfw_subject = "aaaaaa.Com - $venueName";
-
$pfw_email_to = "$emailAddress";
-
$pfw_message = "Submitted\n"
-
. "\n"
-
. "Venue: $venueName\n"
-
. "Date: $eventDate";
-
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
-
-
//saving record in a text file
-
$pfw_file_name = "Data.csv";
-
$pfw_first_raw = "fullName,emailAddress,guests,mobile\r\n";
-
$pfw_values = "$fullName,$emailAddress,".str_replace ("\r\n","<BR>",$guests ).",$mobile\r\n";
-
$pfw_is_first_row = false;
-
if(!file_exists($pfw_file_name))
-
{
-
$pfw_is_first_row = true ;
-
}
-
if (!$pfw_handle = fopen($pfw_file_name, 'a+')) {
-
die("Cannot open file ($pfw_file_name)");
-
exit;
-
}
-
if ($pfw_is_first_row)
-
{
-
if (fwrite($pfw_handle, $pfw_first_raw ) === FALSE) {
-
die("Cannot write to file ($pfw_filename)");
-
exit;
-
}
-
}
-
if (fwrite($pfw_handle, $pfw_values) === FALSE) {
-
die("Cannot write to file ($pfw_filename)");
-
exit;
-
}
-
fclose($pfw_handle);
-
-
echo("Submitted");
-
?>
-
-
4 2220
What would you like to accomplish with the following statement
[php]<td colspan="2" align="right"><a href="index.php" class="style10">
<input name="Submit" type="submit" value="Submit!" />
</a></td>
[/php]
Do you want to submit the form or do you want to jump to index.php? Pick one.
Ronald
What would you like to accomplish with the following statement
[php]<td colspan="2" align="right"><a href="index.php" class="style10">
<input name="Submit" type="submit" value="Submit!" />
</a></td>
[/php]
Do you want to submit the form or do you want to jump to index.php? Pick one.
Ronald
Good catch ronverdonk, I had to read the code a few times to get that.
It seems IE7 has parsed the code and decided it's a submit button after all and FF has parsed it and decide it's really a link.
It can't be both.
nathj
Good catch ronverdonk, I had to read the code a few times to get that.
It seems IE7 has parsed the code and decided it's a submit button after all and FF has parsed it and decide it's really a link.
It can't be both.
nathj
ahhhh!! thanks guys :) - my mistake.
It is exactly as nathj says, IE parses differently from FF. Anyway, it is fixed.
Ronald
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Tyler Style |
last post by:
Hullo - looking for a little advice here. I have a form on a page in one
domain submitting to a cgi in another domain. Weirdly, on some Windows XP
systems, a form on the page fails to submit/post...
|
by: John Fereira |
last post by:
So, one of the limitations of multipart-form handling is that when an <input
type="file" ..> tag is used it will bring up a window which allows a user to
select a file for upload but won't allow...
|
by: Adam |
last post by:
Hey,
I'm using JS to submit a form with image submit buttons, using the
following code...
(Page is here... http://www.cards2do.co.uk/addcard.php?card_id=292 )
...
|
by: Ed Jay |
last post by:
Is there a way to use 'document.form.submit()' to submit a form to a url
other than that specified in the Form element?
--
Ed Jay (remove M to respond by email)
|
by: sameergn |
last post by:
Hi,
I have an image in my HTML form which has onclick() handler. There is
also a submit button and a text box.
Whenever text box has focus and user presses enter, the onclick() event
of...
|
by: nektir |
last post by:
I have an external js file to validate a form and it works in IE and
Opera, but not Mozilla Firefox.
In Mozilla Firefox, the javascript console sasys "SearchForm" is not
defined in the second...
|
by: Rik |
last post by:
Hello guys,
now that I'm that I'm working on my first major 'open' forms (with
uncontrolled users I mean, not a secure backend-interface), I'd like to add
a lot of possibilities to check wether...
|
by: NavinM |
last post by:
I have a couple of forms that are misbehaving in FireFox, but work fine in IE.
when i do submit( with submit button) a javascript function validates all of the fields entered, and stops the...
|
by: Daniel Klein |
last post by:
I'm pretty new at php and web stuff so please be gentle with me.
I'm trying to get a form to submit when the user presses the Enter
key. I do not want to use javascript. I've googled this to...
|
by: Claus Mygind |
last post by:
I am having some trouble submitting a form in IE. Works fine with FireFox.
I have tried two methods.
method #1
function validateForm(form)
{
if (document.getElementById("NAME").value...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |