Jump to content

how to make url looks like page.php?id=32 or something like that?


tutor1

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 !!!!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.