matvespa Posted January 23, 2011 Share Posted January 23, 2011 I retrive my output from database and i have 3 result to show. However, at the top of the page, i created a anchorlink to link to each of the result being displayed below. I tried creating a new column in the db structure and call it "anchorlink". However, it is only able to work on the first result. For example, when i click anchorlink1: it correctly show me the result1 below. When i click anchorlink2 and 3, it doesnt show me result3 and 3 respectively. In fact it showed me result1 as well. Here is my achorlink code: anchorlink1: <a href="#HPTB">LINK1</a> anchorlink2: <a href="#SM">LINK2</a> anchorlink3: <a href="#LE">LINK3</a> HPTB, SM and LE are the anchorlink input in the database which column is called "anchorlink". Display Output: <a name='<?php echo $anchorlink; ?>'></a> Is there anything wrong with this code above? Cause it doesnt get what i want and what am i missing? Thank you in advance! Quote Link to comment Share on other sites More sharing options...
litebearer Posted January 23, 2011 Share Posted January 23, 2011 where is the code that sets the value(s) for $anchorlink? Quote Link to comment Share on other sites More sharing options...
matvespa Posted January 23, 2011 Author Share Posted January 23, 2011 This is the value set for it: $anchorlink=$row["anchorlink"]; and my column name in my database is call "anchorlink" Quote Link to comment Share on other sites More sharing options...
litebearer Posted January 23, 2011 Share Posted January 23, 2011 Ok; however, it would help to see the full code as there is something that is causing $anchorlink to only have one value. A missed placed loop, a typo in the loop, no loop etc etc - seeing the code will help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.