toxinhead Posted January 19, 2008 Share Posted January 19, 2008 Hey there guys! I was just wondering how would i go about making automated image portal that when you fill out a form and upload your picture to the database, it creates a new page from a template and includes that picture within it? I know the basics of php and mysql but don't know how to automatically make a new .html or .php from a template and include that uploaded picture on submit? Thanks HEAPS in advance! Ricky Link to comment https://forums.phpfreaks.com/topic/86742-how-to-create-new-pages-automatically-from-a-form-with-php/ Share on other sites More sharing options...
toxinhead Posted January 19, 2008 Author Share Posted January 19, 2008 Please help:( Link to comment https://forums.phpfreaks.com/topic/86742-how-to-create-new-pages-automatically-from-a-form-with-php/#findComment-443361 Share on other sites More sharing options...
MasterACE14 Posted January 19, 2008 Share Posted January 19, 2008 what you do is, have your form send the information across to a file and call it something like image.php, and in the form on the other page you should use a GET method if you want people to be able to bookmark the page. and then on image.php you have something like: <?php include("path/to/template/header.php"); echo "<img src=\"$_GET['image']\"></img>"; include("path/to/template/footer.php"); ?> or something like that, with security and what not put on the GET's Regards ACE Link to comment https://forums.phpfreaks.com/topic/86742-how-to-create-new-pages-automatically-from-a-form-with-php/#findComment-443368 Share on other sites More sharing options...
beansandsausages Posted January 19, 2008 Share Posted January 19, 2008 sorry : <?php include("path/to/template/header.php"); echo "<img src=\"$_GET['image']\" />"; include("path/to/template/footer.php"); ?> xhtml Link to comment https://forums.phpfreaks.com/topic/86742-how-to-create-new-pages-automatically-from-a-form-with-php/#findComment-443371 Share on other sites More sharing options...
toxinhead Posted January 19, 2008 Author Share Posted January 19, 2008 Ohok so will that make a new page each time someone submits an image? Like a portal Thanks heaps for the reply ace Link to comment https://forums.phpfreaks.com/topic/86742-how-to-create-new-pages-automatically-from-a-form-with-php/#findComment-443372 Share on other sites More sharing options...
Daniel0 Posted January 19, 2008 Share Posted January 19, 2008 Not really, the file must already be on the server. To upload a file do this: http://www.php.net/manual/en/features.file-upload.php Link to comment https://forums.phpfreaks.com/topic/86742-how-to-create-new-pages-automatically-from-a-form-with-php/#findComment-443379 Share on other sites More sharing options...
toxinhead Posted January 19, 2008 Author Share Posted January 19, 2008 Oh yer i need a portal type thing so when i upload a picture it creates a new .html or .php along with it thanks again Link to comment https://forums.phpfreaks.com/topic/86742-how-to-create-new-pages-automatically-from-a-form-with-php/#findComment-443389 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.