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 2251
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
nathj 938
Recognized Expert Contributor
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 properly to the cgi and
users get the message from IE that it "Cannot find server: The page cannot
be displayed The page you are looking for is currently unavailable. The Web
site might be experiencing technical difficulties, or you may need to...
|
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 the user to select multiple files.
As you may know, the tag produces a text input field with an adjacent button
for selecting a file from the local file system.
As I would like to be able to allow the user to upload an arbitrary number
of files...
|
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 )
**************************************************************************************
<form action="https://www.cards2do.co.uk/addcard.php" method="post"
|
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 image is fired with event.keyCode as undefined. I was expecting that
the form would get submitted.
I tried returning from onclick() handler if keyCode is null, but the
| |
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 line
function Valid() {
if ((SearchForm.FirstName.value == "") && (SearchForm.LastName.value
== "") && (SearchForm.Phone.value == "") && (SearchForm.Dept.value ==
"%")) {
|
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 certain fields match certain
criteria, and inform the user in different ways when the data is wrong
(offcourse, this will be checked on posting the data again, but that's
something I've got a lot of experience with).
Now, offcourse it's...
|
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 submission if there is an error.
Sample (obviously not working code):
<html>
<head>
<script type="text/javascript">
function Submit()
{
|
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 death and
cant find the answer (only hints), except on the 'Experts Exhange'
page and you have to pay to get the answer :-(
Why is this such a secret in the open source world we live in?
Daniel Klein
|
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 == "")
{
alert("You left the name blank.");
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |