PHP Popup Window...

Reply

Join Date: Apr 2008
Posts: 31
Reputation: Mapper99 is an unknown quantity at this point 
Solved Threads: 0
Mapper99 Mapper99 is offline Offline
Light Poster

PHP Popup Window...

 
0
  #1
Oct 18th, 2009
Is it possible to get a PHP page to popup in a new page after a form post? Then, return information from the popup page to the parent page? Right now when I post my data, the browser window navigates to the new page and I have no way to get the data from my PHP popup page back to the parent page.

Thanks in advance,

M
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,071
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster
 
-1
  #2
Oct 18th, 2009
I don't think that php can communicate between web browser windows. You could use javascript to create parent-child relationships and use a mix of php/js to display a popup.

You may be better off using a lightbox type popup that displays the sent data, that way you don't annoy your users by opening a new window.

Remember that ALL your form data should be passed to the $_POST variable so that you have all the data to hand to display in a lightbox if required - no need for any messy $_SESSION or $_GET variables.
Last edited by ardav; Oct 18th, 2009 at 5:17 am.
Happy Humbugging Christmas
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 12
Reputation: Gilette is an unknown quantity at this point 
Solved Threads: 0
Gilette Gilette is offline Offline
Newbie Poster
 
0
  #3
Oct 18th, 2009
Your pop-up window should have the same session as the main browser window. Since php is a server script, it can handle session data. That would be the link in between those windows. Write to session data from the pop-up and retrieve it with the main window. If the session should differ, you can always put the data on a file on the server and retrieve it from there, or you can use a database if it is accessible for you.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,071
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster
 
-1
  #4
Oct 18th, 2009
Do you really need to duplicate $_POST data into $_SESSION vars? Not disagreeing, have done this myself in the past. With a lightbox type arrangement, no duplication required.
Happy Humbugging Christmas
Reply With Quote Quick reply to this message  
Reply

Tags
php, popup

Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



Tag cloud for php, popup
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC