Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/64859-what-in-the-world/
Share on other sites

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!

Link to comment
https://forums.phpfreaks.com/topic/64859-what-in-the-world/#findComment-323619
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/64859-what-in-the-world/#findComment-323646
Share on other sites

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?

Link to comment
https://forums.phpfreaks.com/topic/64859-what-in-the-world/#findComment-323650
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.