HNX Posted December 11, 2007 Author Share Posted December 11, 2007 wait let me try Quote Link to comment Share on other sites More sharing options...
HNX Posted December 11, 2007 Author Share Posted December 11, 2007 Not Found The requested URL /< was not found on this server. Â Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.39 Server at mysite.net Port 80 Â same problem...:s Quote Link to comment Share on other sites More sharing options...
HNX Posted December 12, 2007 Author Share Posted December 12, 2007 shit joey i hope ur gonna reply tomorrow Lol Quote Link to comment Share on other sites More sharing options...
JacobYaYa Posted December 12, 2007 Share Posted December 12, 2007 bro could you do this at the top of your processing script just to see if there is some kind of wierd problem..post the output echo 'SERVER[phpSELF]: '.$_SERVER['PHP_SELF'].'<br />'; Quote Link to comment Share on other sites More sharing options...
HNX Posted December 12, 2007 Author Share Posted December 12, 2007 ok jacob, phpsensei and all the dudes that tried helping me here if my contact us form and php codings please make it work and post the link here afterwards thank YOU VERY MUCH Â Regards, HNX Â http://www.megaupload.com/?d=62MOL06W Quote Link to comment Share on other sites More sharing options...
mr_mind Posted December 12, 2007 Share Posted December 12, 2007 <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; if(mail($to,$subject,$message,$headers)) { echo "Thank you for your interest, your e-mail was sent."; } else { echo "form was not submitted"; } } else { print '<form action=' . $_SERVER['SCRIPT_NAME'] . ' method=post name=form1 id=form1>'; print '<table width="100%" border="0" cellspacing="1" cellpadding="3">'; print '<tr>'; print '<td width="16%"><span class="style108">Subject</span></td>'; print '<td width="2%"><span class="style104">:</span></td>'; print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Message</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Name</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="name" type="text" id="name" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Email</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td>Â </td>'; print '<td>Â </td>'; print '<td><input type="submit" name="Submit" value="Submit" />'; print '<input type="reset" name="Submit2" value="Reset" /></td>'; print '</tr>'; print '</table>'; print '</form>'; } ?> Quote Link to comment Share on other sites More sharing options...
HNX Posted December 12, 2007 Author Share Posted December 12, 2007 euh what am i supposed to do with this?? Â Please help, HNX Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 12, 2007 Share Posted December 12, 2007 euh what am i supposed to do with this?? Â Please help, HNX Â Every time someone shows you that script, you just delete your old one and put that one in. Â Quote Link to comment Share on other sites More sharing options...
HNX Posted December 12, 2007 Author Share Posted December 12, 2007 wow SENSEI!!! Lol ok so i delete the send mail file and replace it with this??? then i let the form the way it was before??? Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 12, 2007 Share Posted December 12, 2007 Oh brother lol.  Replace  <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; if(mail($to,$subject,$message,$headers)) { echo "Thank you for your interest, your e-mail was sent."; } else { echo "form was not submitted"; } } ?>  With  <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; if(mail($to,$subject,$message,$headers)) { echo "Thank you for your interest, your e-mail was sent."; } else { echo "form was not submitted"; } } else { print '<form action=' . $_SERVER['SCRIPT_NAME'] . ' method=post name=form1 id=form1>'; print '<table width="100%" border="0" cellspacing="1" cellpadding="3">'; print '<tr>'; print '<td width="16%"><span class="style108">Subject</span></td>'; print '<td width="2%"><span class="style104">:</span></td>'; print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Message</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Name</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="name" type="text" id="name" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Email</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td> </td>'; print '<td> </td>'; print '<td><input type="submit" name="Submit" value="Submit" />'; print '<input type="reset" name="Submit2" value="Reset" /></td>'; print '</tr>'; print '</table>'; print '</form>'; } ?> Quote Link to comment Share on other sites More sharing options...
HNX Posted December 12, 2007 Author Share Posted December 12, 2007 aight ill try it right away Quote Link to comment Share on other sites More sharing options...
HNX Posted December 12, 2007 Author Share Posted December 12, 2007 yo joey man this code does exactly the same thing as the other code...:s did u receive the link to my files for which i need the code?? maybe with them u could understand what i need... Lol  i wish u can fix the porblem Lol  Thanks though, HNX Quote Link to comment Share on other sites More sharing options...
HNX Posted December 12, 2007 Author Share Posted December 12, 2007 look what someone tells me to do on another forum  Submits the info to itself... PHP Code: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> Check if form has been submitted: PHP Code: <?php if(isset($_POST['form'])){ process stuff here... echo "Thank you for your feedback!"; }else{  display form } ?> Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 12, 2007 Share Posted December 12, 2007 look what someone tells me to do on another forum  Submits the info to itself... PHP Code: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> Check if form has been submitted: PHP Code: <?php if(isset($_POST['form'])){ process stuff here... echo "Thank you for your feedback!"; }else{  display form } ?>  thats what I told you to do.  Why didnt it work? Quote Link to comment Share on other sites More sharing options...
HNX Posted December 13, 2007 Author Share Posted December 13, 2007 euh wait i took the previous code that u gave me and saved it as send_mail.php and replaced it with the other. the other one when i clicked submit it brang me to a blank page sayin the msg was received and the recent code that u gave does the EXACT same thing however the code is longer so thats why i gave u the my send mail file AND my contact us file so that u can understand what i need and make the code  but anyway here is the link again  http://www.megaupload.com/?d=62MOL06W  Regards, HNX  and dude cant u give me ur email?? yes or no? Loll Quote Link to comment Share on other sites More sharing options...
HNX Posted December 13, 2007 Author Share Posted December 13, 2007 joey!! u know i could use some help here..... Â Â and did u learn php so that i could also learn it from there:D Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 13, 2007 Share Posted December 13, 2007 Hey buddy.  Sorry, I wasnt home all day, my account was still logged in but I wasnt here.  Alright, replace the old script i gave you with this  <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; if(mail($to,$subject,$message,$headers)) { echo "Thank you for your interest, your e-mail was sent."; } else { echo "form was not submitted"; } } else { print '<form action=' . $_SERVER['SCRIPT_NAME'] . ' method=post name=form1 id=form1>'; print '<table width="100%" border="0" cellspacing="1" cellpadding="3">'; print '<tr>'; print '<td width="16%"><span class="style108">Subject</span></td>'; print '<td width="2%"><span class="style104">:</span></td>'; print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Message</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Name</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="name" type="text" id="name" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Email</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td> </td>'; print '<td> </td>'; print '<td><input type="submit" name="Submit" value="Submit" />'; print '<input type="reset" name="Submit2" value="Reset" /></td>'; print '</tr>'; print '</table>'; print '</form>'; } ?> Quote Link to comment Share on other sites More sharing options...
HNX Posted December 13, 2007 Author Share Posted December 13, 2007 ok im trying it now and i hope ur reply will be ast Lol like the first time Loll  thanks, HNX Quote Link to comment Share on other sites More sharing options...
HNX Posted December 13, 2007 Author Share Posted December 13, 2007 it says "Form was not found" Â didnt u take a look at the megaupload link i gave?? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 13, 2007 Share Posted December 13, 2007 HMX - The script phpSensei works - do you have PHP enabled on your host; because I don't see why you keep having problems with a simple "contact us" form; especially when you have been provided with several examples. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 13, 2007 Share Posted December 13, 2007 try this, and also, make sure you delete send_ a  <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; if(mail($to,$subject,$message,$headers)) { echo "Thank you for your interest, your e-mail was sent."; } } else { print '<form action="" method=post name=form1 id=form1>'; print '<table width="100%" border="0" cellspacing="1" cellpadding="3">'; print '<tr>'; print '<td width="16%"><span class="style108">Subject</span></td>'; print '<td width="2%"><span class="style104">:</span></td>'; print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Message</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Name</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="name" type="text" id="name" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Email</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td> </td>'; print '<td> </td>'; print '<td><input type="submit" name="Submit" value="Submit" />'; print '<input type="reset" name="Submit2" value="Reset" /></td>'; print '</tr>'; print '</table>'; print '</form>'; } ?> Quote Link to comment Share on other sites More sharing options...
HNX Posted December 13, 2007 Author Share Posted December 13, 2007 yes i do ok wait sensei gave me a simple script and it was working fine but the only problemi had was that when i submited the information it went to a blank page tellin me that ur msg was received. instead i want it to load on the same page and then i tried replacing the files and everything he gave and told him what it tells,  and now i gave him my contact us form and my send_mail.php file so i thought he would understand more this way  and yes php is enabled  thanks, HNX Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 13, 2007 Share Posted December 13, 2007 yes i do ok wait sensei gave me a simple script and it was working fine but the only problemi had was that when i submited the information it went to a blank page tellin me that ur msg was received. instead i want it to load on the same page and then i tried replacing the files and everything he gave and told him what it tells,  and now i gave him my contact us form and my send_mail.php file so i thought he would understand more this way  and yes php is enabled  thanks, HNX  This will fix your problem  <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; if(mail($to,$subject,$message,$headers)) { echo "Thank you for your interest, your e-mail was sent."; } } print '<form action="" method=post name=form1 id=form1>'; print '<table width="100%" border="0" cellspacing="1" cellpadding="3">'; print '<tr>'; print '<td width="16%"><span class="style108">Subject</span></td>'; print '<td width="2%"><span class="style104">:</span></td>'; print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Message</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Name</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="name" type="text" id="name" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Email</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td> </td>'; print '<td> </td>'; print '<td><input type="submit" name="Submit" value="Submit" />'; print '<input type="reset" name="Submit2" value="Reset" /></td>'; print '</tr>'; print '</table>'; print '</form>'; ?> Quote Link to comment Share on other sites More sharing options...
HNX Posted December 13, 2007 Author Share Posted December 13, 2007 WOW!! joey we're almost there ok now when i submit using the new file everything works fine and this time the script brings me back to a blank page but this time instead i can see the form again....  all there is left to do is the repair the destination of the script, i mean not bringing me to a blank page  look at the site i found, i saw their contact page and thats the kind i need:s http://www.elico.ca/main.cfm?p=40&l=fr  thanks man, HNX Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted December 13, 2007 Share Posted December 13, 2007 <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; if(mail($to,$subject,$message,$headers)) { //echo "Thank you for your interest, your e-mail was sent."; Â Â Â Â Â Â Â Â Â Â Â Â header("Location: success.php"); // change "sucess.php" to the page you want them to be redirected to; if email is submitted successfully. Â Â Â Â Â Â Â Â Â Â Â Â exit; } } print '<form action="" method=post name=form1 id=form1>'; print '<table width="100%" border="0" cellspacing="1" cellpadding="3">'; print '<tr>'; print '<td width="16%"><span class="style108">Subject</span></td>'; print '<td width="2%"><span class="style104">:</span></td>'; print '<td width="82%"><input name="subject" type="text" id="subject" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Message</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Name</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="name" type="text" id="name" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td><span class="style108">Email</span></td>'; print '<td><span class="style104">:</span></td>'; print '<td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td>'; print '</tr>'; print '<tr>'; print '<td>Â </td>'; print '<td>Â </td>'; print '<td><input type="submit" name="Submit" value="Submit" />'; print '<input type="reset" name="Submit2" value="Reset" /></td>'; print '</tr>'; print '</table>'; print '</form>'; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.