Log in

View Full Version : MySQL virtual html links



neo_philiac
03-17-2010, 05:26 PM
Hi all:

I am trying to find a tutorial to create virtual links and present them as an individual web page. To make it more clear, suppose I have an event list (i.e news) which I save in a SQL database and I would like to click on any of those events (i.e.headline) that would pull the data from the DB and show it in an individual page with details. I have been googling but dont exactly know the method. Please direct me too the correct source.

djr33
03-17-2010, 07:42 PM
MySQL is just a database. You need a language like PHP to actually create an interface to get the data.

The typical method for doing this is to use variables in the URL called "GET" variables.

page.php?item=5

Then $_GET['item'] will have a value of 5 in PHP and you can use that to search for record 5 in the database. To generate that type of link just find the relevant info in the database and use PHP to generate the href of an <a href="...." that corresponds to what you want to do.

neo_philiac
03-18-2010, 01:09 AM
Got it thanks!