Why not try selecting both the short and the full values of loc1 from the database? Then you can display them both in the html output. Select loc1, left(loc1,3) as locx, etc Have I missed your point here? Mark -----Original Message----- From: Sugimoto [mailto:sugimoto@xxxxxxxxxxx] Sent: 20 April 2005 08:15 To: PHP ML Subject: One more time (Duft Punk) about hyperlink Thank you very much, I do appreciate your help. Ur script doens work, but, curiously, it works when I changed a bit... select left(loc1,3) as locx, openart_id, tit1, pub1, id1, ref1 from openart_table If possible, can I ask one more thing? This part is the problem <A HREF="/momatlib/image/<? echo $row["locx"]; ?>.jpg"><? echo $row["locx"]; ?></A> I got 3 letters, but I would like to show all "loc1" data (eg "1-2 near entrance") in the table, and have first 3 letters of "loc1" for jpg hyperlink (http://www.heyjude.com/image/1-2.jpg). Do you know how to fix this? ----script------------------ $result = mysql_query("select left(loc1,3) as locx, openart_id, tit1, pub1, id1, ref1 from openart_table where tit1 like '%$tit%' and res1 like '%$res%' and pub1 like '%$pub%' and date1 like '%$date%' and id1 like '%$id%' and ref1 like '%$ref%' and loc1 like '%$loc%' and type1 like '%$type%' and vol1 like '%$vol%' and fre1 like '%$fre%' and note1 like '%$note%' order by tit1"); $rows = mysql_num_rows($result); echo $rows,"Record Found <p>"; while($row = mysql_fetch_array($result)){ ?> <tr> <td><a href = "openart_detail.php ?iden=<? echo $row["openart_id"] ?>"><? echo $row["openart_id"]; ?></a><br></td> <td><? echo $row["tit1"]; ?><br></td> <td><? echo $row["pub1"]; ?><br></td> <td><? echo $row["id1"]; ?><br></td> <td><? echo $row["ref1"]; ?><br></td> <td> <A HREF="/momatlib/image/<? echo $row["locx"]; ?>.jpg"><? echo $row["locx"]; ?> </A><br> </td> </tr> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, Cisco, Sun Microsystems, 3Com GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 2000' REGISTERED COMPANY ********************************************************************** CONFIDENTIALITY NOTICE: This Email is confidential and may also be privileged. If you are not the intended recipient, please notify the sender IMMEDIATELY; you should not copy the email or use it for any purpose or disclose its contents to any other person. GENERAL STATEMENT: Any statements made, or intentions expressed in this communication may not necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no content herein may be held binding upon Gamma Global (UK) Ltd or any associated company unless confirmed by the issuance of a formal contractual document or Purchase Order, subject to our Terms and Conditions available from http://www.gammaglobal.com E&OE ********************************************************************** ********************************************************************** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php