Jump to content

where can i get good tutorial to create preview edit buttom


Lisa23

Recommended Posts

I have created a form wher admin will insert data into database that includes image now i need a preview buttom just like the one this forum use before submit a topic then if user satisfied with it submit or edit

 

what i thought of doing is create a preview buttom but what will actually do is insert data into a temporary database if user decide to submit it will then delete from temporary database and insert into permanent database.

 

any sugestion on wher can i start i would aprreciate

Link to comment
Share on other sites

You don't necessarily need a temporary table if you go through the preview process you'll notice that below the preview it contains the previous form. So, basically something like this would work:

 

<input type="submit" name="preview" value="Preview">
<input type="submit" name="save" value="Save">

 

if (isset($_POST['preview'])) {
  print_preview($_POST);
}

if (isset($_POST['save'])) {
  //insert into database
}

//form

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.