Even more M. Lemos's form class questions

From: Date: Sun, 29 Oct 2000 08:45:05 +0000
Subject: Even more M. Lemos's form class questions
Groups: php.general 
Request: Send a blank email to php-general+get-22532@lists.php.net to get a copy of this message
Thank you for your answers, Manuel! I have one more - hopefully the last :) - questions, regarding the form class: On my form page I have this to deal with after validation issues (showing a confirmation message and let the user return to an other page to select other form(s) to fill out, while carrying over some of the just submitted data): On the original form script page I have this: // form was submitted if($doit) { // create a new form // with a new URL where I want to go after this page $quit=new form_class; $quit->NAME="subscription_form"; $quit->METHOD="POST"; $quit->ACTION="index.phtml?session=$session"; // put here to hidden fields all data I want to carry over to the new destination $quit->AddInput(array( "TYPE"=>"hidden", "NAME"=>"quit", "ID"=>"quit", "VALUE"=>"quit" )); $quit->AddInput(array( "TYPE"=>"submit", "VALUE"=>"Return to forms", "NAME"=>"submit" )); $quit->AddDataPart(" // here I build the confirmation text with // showing the submitted data "); $quit->AddInputPart("quit"); // $quit->AddInputPart("submit"); $quit->Output(array( "Function"=>"Output", "EndOfLine"=>"\n" )); exit(); } The result: the confirmation page shows up with the quit button: <html> <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title></title> </head> <body ONLOAD="PageLoad()" bgcolor="white" text="black" link="red" vlink="#990000" alink="white"> <FORM METHOD="POST" ACTION="index.phtml?session=4658998as78876" NAME="quit_form" ONSUBMIT="return true"> confirmation blah blah <INPUT TYPE="submit" NAME="submit" VALUE="Return to forms" ONCLICK="sub_form='' ; return true"> </FORM> a) Please note the missing </body></html> tags. b) If I press the Return to forms button, the original blank form shows up. How could I leave the validated form? Thank you for the help. Art __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/

« previous php.general (#22532) next »