quadrant6
01-18-2004, 01:54 AM
I've built a site for a client and there is a page which lists news stories. This is to be updated by them and I've been building a small admin area using php for this purpose.
So I've created a form for adding a News Story to the site and has input fields for the story text and a file input box to upload an image.
There is an "Add" (submit) button which submits the form, adds the story text to the database and stores the uploaded image in a folder (using the inserted id of that that record as the image name).
Once the add button is clicked though, the story is up live on the site. I thought it would be good if the client could get a preview first of what the page would look like so on my form page I'd like to have a "preview"(submit) button which submits to a different preview page.
This preview page would just display the inputted info and add the image to a temp directory.
This is not ideal but seems to be the simplest way i can think of so far.
so.... is it possible to have 2 submit buttons in a form both going to different places.
Also if you have any better suggestions on a way to give the client a preview of the content they have added before it's actually live please let me know.
So I've created a form for adding a News Story to the site and has input fields for the story text and a file input box to upload an image.
There is an "Add" (submit) button which submits the form, adds the story text to the database and stores the uploaded image in a folder (using the inserted id of that that record as the image name).
Once the add button is clicked though, the story is up live on the site. I thought it would be good if the client could get a preview first of what the page would look like so on my form page I'd like to have a "preview"(submit) button which submits to a different preview page.
This preview page would just display the inputted info and add the image to a temp directory.
This is not ideal but seems to be the simplest way i can think of so far.
so.... is it possible to have 2 submit buttons in a form both going to different places.
Also if you have any better suggestions on a way to give the client a preview of the content they have added before it's actually live please let me know.