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
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)
}?>

Link to comment
Share on other sites

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.