php hyperlink problem/question

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
clmowers
Forum Newbie
Posts: 4
Joined: Mon Oct 01, 2007 8:41 am

php hyperlink problem/question

Post by clmowers »

ok, im going nuts trying to figure this out.what i want to do is have a news page on my web site. I have a mysql server running and a table called news and the table has auto_number, date, headline, news.
What i would like to do is have 1 page display the date and the headline and called news.php. When the user click on the headline, query the database and pull the correct info onto the new_page.php page. If possible, i would like to have the whole thing based on a database. Easier to maintain then seperate pages and creating new link every time. Can anyone help me please
efortis
Forum Newbie
Posts: 7
Joined: Mon Oct 13, 2008 7:48 pm

Re: php hyperlink problem/question

Post by efortis »

Create the news.php which queries the table containing the news.
The query may look something like SELECT * FROM tblNews.
Then create in HTML a table with a heading.
The second row should be a repeated region in which all the news
are different rows.

Then use the auto_number as an URL parameter, by
specifying a link to new_page.php?id=## in each title instance of the table.
Post Reply