All methods are the same ie save, preview, send they all save info in the database it just depends which button pressed will save which field in table to determine if message is saved, sent or preview. So use insert record SB to insert info in DB with table fields for saved or sent then when you press a button it either adds info in saved or sent table field to determine if the info was saved or sent.
Thank you for your input, however I'm a little confused... are you suggesting that I should create different tables for "Preview, Draft and Save"? or put three insert buttons with different values, if the second it true how is the "Preview" data removed from the DB. if the user decides not to publish, also I apologize for my ignorance but I am not sure what "SB" means.
I think I did something similar to this, what I did was I got my info for the preview from POST data (or DB) and echoed as a table, but I had hidden forms with the data ready to submit when they clicked my Submit Button, it saved or updated the DB.
If thats not the issue and you are needing to have one form do several actions, I had conditional regions for my insert and update buttons as well as the insert or add column code. Using either I simply had an identifier ( like the old DW "MMinsert = "form1"") that let my function know whether my form was updating or inserting.
The trick is decide where you can "catch" the process in motion and iterupt it with your identifier to validate thats the function you want.
EX: If i'm using one table for preview, use text to show results, when they click edit, the page witll refresh and you can set a URL attribute "xxx.php?action=edit" then you can set conditional statment to show the next set of buttons that update or insert to the DB.
*optionally if they click save, you can set a URL attribute "xxx.php?action=save" and have a conditional region to show the insert or update code on the top code portion of the page.
Thats two ways to set cotrols on the page or in the fuctions lists in the main code, very flexible.
There are many ways to to control the users flow, set your fuctions/actions, and still have a low click ratio for good usability.
Thank you zzipper7, I have tried your suggestions and I think I'am a little closer but I still can't get it working... when I create the form I place three buttons at the bottom (Save, Save Draft and Preview) code as follows...
<input type="submit" name''KT_Insert1" id="KT_Insert1" value="Save">
<input type="submit" name="draft" id="draft" value="Save As Draft">
<input type="submit" name="prev" id="prev" value="Preview">
when the form is filled and button one is clicked the data is saved as expected... my problem is the other two buttons... I need to know how to set these buttons... the "Insert Transaction-First check variable is set to Form Variable--KT_Insert1.,. but I see no way to set anything for the other buttons.
I hope this is clear, thanks in advance for any help.
I am not sure what "SB" means.
"SB" means "server behavior" hope that helps with your development.
Doh! I can't believe I missed that, thank you