You have no html link. Try echo " $company <br><a href='$webaddress'>$webaddress</a><br>" > -----Original Message----- > From: Remember14a@xxxxxxx [mailto:Remember14a@xxxxxxx] > Sent: Sunday, August 22, 2004 5:33 PM > To: php-db@xxxxxxxxxxxxx > Subject: [SPAM] Global Peace output > > Dear friends, > > I have pasted table structure and > php script > > below, > > Output I am getting is company name and web address, > like pasted below > > > > Global Coalition For Peace > http://www.globalcoalitionforpeace.net/ > Physicians For Social Responsibility > http://www.psr.org/ > > However, I want output page to print,url with link to website, > With present script, its printing web address in table, however, onclick > it > doesn't take me to website. > > Any guidance, so that onclick, its takes, to website in "webaddress" > column, > please. > -------------------------------------------------------------------------- > ---- > ------------- > table structure > -------------------------------------------------------------------------- > ---- > ------------- > > mysql> use b > Database changed > mysql> describe comp; > +------------+--------------+------+-----+---------+----------------+ > | Field | Type | Null | Key | Default | Extra | > +------------+--------------+------+-----+---------+----------------+ > | id | int(5) | | PRI | NULL | auto_increment | > | company | varchar(100) | | PRI | | | > | webaddress | varchar(100) | | PRI | | | > +------------+--------------+------+-----+---------+----------------+ > 3 rows in set (0.00 sec) > > mysql> > -------------------------------------------------------------------------- > - > php script > ------------------------------------------------------------------------- > <?php > > include 'menufile.php'; > ?><center> > <?php > // open the connection > $conn = mysql_connect("localhost", "", ""); > > // pick the database to use > mysql_select_db("b",$conn); > > // create the SQL statement > $sql = "SELECT * FROM comp ORDER BY company"; > > // execute the SQL statement > $result = mysql_query($sql, $conn) or die(mysql_error()); > > //go through each row in the result set and display data > while ($newArray = mysql_fetch_array($result)) { > // give a name to the fields > $id = $newArray['id']; > $company = $newArray['company']; > $company = $newArray['company']; > $webaddress = $newArray['webaddress']; > //echo the results onscreen between ""can also //type$id is and > &company > is > echo " $company <br>$webaddress<br>"; > } > ?></center> > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php