|
Posted by Vince Morgan on 12/19/06 08:11
"the red dot" <red@dot.spot> wrote in message
news:2uednSPrxsxs0hrYRVnytQA@eclipse.net.uk...
> ok - and i hope i can explain this...
>
> this is working out of one 'form'
>
> person inputs data into a form
> the 'publish/insert' button would insert it into the database - for
example
> into a 'publish' table - works by giving the form an action ie linking to
a
> input.php script - i can do that.
>
Here is where the client clicks the "submit" button. Data is posted back to
the server, and entered into a database.
Now, at this point you have processed the data, and entered it into the
database, but PHP will now demand to send a page back.
The client won't be able to click the "save" button until the page reloads
the second time. and then only if he clicks it and not the "submit" button.
> and the 'save' button would insert it into the database - for example into
a
> 'save' (not yet ready for 'publishing') table - so (the question is) how
> can i give make this button send the same data from the same form to a
> different ('save') table?
>
But, this couldn't happen in a single page,,, normaly.
>
> i do hope that makes sense though it may be that i am asking the wrong
> question completely.
>
>
You could save the data every time the submit button is pressed, or use an
OPTGROUP within the form. With an OPTGROUP the client could select an
option to either save the data, or not. You could check this value in PHP
when the form is posted back to the server, and act accordingly.
Another solution I can think of would be to use the xmlHTTPreq object, if
javascript dependency isn't a concerne. That way you could post the data
back to the server without the automatic demand for a new page. And the
client could still use the "save" button on the same instance of the page to
do the saving.
HTH
Vince Morgan
[Back to original message]
|