Jump to content


Photo

Embedding URL from records from Database and popup


  • Please log in to reply
1 reply to this topic

#1 francoisp

francoisp
  • Members
  • Pip
  • Newbie
  • 4 posts
  • LocationSouth Africa

Posted 20 April 2003 - 03:20 PM

Consider the following code

<?php



include \'db.php\';

$result = mysql_query( "SELECT company_name FROM product_details" )

or die("SELECT Error: ".mysql_error());



$num_rows = mysql_num_rows($result);

echo "These are the companies<P>";

echo "<table border=1 align=\'center\'\'>n";

while ($get_info = mysql_fetch_row($result)){ 

echo "<tr>n";

foreach ($get_info as $field) 

echo "t<td><font face=verdana size=3/>$field</font></td>n";

echo "</tr>n";

}

echo "</table>n";

?>





Now i want the company names to appear with header rows as well as each company name must then be a url (popup) clicking on that the company details must be displayed ie Company Name, Address Tel no etc. How do I do this ? Any help will be appreciated :?: Any ideas :idea:

Thanks

Francois

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 20 April 2003 - 05:28 PM

the company names are listed horizontally? is there a limit of how many columns? for the link, create a javascript function and echo the company info into the anchor.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users