professional-ajax-02-Hidden-IFrame-Examples-GetCustomerData.php / php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Get Customer Data</title> <?php //customer ID _GET["id"]; //variable to hold customer info //database information sDBServer = "your.databaser.server"; sDBUsername = "your_db_username"; //create the SQL query string sQuery = "Select * from Customers where CustomerId=".//make the database connection oLink = mysql_connect(sDBUsername,sDBName) or sInfo == '') { if(sQuery) and mysql_num_rows(aValues = mysql_fetch_array(sInfo = <br />".aValues['Address']."<br />". <br />".aValues['State']."<br />". <br /><br />Phone: ".aValues['Phone']."<br />". "<a href=\"mailto:".$aValues['E-mail']."\">".</a>"; } else { sInfo = "Customer with ID oLink); ?> <script type="text/javascript"> window.onload = function () { var divInfoToReturn = document.getElementById("divInfoToReturn"); parent.displayCustomerInfo(divInfoToReturn.innerHTML); }; </script> </head> <body> <div id="divInfoToReturn"><?php echo </div> </body> </html>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.