Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,132 members, 7,953,490 topics. Date: Thursday, 19 September 2024 at 05:17 PM |
Nairaland Forum / Science/Technology / Programming / Help With This Php Problem (1063 Views)
This Php Server Remote Addr Is Giving Me Different Device Ip Address / Please Help Me In This PHP Pagination Code / If You Can Modify This Php Source Code Drop Your Contact (2) (3) (4)
Help With This Php Problem by Aybee92(m): 3:47pm On Oct 23, 2018 |
Good day guys, am a newbie and I need your help. Am currently learning php and Mysql. I have a database table titles 'threads' with four columns (Id, subject, body, postdate). This is what I wanted to accomplish, I want to display all the subject column as a link so that when someone click on it, it will take you to a page where it will display the "post subject and the body". similar to nairand. Please guys how do I go about this? Am trying to create a simple forum just for learning sake. Thanks |
Re: Help With This Php Problem by Doughboysss: 4:05pm On Oct 23, 2018 |
can u post ur code |
Re: Help With This Php Problem by webapi: 7:01pm On Oct 23, 2018 |
Aybee92:Loop through them 1 Like |
Re: Help With This Php Problem by Ayemileto(m): 7:55pm On Oct 23, 2018 |
Fetch subject from database using the normal way you use to fetch database result. Loop through the result the Normal way you loop through your db result but in this case, you put your link in the HTML link tag. To read contents, you can create a new page, say details.php and pass subject as a get variable. For example:: Your links will look like Website-url/details.php?first-subject Website-url/details.php? Second-subject In your php loop, it might just be: Echo "<a href="details.php?$row[" Subject"]>$row[" subject" ]</a> In your details.php file, use get to get the subject, and using where clause in your query, get the db row with that subject. |
Re: Help With This Php Problem by Aybee92(m): 11:08am On Oct 25, 2018 |
Ayemileto:waw thanks so much. this is really helpful. |
Re: Help With This Php Problem by Ayemileto(m): 3:03pm On Oct 25, 2018 |
Aybee92: You are welcome bro. |
(1) (Reply)
Who Won That Programming Competition By Afonja12 An DHTML... / Programming != Software Development / List Of All Blockchain Training Centers Across All States In Nigeria
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12 |