| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Nov 2004 Location: Greece
Posts: 2,198
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Problem with PHP i wanna create a website that someone add domains and e-mail and then i send him appraisal so i created this code: this is index.htm page Code: <html>
<head>
<title>dnValley</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div align="center">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><a href="index.htm"><img src="logito.gif" width="350" height="77" alt="dnValley" border="0"></a>
</p>
<p>
<FORM action="submit.php" method="POST">
<textarea name="domains" cols="50" rows="5">Add here the domain names, the domain names must be yours, we don't have time doing appraisals for domains just for your fun. Please don't add more than 25 domains in this text box and per day.</textarea>
<br>
<input type="text" name="email" value="Insert here your e-mail here" size="30">
<p></p>
<p>
<input type="submit" name="Submit" value="Do the appraisals...">
</FORM>
<p></p>
</div>
</body>
</html> ????: NamePros.com http://www.namepros.com/programming/120454-problem-with-php.html Code: <html> <head> <title>dnValley</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div align="center"><br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <img src="submitting.gif" width="416" height="91"> </div> <?php $msg .= "Domain Names: $_POST[domains]\n"; $msg .= "E-mail: $POST[email]\n"; $recipient .= "email@gmail.com"; $subject = "From dnValley"; mail ($recipient, $subject, $msg); ?> </body> </html> you can see it here: www.dnvalley.com |
| |
| | #2 (permalink) |
| Account Closed Join Date: Jul 2005
Posts: 176
![]() | I'm not sure but try adding tick marks (') to the $_POST array variables Code: $msg .= "Domain Names: $_POST['domains']\n"; $msg .= "E-mail: $POST['email']\n"; Code: $msg .= 'Domain Names: ' . $_POST['domains'] . '\n'; $msg .= 'E-mail: ' . $POST['email'] . '\n'; |
| |
| | #3 (permalink) |
| NamePros Regular Join Date: Jun 2004
Posts: 587
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | monRa: I see two errors: PHP Code: PHP Code: The second error that I see is: PHP Code: PHP Code: -Bob
__________________ Can't wait to be out of this forsaken business. Getting close! :) |
| |
| | #4 (permalink) |
| Senior Member Join Date: Jul 2005 Location: NJ
Posts: 1,219
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | also, hopefully ur host supports php mail() function because some hosts are evil and dont lol
__________________ Hacksar.com - Your source for random computer tips and tricks! MySiteMemberships.com - Keep track of your site registration information! Like my post? Rep is appreciated! |
| |
| | #6 (permalink) |
| NamePros Regular Join Date: Aug 2005
Posts: 214
![]() | Post your current code after the changes, so we can see where you stand now. Also, are you getting any error messages, or is it all completing fine and just not getting the email?
__________________ OnlineGames.net |
| |
| | THREAD STARTER #8 (permalink) |
| Senior Member Join Date: Nov 2004 Location: Greece
Posts: 2,198
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | ok I moved to a new host but nothing happens again, i don't egt an mail. Here is the code(with the changes done with your help): submit.php Code: <html> <head> <title>dnValley</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div align="center"><br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <img src="submitting.gif" width="416" height="91"> </div> <?php $msg .= 'Domain Names: ' . $_POST['domains'] . '\n'; $msg .= 'E-mail: ' . $POST['email'] . '\n'; $recipient .= "dnvalley@gmail.com"; $subject = "From dnValley"; mail($recipient, $subject, $msg); ?> </body> </html> ????: NamePros.com http://www.namepros.com/showthread.php?t=120454 Code: <html>
<head>
<title>dnValley</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div align="center">
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p><a href="index.htm"><img src="logito.gif" width="350" height="77" alt="dnValley" border="0"></a>
</p>
<p>
<FORM action="submit.php" method="POST">
<textarea name="domains" cols="50" rows="5">Add here the domain names, the domain names must be yours, we don't have time doing appraisals for domains just for your fun. Please don't add more than 25 domains in this text box and per day.</textarea>
<br>
<input type="text" name="email" value="Insert here your e-mail here" size="30">
<p></p>
<p>
<input type="submit" name="Submit" value="Do the appraisals...">
</FORM>
<p></p>
</div>
</body>
</html> |
| |
| | #11 (permalink) |
| Senior Member Join Date: Mar 2005
Posts: 4,948
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Try this for submit.php I aslo added to where the email is checked for validation. ![]() PHP Code: |
| |
| | THREAD STARTER #13 (permalink) |
| Senior Member Join Date: Nov 2004 Location: Greece
Posts: 2,198
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | I found the problem, thanks for your code SecondVersion, i tried your code but still didn't worked so i thought of another problem, expect i have changed host and nameservers i was still hosted at atspace ;( I know deleted my account at atspace(free one) but seems there is aproblem in ahost i have bought from a member at these forums ;( Will post for other news, sorry i didn't know my domain hasn't moved host as the nameservers was changed time ago |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Getting started with PHP (The Basics) | deadserious | Webmaster Tutorials | 60 | 11-17-2007 12:35 PM |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 10:09 AM |
| PHP form problem | mikeboy99 | Programming | 1 | 06-16-2004 08:07 AM |
| Problem with PHP and preloading images? | crEA-tEch | Programming | 3 | 08-05-2003 12:05 PM |