 |
|
 |
|
Next: OK
|
| Author |
Message |
External

Since: Nov 17, 2007 Posts: 227
|
(Msg. 1) Posted: Mon Feb 04, 2008 9:51 pm
Post subject: Problems with email forms and IE Archived from groups: alt>php (more info?)
|
|
|
i have tried this submiting this for with IE7 and IE6 and it doesn't
work, but it does with firefox.
any help will be really appreciated.
//process.php
<?php
if (isset($_POST['submit'])){
$name=trim($_POST['name']);
$company=trim($_POST['company']);
$email=trim($_POST['email']);
$comments=$_POST['comments'];
$to="myaddress@home.com";
$dia=date("l \- d F Y - H:i:s T");
$message="Name:\n $name \n\nCompany:\n $company \n\ne-mail:\n $email
\n\nComments:\n $comments\n\nDate:\n $dia";
if (!$name||!$email){
echo "<p>please fill-out the required fields</p>";
}else{
if(mail($to,"inquire from my website",$message,"From:
$name <$email>\n")) {
echo "<p>thank you for sending the form.</p>";
} else {
echo "<p>there was a problem sending the
form.</p>";
}
}
} //end if submit
?>
and the html form which is in a different file.
<form id="contact" method="post" action="process.php">
<fieldset>
<table cellpadding="10"><tr> <td> <label for="name">
<span>name</span> </td><td> <input type="text" name="name"
id="name" />
</label>
</td></tr>
<tr> <td>
<label for="company"> <span>company</span> </td><td> <input
type="text" name="company" id="company" />
</label>
</td></tr>
<tr> <td>
<label for="email"> <span>email</span> </td><td> <input type="text"
name="email" id="email" />
</label>
</td></tr>
<tr> <td>
<label for="comments">
<span>comments</span></td><td>
<textarea name="comments" cols="20" rows="5" wrap="soft"></textarea>
</label>
</td></tr>
<tr><td colspan="2" align="center">
<?php echo "<p>".$mensaje."</p>"; ?>
<span><input name="submit" type="image" id="submit" value="submit"
src="images/submit.png"></span>
</td></tr>
</table>
</fieldset>
</form> >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
External

Since: Aug 11, 2004 Posts: 1367
|
(Msg. 2) Posted: Mon Feb 04, 2008 11:07 pm
Post subject: Re: Problems with email forms and IE [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
NN wrote:
> i have tried this submiting this for with IE7 and IE6 and it doesn't
> work, but it does with firefox.
> any help will be really appreciated.
>
> //process.php
> <?php
>
> if (isset($_POST['submit'])){
>
> $name=trim($_POST['name']);
> $company=trim($_POST['company']);
> $email=trim($_POST['email']);
> $comments=$_POST['comments'];
> $to="myaddress@home.com";
> $dia=date("l \- d F Y - H:i:s T");
> $message="Name:\n $name \n\nCompany:\n $company \n\ne-mail:\n $email
> \n\nComments:\n $comments\n\nDate:\n $dia";
>
> if (!$name||!$email){
> echo "<p>please fill-out the required fields</p>";
> }else{
> if(mail($to,"inquire from my website",$message,"From:
> $name <$email>\n")) {
> echo "<p>thank you for sending the form.</p>";
> } else {
> echo "<p>there was a problem sending the
> form.</p>";
> }
> }
>
> } //end if submit
> ?>
>
>
> and the html form which is in a different file.
>
> <form id="contact" method="post" action="process.php">
> <fieldset>
> <table cellpadding="10"><tr> <td> <label for="name">
> <span>name</span> </td><td> <input type="text" name="name"
> id="name" />
> </label>
> </td></tr>
>
> <tr> <td>
> <label for="company"> <span>company</span> </td><td> <input
> type="text" name="company" id="company" />
> </label>
>
> </td></tr>
>
> <tr> <td>
> <label for="email"> <span>email</span> </td><td> <input type="text"
> name="email" id="email" />
> </label>
>
> </td></tr>
> <tr> <td>
> <label for="comments">
> <span>comments</span></td><td>
> <textarea name="comments" cols="20" rows="5" wrap="soft"></textarea>
> </label>
>
>
> </td></tr>
> <tr><td colspan="2" align="center">
> <?php echo "<p>".$mensaje."</p>"; ?>
> <span><input name="submit" type="image" id="submit" value="submit"
> src="images/submit.png"></span>
>
>
>
>
> </td></tr>
> </table>
> </fieldset>
> </form>
>
>
What do you mean by "doesn't work"?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex.TakeThisOut@attglobal.net
================== >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
External

Since: Nov 17, 2007 Posts: 227
|
(Msg. 3) Posted: Tue Feb 05, 2008 7:59 am
Post subject: Re: Problems with email forms and IE [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Mon, 04 Feb 2008 23:07:32 -0500, Jerry Stuckle
wrote:
it doesn't send the mail form and it doesn't post any of the echo
messages either, on failure or on success.
i'll try changing the html form today and taking off the <fieldset>
id, etc and see if that changes anything. this is the first time that
i have such a problem. it puzzling since the form works perfectly with
mozilla.
thanks
NN
>NN wrote:
>> i have tried this submiting this for with IE7 and IE6 and it doesn't
>> work, but it does with firefox.
>> any help will be really appreciated.
>>
>> //process.php
>> <?php
>>
>> if (isset($_POST['submit'])){
>>
>> $name=trim($_POST['name']);
>> $company=trim($_POST['company']);
>> $email=trim($_POST['email']);
>> $comments=$_POST['comments'];
>> $to="myaddress@home.com";
>> $dia=date("l \- d F Y - H:i:s T");
>> $message="Name:\n $name \n\nCompany:\n $company \n\ne-mail:\n $email
>> \n\nComments:\n $comments\n\nDate:\n $dia";
>>
>> if (!$name||!$email){
>> echo "<p>please fill-out the required fields</p>";
>> }else{
>> if(mail($to,"inquire from my website",$message,"From:
>> $name <$email>\n")) {
>> echo "<p>thank you for sending the form.</p>";
>> } else {
>> echo "<p>there was a problem sending the
>> form.</p>";
>> }
>> }
>>
>> } //end if submit
>> ?>
>>
>>
>> and the html form which is in a different file.
>>
>> <form id="contact" method="post" action="process.php">
>> <fieldset>
>> <table cellpadding="10"><tr> <td> <label for="name">
>> <span>name</span> </td><td> <input type="text" name="name"
>> id="name" />
>> </label>
>> </td></tr>
>>
>> <tr> <td>
>> <label for="company"> <span>company</span> </td><td> <input
>> type="text" name="company" id="company" />
>> </label>
>>
>> </td></tr>
>>
>> <tr> <td>
>> <label for="email"> <span>email</span> </td><td> <input type="text"
>> name="email" id="email" />
>> </label>
>>
>> </td></tr>
>> <tr> <td>
>> <label for="comments">
>> <span>comments</span></td><td>
>> <textarea name="comments" cols="20" rows="5" wrap="soft"></textarea>
>> </label>
>>
>>
>> </td></tr>
>> <tr><td colspan="2" align="center">
>> <?php echo "<p>".$mensaje."</p>"; ?>
>> <span><input name="submit" type="image" id="submit" value="submit"
>> src="images/submit.png"></span>
>>
>>
>>
>>
>> </td></tr>
>> </table>
>> </fieldset>
>> </form>
>>
>>
>
>What do you mean by "doesn't work"? >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
External

Since: Aug 11, 2004 Posts: 1367
|
(Msg. 4) Posted: Tue Feb 05, 2008 1:52 pm
Post subject: Re: Problems with email forms and IE [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
NN wrote:
> On Mon, 04 Feb 2008 23:07:32 -0500, Jerry Stuckle
> wrote:
>> NN wrote:
>>> i have tried this submiting this for with IE7 and IE6 and it doesn't
>>> work, but it does with firefox.
>>> any help will be really appreciated.
>>>
>>> //process.php
>>> <?php
>>>
>>> if (isset($_POST['submit'])){
>>>
>>> $name=trim($_POST['name']);
>>> $company=trim($_POST['company']);
>>> $email=trim($_POST['email']);
>>> $comments=$_POST['comments'];
>>> $to="myaddress@home.com";
>>> $dia=date("l \- d F Y - H:i:s T");
>>> $message="Name:\n $name \n\nCompany:\n $company \n\ne-mail:\n $email
>>> \n\nComments:\n $comments\n\nDate:\n $dia";
>>>
>>> if (!$name||!$email){
>>> echo "<p>please fill-out the required fields</p>";
>>> }else{
>>> if(mail($to,"inquire from my website",$message,"From:
>>> $name <$email>\n")) {
>>> echo "<p>thank you for sending the form.</p>";
>>> } else {
>>> echo "<p>there was a problem sending the
>>> form.</p>";
>>> }
>>> }
>>>
>>> } //end if submit
>>> ?>
>>>
>>>
>>> and the html form which is in a different file.
>>>
>>> <form id="contact" method="post" action="process.php">
>>> <fieldset>
>>> <table cellpadding="10"><tr> <td> <label for="name">
>>> <span>name</span> </td><td> <input type="text" name="name"
>>> id="name" />
>>> </label>
>>> </td></tr>
>>>
>>> <tr> <td>
>>> <label for="company"> <span>company</span> </td><td> <input
>>> type="text" name="company" id="company" />
>>> </label>
>>>
>>> </td></tr>
>>>
>>> <tr> <td>
>>> <label for="email"> <span>email</span> </td><td> <input type="text"
>>> name="email" id="email" />
>>> </label>
>>>
>>> </td></tr>
>>> <tr> <td>
>>> <label for="comments">
>>> <span>comments</span></td><td>
>>> <textarea name="comments" cols="20" rows="5" wrap="soft"></textarea>
>>> </label>
>>>
>>>
>>> </td></tr>
>>> <tr><td colspan="2" align="center">
>>> <?php echo "<p>".$mensaje."</p>"; ?>
>>> <span><input name="submit" type="image" id="submit" value="submit"
>>> src="images/submit.png"></span>
>>>
>>>
>>>
>>>
>>> </td></tr>
>>> </table>
>>> </fieldset>
>>> </form>
>>>
>>>
>> What do you mean by "doesn't work"?
>
>
> it doesn't send the mail form and it doesn't post any of the echo
> messages either, on failure or on success.
>
> i'll try changing the html form today and taking off the <fieldset>
> id, etc and see if that changes anything. this is the first time that
> i have such a problem. it puzzling since the form works perfectly with
> mozilla.
>
> thanks
> NN
>
(Top posting fixed)
That's strange - the script shouldn't care about what browser is being
used. It's like the browsers are sending different data.
What's in the $_POST array when it works and doesn't work?
echo "<pre>\n";
print_r($_POST);
echo "</pre>\n";
near the top of your script.
P.S. Please don't top post. Thanks.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex DeleteThis @attglobal.net
================== >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
External

Since: Nov 17, 2007 Posts: 227
|
(Msg. 5) Posted: Tue Feb 05, 2008 4:06 pm
Post subject: Re: Problems with email forms and IE [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Tue, 05 Feb 2008 13:52:06 -0500, Jerry Stuckle
wrote:
thank you for your suggestion. i got the email form fixed.
now my login form doesn't work, even though the post variables seem to
be fine.
i get this on IE:
Array
(
[username] => ds
[password] => ds
[submit_x] => 72
[submit_y] => 15
)
and this on Firefox:
Array
(
[username] => bs
[password] => bs
[submit_x] => 67
[submit_y] => 13
[submit] => submit
)
it seems to me that the submit image is not working on IE.
i read that IE has problem posting forms when you use a PNG for a
button instead of the regular submit button.i tried a JPG, but it
didn't help either. it's good to know that at least the PHP code is
fine.
thank you again Jerry.
NN
PS what does Top Post mean? sorry about that. >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
External

Since: Nov 17, 2007 Posts: 227
|
(Msg. 6) Posted: Tue Feb 05, 2008 4:23 pm
Post subject: Re: Problems with email forms and IE [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Tue, 05 Feb 2008 13:52:06 -0500, Jerry Stuckle
wrote:
i just gave up with the image on IE. this works for some reason:
<input name="submit" type="submit" value="login">
and this doesn't
<input name="submit" type="image" value="submit"
src="images/submit.png">
itdoesn't have to do with the PHP code, but with IE...
thanks,
NN >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
External

Since: Aug 11, 2004 Posts: 1367
|
(Msg. 7) Posted: Tue Feb 05, 2008 6:06 pm
Post subject: Re: Problems with email forms and IE [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
NN wrote:
> On Tue, 05 Feb 2008 13:52:06 -0500, Jerry Stuckle
> wrote:
>
> thank you for your suggestion. i got the email form fixed.
>
> now my login form doesn't work, even though the post variables seem to
> be fine.
>
>
> i get this on IE:
> Array
> (
> [username] => ds
> [password] => ds
> [submit_x] => 72
> [submit_y] => 15
> )
>
>
> and this on Firefox:
>
> Array
> (
> [username] => bs
> [password] => bs
> [submit_x] => 67
> [submit_y] => 13
> [submit] => submit
> )
>
> it seems to me that the submit image is not working on IE.
>
>
> i read that IE has problem posting forms when you use a PNG for a
> button instead of the regular submit button.i tried a JPG, but it
> didn't help either. it's good to know that at least the PHP code is
> fine.
>
> thank you again Jerry.
>
> NN
>
>
> PS what does Top Post mean? sorry about that.
>
Yes, when you click on an image, IE doesn't consider it a "submit
button", where as other browsers do.
Top posting is posting before the response. This is bottom posting.
Normally you quote the relevant parts of the previous post and respond
after those comments (or, if the post is rather long, in the middle of
the comments). That's because most of us are reading this though
usenet, and there's no guarantee how long any message will stay on a
usenet server.
A. Because it interrupts the flow of the messages.
Q. Why is top posting bad?
A. Top posting.
Q. What's the most annoying thing on usenet?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex DeleteThis @attglobal.net
================== >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
External

Since: Aug 11, 2004 Posts: 1367
|
(Msg. 8) Posted: Fri Feb 08, 2008 3:48 pm
Post subject: Re: Problems with email forms and IE [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
NN wrote:
> On Tue, 05 Feb 2008 13:52:06 -0500, Jerry Stuckle
> wrote:
>
>
> i just gave up with the image on IE. this works for some reason:
> <input name="submit" type="submit" value="login">
>
> and this doesn't
> <input name="submit" type="image" value="submit"
> src="images/submit.png">
>
> itdoesn't have to do with the PHP code, but with IE...
>
> thanks,
>
> NN
>
One other thing you could do - set up a hidden field with name=submit
and value=submit. Then the image would wok on either.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex DeleteThis @attglobal.net
================== >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
External

Since: Apr 11, 2007 Posts: 2
|
(Msg. 9) Posted: Fri Feb 08, 2008 5:04 pm
Post subject: Re: Problems with email forms and IE [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
<button type='submit'><Img src='../blah/blah/logo.jpg'></button>
top posting, an ideal way to annoy retentives
--
If at first you dont succeed
try try try again
If at first you do succeed
try not to look surprised
_
"NN" wrote in message
> On Tue, 05 Feb 2008 13:52:06 -0500, Jerry Stuckle
> wrote:
>
>
> i just gave up with the image on IE. this works for some reason:
> <input name="submit" type="submit" value="login">
>
> and this doesn't
> <input name="submit" type="image" value="submit"
> src="images/submit.png">
>
> itdoesn't have to do with the PHP code, but with IE...
>
> thanks,
>
> NN >> Stay informed about: Problems with email forms and IE |
|
| Back to top |
|
 |  |
| Related Topics: | Using pop3.class.inc to read email server + retrieve new e.. - Hello, use pop3.class.inc found here (http://www.phpclasses.org/ browse/file/3925.html) to connect to my email server and to retrieve new emails. The function also look at attachment and save the file on a folder. Problem, the image files copied on the....
Two forms - I have two forms on one page. In Form A I have drop-down list (single selection). When I click a submit button in form B, I would like to pick up the value showing in the drop down list of Form A. Can this be done? The reason for separating the two...
Is it possible to submit two forms at a time - Hi All, I need a small clarification in submitting the forms, Ur suggestions please. In a page I have two form and also two submit butons. (ie) <form name="myform" action="test.php" method="post" > ...
Using 'Mouse Up' Click in Forms in Queries - Is it possible to use a 'mouse up' click in forms where if you have for example, a drop down menu where you might click as the top selection, an equipment area (hard coded into the form), the type of equipment (a selection of 3 items again hard coded int...
recommendations for spell check for web forms - I have tried and tried and can not get aspell to install since my host will not allow me to compile programs. Without telling me to get a new host - which I plan - please recommend a web form spell checker that can easily be installed and check with.. |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|