tutor1 Posted June 14, 2012 Share Posted June 14, 2012 i recently started to write my own blog engine, but i have problems. Problem is that when i make file page.php, how i can make single article URL as in this example: page.php?name=i_want_to_know or page.php?id=32 ? Please answer because I need it. Quote Link to comment Share on other sites More sharing options...
AMcHarg Posted June 14, 2012 Share Posted June 14, 2012 <a href='page.php?id=$x'>Link</a> Quote Link to comment Share on other sites More sharing options...
tutor1 Posted June 14, 2012 Author Share Posted June 14, 2012 thanks for that but will it work when I wnat to make single article on one page ? something like in wordpress . thanks Quote Link to comment Share on other sites More sharing options...
AMcHarg Posted June 14, 2012 Share Posted June 14, 2012 I'm not following what you mean? :-\ If you want a dynamic php page to output certain content based on a variable in the url, then the code above is part of the solution for doing that. Quote Link to comment Share on other sites More sharing options...
tutor1 Posted June 14, 2012 Author Share Posted June 14, 2012 OK, I'll now give more details. I first crated page.php in my htdocs (xampp) and in this page.php i've made script that uses mySQL to get article content. As you can see this page also has link "http://www.phpfreaks.com/forums/index.php?action=post;topic=360963.0;last_msg=1707183" but for me it's interesting just "index.php?action=post;topic=360963.0;last_msg=1707183". How I can make page that will use mySQL database for any article and print it into page.php?name=article_name site? Do you know what I mean now? thanks again Quote Link to comment Share on other sites More sharing options...
Jessica Posted June 14, 2012 Share Posted June 14, 2012 Do you know how to write an SQL select query? Quote Link to comment Share on other sites More sharing options...
tutor1 Posted June 14, 2012 Author Share Posted June 14, 2012 OK OK... I know... I'll make for every title link like <a href="page.php?name=title_name">title</a> and in page.php I'll read from mySQL with Title name... then I'll print title,content,autor name and so on. Thanks !!!! Quote Link to comment Share on other sites More sharing options...
Jessica Posted June 14, 2012 Share Posted June 14, 2012 Exactly 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.