Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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