lnrcount Posted July 29, 2007 Share Posted July 29, 2007 Hi, Im new to all this but I'm learning fast. I'm tring to create a link exchange form for my new web site.The problem that I have is that I keep getting my error page even when all ths fields are filled out correctly. This is my form code. <form action="linkexchange.php" method="post"> <table border="0" cellpadding="8" cellspacing="8" summary="Link Exchange Form"> <tr><td>Your Name:</td><td><input type="text" name="name" size="25" /></td></tr> <tr><td>Email address:</td><td><input type="text" name="email" size="25" /></td></tr> <tr><td>Site Name:</td><td><input type="text" name="sitename" size="25" /></td></tr> <tr><td>Site URL:</td><td><input type="text" name="siteurl" size="25" /></td></tr> <tr><td>Reciprocal URL:</td><td><input type="text" name="recipurl" size="25" /></td></tr> <tr> <td colspan="2"> Description<br /> <textarea rows="15" cols="45" name="description"></textarea> </td> </tr> <tr> <td align="center" colspan="2"> <input type="submit" value="Send Request" /><br /> <a href="http://www.thesitewizard.com/">Powered by thesitewizard.com</a> </td> </tr> </table> </form> And this is the scrit that I have for it. <? // ------------- CONFIGURABLE SECTION ------------------------ // $mailto - set to the email address you want the form // sent to, eg //$mailto = "youremailaddress@example.com" ; $mailto = 'lnrcount@lnrcountrystore.com' ; // $subject - set to the Subject line of the email, eg //$subject = "Feedback Form" ; $subject = "Link Exchange Form" ; // the pages to be displayed, eg //$formurl = "http://www.example.com/feedback.html" ; //$errorurl = "http://www.example.com/error.html" ; //$thankyouurl = "http://www.example.com/thankyou.html" ; $formurl = "http://www.lnrcountrystore.com/linkexchange.html" ; $errorurl = "http://www.lnrcountrystore.com/errorpage.html" ; $thankyouurl = "http://www.lnrcountrystore.com/linkexchangethankyou.html" ; $uself = 0; // -------------------- END OF CONFIGURABLE SECTION --------------- $headersep = (!isset( $uself ) || ($uself == 0)) ? "\r\n" : "\n" ; $name = $_POST['name'] ; $email = $_POST['email'] ; $sitename = $_POST['sitename'] ; $siteurl = $_POST['siteurl'] ; $recirocalurl = $_POST['recipurl'] ; $description = $_POST['description'] ; $http_referrer = getenv( "HTTP_REFERER" ); if (!isset($_POST['email'])) { header( "Location: $formurl" ); exit ; } if (empty($name) || empty($email) || empty($sitename) || empty($siteurl) || empty($reciprocalurl) || empty($description)) { header( "Location: $errorurl" ); exit ; } if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) || ereg( "[\r\n]", $sitename )|| ereg( "[\r\n]", $siteurl ) || ereg( "[\r\n]", $reciprocalurl ) ) { header( "Location: $errorurl" ); exit ; } if (get_magic_quotes_gpc()) { $description = stripslashes( $description ); } $messageproper = "This message was sent from:\n" . "$http_referrer\n" . "------------------------------------------------------------\n" . "Name of sender: $name\n" . "Email of sender: $email\n" . "Site Name of sender: $sitename\n" . "Site URL of sender: $siteurl\n" . "Reciprocal URL of sender: $recipurl\n" . "------------------------- Description -------------------------\n\n" . $description . "\n\n------------------------------------------------------------\n" ; mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>" . $headersep . "Reply-To: \"$name\" <$email>" . $headersep . "X-Mailer: chfeedback.php 2.07" ); header( "Location: $thankyouurl" ); exit ; ?> Please help someone! Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 29, 2007 Share Posted July 29, 2007 $recirocalurl = $_POST['recipurl'] ; should be $reciprocalurl = $_POST['recipurl'] ; Quote Link to comment Share on other sites More sharing options...
lnrcount Posted July 29, 2007 Author Share Posted July 29, 2007 Thank you for for finding my spelling mistake but now I get the following Parse error: parse error, unexpected '<' in /home/lnrcount/public_html/linkexchange.php on line 47 Quote Link to comment Share on other sites More sharing options...
lnrcount Posted July 29, 2007 Author Share Posted July 29, 2007 Thank you for your help I found my error in the scriped. 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.