PDA

View Full Version : Webform help



ff123
05-05-2008, 08:03 PM
im using a webform but there is one problem if i write text in text field and press ENTER button then the SEND IS UNSUCCESSFUL and if i press on Submit button then the send is Successful.. any solution?

djr33
05-05-2008, 10:13 PM
Very vague. Post actual details so we can help, and especially a link to your page will help.

ff123
05-05-2008, 11:17 PM
see at left bottom EMAIL UPDATES

Medyman
05-05-2008, 11:35 PM
im using a webform but there is one problem if i write text in text field and press ENTER button then the SEND IS UNSUCCESSFUL and if i press on Submit button then the send is Successful.. any solution?

Because you're not using a valid HTML form. You're using javascript to submit the form.


onClick="return checkmail(this.form.mail)"
That will only work onClick (i.e. when you click on it).

You have a ton of other problems on your page though. You should look into using CSS for your layout and making sure that your HTML is valid.

ff123
05-06-2008, 11:14 AM
ahan ok thanks :)

ff123
05-06-2008, 10:56 PM
one more problem im facing i changed the submit button to image and now the form is not sending email here is the php code that im using in php page any solution?

<?php
if(isset($_POST['submit'])) {
$to = "email here";
$subject = "Email Subscription";
$mail = $_POST['mail'];

$body = "E-Mail: $mail";

echo "Thank you for subscribing with You will be redirected to Home Page in 5 Seconds!";
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>

ff123
05-07-2008, 05:49 PM
help..........

MrRSMan
05-08-2008, 06:44 PM
I've just tried it and it works fine both by hitting enter, and by clicking the button.

Medyman
05-08-2008, 07:33 PM
one more problem im facing i changed the submit button to image and now the form is not sending email here is the php code that im using in php page any solution?

<?php
if(isset($_POST['submit'])) {
$to = "email here";
$subject = "Email Subscription";
$mail = $_POST['mail'];

$body = "E-Mail: $mail";

echo "Thank you for subscribing with You will be redirected to Home Page in 5 Seconds!";
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>

Did you name it submit?


<input type="image" name="submit" src="image.jpg" />

ff123
05-08-2008, 08:25 PM
@ MrRSMan : dear you tried Contact form i was talking about the form on main page..

@ Medyman : i fixed that problem. anyway thanks...