TheAffinity Posted August 14, 2007 Share Posted August 14, 2007 Hi there, I am relatively new to PHP and am using it to create a script that will get a user's name and email and send out an email to that person (via the specified email). Take a look at www.seduceadwords.com In the bottom left corner of the left menu, go ahead and leave it blank and hit "Email my Friend". You'll see error messages appear and the page reloads itself. Now if you enter names and emails you'll see that the page reloads BUT not completely... What the heck? (The email does get sent out though.) I can't for the life of me figure out what's going on. The header for the form is as follows: -------------- echo "<form method=\"POST\" action=\"", htmlspecialchars(strip_tags($_SERVER['PHP_SELF']), ENT_QUOTES), "?google=", $cow, "\">"; echo '<!-- fieldset><legend>Email this Site to a Friend:</legend -->'; echo "<table>"; echo "<tr>"; ... </form> ----- Any ideas what I should look into? Any help would be greatly appreciate, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/64859-what-in-the-world/ Share on other sites More sharing options...
NArc0t1c Posted August 14, 2007 Share Posted August 14, 2007 echo "<form method=\"POST\" action=\"" . htmlspecialchars(strip_tags($_SERVER['PHP_SELF']), ENT_QUOTES) . "?google=" . $cow . "\">"; echo '<!-- fieldset><legend>Email this Site to a Friend:</legend -->'; echo "<table>"; echo "<tr>"; </form> Don't enclose functions like that! Quote Link to comment https://forums.phpfreaks.com/topic/64859-what-in-the-world/#findComment-323619 Share on other sites More sharing options...
lemmin Posted August 14, 2007 Share Posted August 14, 2007 If the page is reloading in any form of the word, then the link to it would be correct. I would guess that the problem is in the code of that page, you might want to show some of it. @NArc0t1c, why would you not use the functions like that? Wouldn't it save variable memory? Quote Link to comment https://forums.phpfreaks.com/topic/64859-what-in-the-world/#findComment-323646 Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 echo "<form method=\"POST\" action=\"" . htmlspecialchars(strip_tags($_SERVER['PHP_SELF']), ENT_QUOTES) . "?google=" . $cow . "\">"; echo '<!-- fieldset><legend>Email this Site to a Friend:</legend -->'; echo "<table>"; echo "<tr>"; </form> Don't enclose functions like that! Can you elaborate? Quote Link to comment https://forums.phpfreaks.com/topic/64859-what-in-the-world/#findComment-323650 Share on other sites More sharing options...
NArc0t1c Posted August 14, 2007 Share Posted August 14, 2007 @NArc0t1c, why would you not use the functions like that? Wouldn't it save variable memory? Conflict, Easy to make a mistake. Quote Link to comment https://forums.phpfreaks.com/topic/64859-what-in-the-world/#findComment-323659 Share on other sites More sharing options...
dbo Posted August 14, 2007 Share Posted August 14, 2007 I still have no idea what you're talking about. I'm not concerned about memory I've just never heard anyone say not to do that, so I'm interested to hear your opinion. Quote Link to comment https://forums.phpfreaks.com/topic/64859-what-in-the-world/#findComment-323663 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.