![]() |
|
|||||||
| Register | FAQ | Members List | Arcade | Dev Directory | HB Bank | Calendar | Search | Today's Posts | Mark Forums Read |
| PHP, CGI, ASP, Server-Side Programming Discuss server-side programming such as PHP, CGI, ASP, and others. |
| Have A Look At Some Of Our Webmaster Related Sponsors! | |||||
![]() Script Directory |
![]() Advertise Here |
![]() Market Leverage |
![]() Free Templates |
![]() 3D Guide-characters |
![]() Advertise Here |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
New Hunter
|
well i created a contact us page with mail() function!! but something wrong's happening!:S i created an if/elseif statement to allow name, email... checking... and then i inserted if(mail(....)){echo"...."} but everytime i refresh the page an email is sent:S and without even writing anything in the text areas an alert appears saying( please enter you full name)!!! please any help would be appreciated! thanks!
__________________
Anthony.Riachy
|
|
|
|
|
|
#2 (permalink) |
|
New Hunter
|
Without having a deep look into your code all i can help is to direct you to this contact form tutorial, i hope it will give some useful idea about the solution.
__________________
custom eCommerce software development |
|
|
|
|
|
#3 (permalink) |
|
Senior Moderator
|
Post your whole code. And then provide us with a link to the site to test it out myself.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
|
|
|
#4 (permalink) |
|
New Hunter
|
<form method="post" action="contact_us.php"><font color="#FFFFFF"><?
$name=$_POST['name']; $email=$_POST['email']; $subject=$_POST['subject']; $txt=$_POST['txt']?> <? if (!$name){echo ("Please Insert Your Full Name") ; } elseif (!preg_match("/^.+?@.+?\..+?/i" , $email)){echo ("Please Enter A Correct Email"); } elseif (!$subject){echo (" Please Type a Subject"); } elseif(!$txt){echo("Please Write Your E-mail Text"); } ?> </font> <td width="144"><span class="style19"><u>Your Name:</u></span></td> <td width="278"><input type="text" name="name" /></td> </tr> <tr> <td><span class="style19"><u>Your E-mail:</u></span></td> <td><input type="text" name="email" /></td> </tr> <tr> </tr> <tr> <td><span class="style19"><u>Subject:</u></span></td> <td><input type="text" name="subject" /></td> </tr> <tr> <td height="111"><span class="style19"><u>Your Message:</u></span></td> <td><textarea style="width:17.5em; height:7em" name="txt"></textarea> </td> </tr> </table> <br /> <div align="center"><input type="submit" value="Send Message" /></div></form> <? $to="info@rz-group.com"; $headers .= 'From: $email' . "\r\n"; $headers .= 'Name: $name' . "\r\n";?><? if(mail($to,$subject,$txt,$headers)){ echo (" <div align='center'>Your message has successfully been sent, We'll try to get back to you as soon as possible. <br />");} else { echo("<div align=\'center\'>Your message couldn\'t be sent. Please try again at a later time. Thanks. </div><br />");} ?> Sorry inserting them into php and html tags wasnt working!:S hope u would helpo me!:D
__________________
Anthony.Riachy
|
|
|
|
|
|
#7 (permalink) |
|
Senior Moderator
|
Figuring something out your own is the best. Try not to go to forums unless you absolutely are stumped.
__________________
+-(X)HTML, CSS, JavaScript, SEO, PHP, Flash-+ Code:
<style type="text/css"> u { text-decoration: none; } </style>
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|