473,763 Members | 3,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form not submitting in firefox?

6 New Member
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
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <style type="text/css">
  3. <!--
  4. .style10 {color: #6A3292}
  5. .style9 {font-size: 12px}
  6. -->
  7. </style>
  8. <form action="email.php" method="post">
  9. <body>
  10.   <table width="423" border="0" align="left" cellpadding="3" cellspacing="0">
  11.     <tr>
  12.       <td width="91">Event Date:</td>
  13.       <td width="195"><label>
  14.         <select name="eventDate" id="eventDate">
  15.           <option value="2008-3-18">2008-3-18</option>
  16.               </select>
  17.       </label></td>
  18.       <td width="119">&nbsp;</td>
  19.     </tr>
  20.     <tr>
  21.       <td>Venue:</td>
  22.       <td><select name="venueName" id="venueName">
  23.         <option value="Aura">Aura</option>
  24.                   </select></td>
  25.       <td>&nbsp;</td>
  26.     </tr>
  27.     <tr>
  28.       <td>Fullname:</td>
  29.       <td><input type="text" name="fullName" maxlength="50" id="fullName" /></td>
  30.       <td>&nbsp;</td>
  31.     </tr>
  32.     <tr>
  33.       <td>E-mail</td>
  34.       <td><input type="text" name="emailAddress" maxlength="50" id="emailAddress" /></td>
  35.       <td>&nbsp;</td>
  36.     </tr>
  37.     <tr>
  38.       <td height="31">Guests:</td>
  39.       <td><label>
  40.         <textarea name="guests" id="guests" cols="30" rows="5">Fullname, E-mail</textarea>
  41.       </label></td>
  42.       <td>&nbsp;</td>
  43.     </tr>
  44.  
  45.     <tr>
  46.       <td>Mobile:</td>
  47.       <td><input type="text" name="mobile" maxlength="50" /></td>
  48.       <td>&nbsp;</td>
  49.     </tr>
  50.     <tr>
  51.       <td>Table:</td>
  52.       <td><label>
  53.         <select name="table" size="1" id="table">
  54.           <option value="no" selected>No</option>
  55.           <option value="Yes">Yes</option>
  56.                                 </select>
  57.       </label></td>
  58.       <td>&nbsp;</td>
  59.     </tr>
  60.     <tr>
  61.       <td colspan="2" align="right"><a href="index.php" class="style10">
  62.         <input name="Submit" type="submit" value="Submit!" />
  63.         </a></td>
  64.     </tr>
  65.   </table>
  66. </form>
  67. </body>
  68. </html>
  69.  
Email.php
Expand|Select|Wrap|Line Numbers
  1.  <?php
  2.       error_reporting(E_ALL);
  3.       ini_set('display_errors', true);
  4.  
  5.       //  Rest of the PHP code
  6.       mysql_query($query, $link_id) or die('<hr />MySQL Error: ' .mysql_error(). '<hr />');
  7. ?>
  8. <?php
  9.  
  10. // Receiving variables
  11. @$pfw_ip= $_SERVER['REMOTE_ADDR'];
  12. @$eventDate = addslashes($_POST['eventDate']);
  13. @$venueName = addslashes($_POST['venueName']);
  14. @$fullName = addslashes($_POST['fullName']);
  15. @$emailAddress = addslashes($_POST['emailAddress']);
  16. @$guests = addslashes($_POST['guests']);
  17. @$mobile = addslashes($_POST['mobile']);
  18. @$table = addslashes($_POST['table']);
  19.  
  20. // Validation
  21. //Sending Email to form owner
  22. $pfw_header = "From: $emailAddress\n"
  23.   . "Reply-To: $emailAddress\n";
  24. $pfw_subject = " $eventDate - $venueName";
  25. $pfw_email_to = "vip@aaaaaa.com";
  26. $pfw_message = "Visitor's IP: $pfw_ip\n"
  27. . "Date: $eventDate\n"
  28. . "Venue: $venueName\n"
  29. . "FullName: $fullName\n"
  30. . "Email: $emailAddress\n"
  31. . "Guests:\n$guests\n"
  32. . "Mobile: $mobile\n"
  33. . "Table: $table\n";
  34. @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
  35.  
  36. //Sending auto respond Email to visitor
  37. $pfw_header = "From: vip@v-parties.com\n"
  38.   . "Reply-To: vip@aaaa.com\n";
  39. $pfw_subject = "aaaaaa.Com  - $venueName";
  40. $pfw_email_to = "$emailAddress";
  41. $pfw_message = "Submitted\n"
  42. . "\n"
  43. . "Venue: $venueName\n"
  44. . "Date: $eventDate";
  45. @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
  46.  
  47. //saving record in a text file
  48. $pfw_file_name = "Data.csv";
  49. $pfw_first_raw = "fullName,emailAddress,guests,mobile\r\n";
  50. $pfw_values = "$fullName,$emailAddress,".str_replace ("\r\n","<BR>",$guests ).",$mobile\r\n";
  51. $pfw_is_first_row = false;
  52. if(!file_exists($pfw_file_name))
  53. {
  54.  $pfw_is_first_row = true ;
  55. }
  56. if (!$pfw_handle = fopen($pfw_file_name, 'a+')) {
  57.  die("Cannot open file ($pfw_file_name)");
  58.  exit;
  59. }
  60. if ($pfw_is_first_row)
  61. {
  62.   if (fwrite($pfw_handle, $pfw_first_raw ) === FALSE) {
  63.   die("Cannot write to file ($pfw_filename)");
  64.   exit;
  65.   }
  66. }
  67. if (fwrite($pfw_handle, $pfw_values) === FALSE) {
  68.   die("Cannot write to file ($pfw_filename)");
  69.   exit;
  70. }
  71. fclose($pfw_handle);
  72.  
  73.  echo("Submitted");
  74. ?>
  75.  
  76.  
Feb 12 '08 #1
4 2251
ronverdonk
4,258 Recognized Expert Specialist
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
Feb 13 '08 #2
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
Feb 13 '08 #3
bleachie
6 New Member
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.
Feb 13 '08 #4
ronverdonk
4,258 Recognized Expert Specialist
It is exactly as nathj says, IE parses differently from FF. Anyway, it is fixed.

Ronald
Feb 13 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
4605
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...
4
2822
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...
8
5732
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"
8
17886
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)
4
13564
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
8
12728
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 == "%")) {
11
3000
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...
18
13145
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() {
12
6953
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
1
1210
Claus Mygind
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.");
0
10003
jinu1996
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...
0
8825
agi2029
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...
1
7370
isladogs
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...
0
6643
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();...
0
5271
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...
0
5410
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3918
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
2
3529
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2797
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.