Hi all, What I am trying to do is On "Page 1", user fills a form, and when he clicks on "Submit", a new page, say "Page 2" should get automatically created (in the same folder as index.php) in such a way that name of the page is say first_name.php (what the user filled on page 1) and it should display the contents of what he filled in on the first page. Something like showed in the figure. http://i54.tinypic.com/j768wj.jpg Please help guys! Thanks and Regards.
Why not just submit to page2.php (for example) then use $_POST['name'] to display the name? As for actually creating a new page (which is obviously what you are asking) I wouldn't know how to do this off the top of my head, but would send the data back to index.php and create it from there
I've attached a simple example that I created real quick, Take a look at it, it should be pretty self explanatory. If you have any questions let me know.
you would have to use a php file to shell_exec and process a touch command to create a file then write to that file
why would you want to do it that way which appears alot complicated in nature when there are many other advanced alternatives available? unless i know so sure of what your inetentions are, i cant help you provide a real time solution. Otherwise, what the fellow above suggested you would be an ideal solution.
i agree with what was said in above posts, i dont think creating a new page would be the best thing to do. you could post your content from the index.php page and then on another php file (i.e name.php) you will have the content echo'd