smuth10 Posted February 13, 2007 Share Posted February 13, 2007 I have a table that is being used as an output for user data and I need a popup a window to come up with the details of the user in only that row. The popup window comes up, but I am not sure how to get the details of just that row out of the database and formatted neatly in the popup window. Here is what I have so far: (I have not included all of the code) <? //Select all the data from tbleUsers $query = "SELECT lastName, firstName, date, title, address, city, state, zipcode, country, phone, fax, company, email, processed, territoryID, userID FROM tblUsers ORDER BY lastName, firstName"; // Run the query $result = mysql_query($query); //Select all the data from tblTerritories $query = "SELECT territoryID, territoryDesc FROM tblTerritories ORDER BY territoryID"; // Run the query $territories = mysql_query($query); //This is an inline style block for the data output in the table. It puts a 1px border around all of the cells and changes the font to arial 8pt echo " <style> #data {border-collapse: collapse; border: 2px solid #999999;} #data td {border: 1px solid #999999; padding: 1px; font-family: arial; font-size: 8pt;} </style> "; //Create the table headers echo "<table id=\"data\">"; //echo "<table align=\"center\" border=\"1\" cellpadding=\"1\" cellspacing=\"1\" bordercolor=\"#999999\">"; echo "<tr>"; echo "<td nowrap><div align=\"center\"> <strong> <font size=\"2\" face=\"Arial\"><font color=\"#000000\">Details </font></font></strong>"; echo "<td nowrap><div align=\"center\"> <strong> <font size=\"2\" face=\"Arial\"><font color=\"#000000\">Contact Information </font></font></strong>"; echo "<td nowrap><div align=\"center\"> <strong> <font size=\"2\" face=\"Arial\"><font color=\"#000000\">Date </font></font></strong>"; echo "<td nowrap><div align=\"center\"> <strong> <font size=\"2\" face=\"Arial\"><font color=\"#000000\">Address & Country </font></font></strong>"; echo "<td nowrap><div align=\"center\"> <strong> <font size=\"2\" face=\"Arial\"><font color=\"#000000\">Phone, Fax </font></font></strong>"; echo "<td nowrap><div align=\"center\"> <strong> <font size=\"2\" face=\"Arial\"><font color=\"#000000\">Email </font></font></strong>"; echo "<td nowrap><div align=\"center\"> <strong> <font size=\"2\" face=\"Arial\"><font color=\"#000000\">Proc </font></font></strong>"; echo "<td nowrap><div align=\"center\"> <strong> <font size=\"2\" face=\"Arial\"><font color=\"#000000\">Territory </font></font></strong>"; //Run the loop through all of the rows in the table and output the data in 2 pretty colors of green. $j=true; while ($row = mysql_fetch_row($result)) { if($j) $j=false; else $j=true; echo "<tr valign=\"top\">"; //details popup if ($j){ echo "<td NOWRAP align=\"center\" valign=\"center\" bgcolor=\"#CCFF99\">"; } if (!$j){ echo "<td NOWRAP align=\"center\" valign=\"center\" bgcolor=\"#FFFFCC\">"; } echo "<span id=\"SpecialSpan\" onmouseover=\"this.style.cursor='pointer'\" onmouseout=\"this.style.cursor='default'\" onclick=\"a()\";> <a href=\"javascript:popUp('customer_info.php?userID=')\"><img src=\"properties.gif\" border=\"0\"> </span>"; The second to last line is the problem. I am not sure what to put after 'customer_info.php?userID=, or if I even have this part is right. Any help at all would be much appreciated. Scott... Link to comment https://forums.phpfreaks.com/topic/38254-solved-need-popup-window-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.