Window Close with refresh

liunx

Guest
Hey,<br /><br />I've got a page that allows the user to edit things><img src='http://www.webdesignerforum.co.uk/style_images/1/post_snapback.gif' alt='*' border='0' /></div><div class='quotemain'><!--quotec-->Why do you need to refresh? If the JS is applying the changes..<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />The changes are being made to a MySQL database and a popup window is being opened to type the changes into. JS, last I checked, is not able to talk to a MySQL database.<br /><br />I'm using PHP to do all of the changes. Sorry if my use of the word script in my first post was misleading.<!--content-->
You can make an API or other form of Semi-MVC interaction quite easily in PHP.<br /><br />Something along the lines of this URL:<br />?act=getrowbyid&table=products&id=47<br />could return a database row, without exposing the database (as long as you do is_int and cleaning functions><img src='http://www.webdesignerforum.co.uk/style_images/1/post_snapback.gif' alt='*' border='0' /></div><div class='quotemain'><!--quotec-->You can make an API or other form of Semi-MVC interaction quite easily in PHP.<br /><br />Something along the lines of this URL:<br />?act=getrowbyid&table=products&id=47<br />could return a database row, without exposing the database (as long as you do is_int and cleaning functions on the id input and table input).<br /><br />For further customisation/security you can use per-table keywords, such as:<br />?act=getFromProducts&id=47<br /><br />If you want to go even further you could use a SOAP/XML implementation in both directions so that no data is sent in plain-text.<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />And using these solutions would close the popup box that I have opened and then refresh the main page?<br /><!--content-->
Ok, seeing as how no one knows the answer that doesn't require me learning about 10 new scripting languages perhaps helping me get this script to work will be better.<br /><br />PHP cannot do any client side work so it cannot close and refresh another page. However through the use of Javascript I can have the main page "listen" for the close of the popup. So how do I accomplish that using this:<br /><br /><blockquote>`<body onunload=" ??what script here ??">'</blockquote><!--content-->
 
Top