Where can i get good tutorial to create preview edit buttom

  • Edit post
    • Delete post
    • Report this post
    • Reply with quote

where can i get good tutorial to create preview edit buttom

Postby jonathan on Wed Apr 21, 2010 12:33 am
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 could always determine how you want it built yourself, especially if this is for custom created forums. If you’re working with a pre-built forum app (phpBB, vBulletin) they may have the functionality built in, or have a plugin that will do it for you.

If it is your own forum though, it can be built pretty easily. You should have a method that renders a post in the setting of a thread. All you’d have to do is $_POST the data, call the render post method, passing that data to it, and display the output in a container on the page you’re returning to. Then just make sure to place all the data back into the posting form. Using a database for this is really going a couple steps too far, unless you intend for drafting to be a feature.

no is not a forum is a event website basicaly will the staff have the form to add new events but before they submit i wanted to enable them to preview and if they happy submit i’m using xampp apache mysql and is uni work assignment

Either way, the principle is the same. There still needs to be a post rendering method - something that takes the data that is usually taken from the Database and renders it out for the page. You should be able to get access to that method by some means and use it to generate a preview.