OK, this is probably pretty easy, but I am just having a knuckle of a time trying to get it to work.
I have a small GET – form on a page with a text area (name=id).. when a person enters an ID number (which is just POST ID from a story) — then I have it displayed in the URL like so:
http://mywebpage.com/page.php?id=582
So it just GETS the id from the URL and uses it in the query. I have a URL row in my table which is the title hypenated, like this: this-is-my-site, which just grabs the title of the story and runs it through a function really quick.
My question is, how would I keep the same format, but when the form gets submitted to look up the story by ID, then how would I get the URL row in my title to replace my ?id= variable??
So instead of
http://mywebpage.com/page.php?id=582
It would return
http://mywebpage.com/page.php/this-is-my-site.html
Thanks in advance!
PS: I don’t know how to use database in rewrite(and .htaccess) but this solution need not it.
Use
$_SERVER['PATH_INFO']