TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

PHP Pop Up

Page: 1 Reply
Jul 30th 2003#115704 Report
Member since: Jun 2nd 2003
Posts: 233
Okay, Im using Robouk's email form and have a question. First, heres the link to the code: http://robouk.mchost.com/tuts/tutorial.php?tutorial=emailform
In the PHP (thanks.php), there is the line include("thanksecho.php"); that displays the thank you message. Instead of opening that thanksecho.php in the same window, what would I add to the code if I wanted it to open in a new smaller pop up window? I dont know if PHP very well, so please help me with this one. Thanks in advance, much appreciated.

Adam
Reply with Quote Reply
Jul 30th 2003#115714 Report
Member since: Mar 24th 2002
Posts: 3114
you could use something like this:
instead of having the include() function there, replace that with
[php]
echo "
";
[/php]

..or something. -__-
Reply with Quote Reply
Jul 30th 2003#115718 Report
Member since: Jun 2nd 2003
Posts: 233
thanks paavo, that worked like a charm...except for one thing :D when it opens the pop up window, the main window is directed to thanks.php, which is just a blank screen (prolly because action=thanks.php in my html form. what can i add so that a different page is displayed after the submit button is clicked (rather than thanks.php) but still have the form send?
Reply with Quote Reply
Jul 30th 2003#115720 Report
Member since: Mar 24th 2002
Posts: 3114
well, it has to at least go for a visit in that thanks.php, as it's that page that actually sends the mail. :D
But you can exit that page as fast as you can blink, because the PHP sending the mail is pretty instant.

Add this somewhere in the bottom of the thanks.php:
[php]
echo "

";
[/php]

replace index.html with the pag....well you get it.
Reply with Quote Reply
Jul 30th 2003#115721 Report
Member since: Jun 2nd 2003
Posts: 233
okay, i added that to my code and when submit is clicked, it redirects to the alternate page, but now the pop up thanksecho.php pop up window doesnt come up. heres the bottom part of my code (i used yahoo for testing purposes).

[PHP]
mail($to, $subject, $email, $mailheaders);
echo "
";

echo "

";
}
?>[/PHP]
Reply with Quote Reply
Jul 30th 2003#115734 Report
Member since: Mar 24th 2002
Posts: 3114
well, you can combine the script blocks into one < script>, as long as the pop up function is on top.
Or, without combining them, just reverse the order of the scripts. so that the pop up one is on top of the one that redirects the user from that page.

That should do it, if not, come back. < /tech support voice>
Reply with Quote Reply
Jul 30th 2003#115743 Report
Member since: Jun 2nd 2003
Posts: 233
Im confused...so should this work?

[PHP]
mail($to, $subject, $email, $mailheaders);
echo "
";
}
?>
[/PHP]

thanks btw, i really appreciate the help man.
Reply with Quote Reply
Jul 30th 2003#115747 Report
Member since: Mar 24th 2002
Posts: 3114
why don't you just test it? :p

Yeah, from what I can figure, it should work.
Reply with Quote Reply
Jul 30th 2003#115758 Report
Member since: Jun 2nd 2003
Posts: 233
Thanks a lot Paavo! I got it working fiaaanally :o haha thanks again
Reply with Quote Reply
Jul 30th 2003#115763 Report
Member since: Jul 3rd 2003
Posts: 109
[ tune in next week as paavo saves the world!]
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum