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

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

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.