mysqli - PHP: Creating a new file / page on submit -


so, i'm little new php , wondering if please give me simple yet indepth answer on problem having..

lets take forum such example. when user creates new thread how site create new page (their thread)? usually, url end looking http://www.(sitename).com/forum/77375 <- post id assume. how make such thing?

i have site requires users submit article , have made article information sent database. need make new page made unique url article on it.

i using php mysqli - appreciated :)

when see seo friendly url that, site isn't (or @ least shouldn't) making file post id. site doing url rewrite. take url such http://www.sitename.com/forum , regardless of comes after that, load same file (lets it's called forum.php. take rest of url, , change query string.

so rewrite:

http://www.sitename.com/forum/123456 

to be:

http://www.sitename.com/forum.php?thread_id=123456 

which forum.php file can data query string , know pull forum posts thread id of 123456

here's post more info: url rewriting php


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -