Jump to content

transfering data through the same page.


phpSensei

Recommended Posts

I want the user to fill in the form and click preview with all the information sent to the ?mode=preview part, and let them preview their content, and then click upload with all the data from ?mode=upload....

 

please try to understand.

 

Page 1 (?mode=upload):

Title:

Swf:

comment:

 

Page 2 (?mode=preview):

validate form

Get all the data from ?mode=upload

show a preview of the swf

and put the data in the database...

 

 

remeber, the ?mode=upload, and preview, are in the same page.

Link to comment
https://forums.phpfreaks.com/topic/76293-transfering-data-through-the-same-page/
Share on other sites

use a form to upload as normal (this is the preview) when you click preview, upload and display on the page.. the upload will be temp storage.. now while your previewing.. use a form with hidden fields to store the data (same as the ones used to create the preview) but now when they click upload you save that data to a keep area..

 

<?php
switch($_GET['mode'])
{
case "upload":
//do upload stuff (move to keep area)
break
case "preview":
//do preview stuff (upload to temp area)
}?>

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.