Jump to content


Photo

Previewing data before submitting to db


  • Please log in to reply
2 replies to this topic

#1 neo926

neo926
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 27 March 2006 - 02:54 AM

So, I have a sports writing site. I have a form set up for my writers so they can submit their columns (Title, Column content, etc.). The data input is processed and submitted to my MySQL database.

The problem with this is that the writers can't see what the final product is going to look like on the mainpage, to make sure they have everything formatted properly. I want to add a button next to the 'submit' button that will open up a new page that will process the data and display it on a preview page, so they know how it's going to look on the mainpage.

I don't know how to do this. I already have the form set up like this:
<form method="post" action="<?php echo $PHP_SELF ?>">

So I don't know how I can redirect the form information into this new page to preview the data using a preview button instead of submitting the data to the database. Any help would be appreciated.

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 27 March 2006 - 03:15 AM

use javascript popup page,


search the forum good luck.


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 maexus

maexus
  • Members
  • PipPipPip
  • Advanced Member
  • 191 posts

Posted 27 March 2006 - 03:17 AM

You could store the data in a session or just create a preview page with a form to submit the data after it's been previewed. Using javascript isn't really the best way because a user may disable js or the browser they are using may not support js.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users