• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
creating HTML and PHP hyperlink text

#1
[eluser]Volkof[/eluser]
Hi there,

I was trying to create a hyperlink from a bunch of text that was retrieved from database. What's suppose to happen was a few lines of text will be retrieved and display and when user click on text line 1, it will return me the ID of that text (let's just say line 1 ID = 1, Line 2 ID =2)


So I did this
Code:
<div id="container">
   <h1>Select a Faculty</h1><br>
    <a href=".&lt;?php $row-&gt;facultyID ?&gt;.">
    &lt;?php
    foreach($faculties as $row){
     echo '<b>'.$row->facultyName.'</b><br/>';
     echo '<br/>';    
    }
    ?&gt;
    </a>
  </div>

So it display rows of Faculty Names, and when user click on one of them, it will return the Faculty ID.
I'm not sure what is the correct way to do this, so any advise?

Thanks


Messages In This Thread
creating HTML and PHP hyperlink text - by El Forum - 12-10-2012, 05:02 AM
creating HTML and PHP hyperlink text - by El Forum - 12-10-2012, 07:08 AM
creating HTML and PHP hyperlink text - by El Forum - 12-10-2012, 08:07 AM
creating HTML and PHP hyperlink text - by El Forum - 12-10-2012, 05:05 PM
creating HTML and PHP hyperlink text - by El Forum - 12-10-2012, 08:35 PM
creating HTML and PHP hyperlink text - by El Forum - 12-11-2012, 10:50 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.