xhtml question

Associate
Joined
26 Jan 2006
Posts
1,502
Hello,

I want to implement a preview button like the "Preview Post" in the forum here.

My thought is to have two actions in my form,

action 1 will call "post.php" and pass the variables with "post"

action 2 will reload the same form but with the preview ontop of the editor using the variables from "post" for the preview and to reload the contents of the editor



The question is, is possible to have 2 actions for 1 form?

thanks
 
If I am understanding what you want, then the answer to your question is no, but for what you wish to do, you would use Session variables in php.

Something like and this probably wont be code that works, i am switching between VB.NET and php at the moment so i might get confused:

Code:
<?

if($_POST['preview']){
   //Preview and create session variables, and then redirect back to the posting page
}elseif($_POST['submit']){
   //Submit the article/post and redirect to confirmation page
}

?>

EDIT:

Have a look here: PHP: Session Handing Functions
 
Last edited:
Back
Top Bottom