Jump to content

How to create new pages automatically from a form with PHP ??????


toxinhead

Recommended Posts

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 :)

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.