Shockstomp Posted November 13, 2006 Share Posted November 13, 2006 This form is basicly 3 scripts in an attempted "splice"It is supposed to use the basic $stage variable and display accordingly (ie simple cheese form)I also have attempted to splice in an email addr. validation which echoes an error msg if empty or invalid.PROBLEM: There are still many but as of now, my concerns are the following; Why does it open in a new window when submit is clicked?Why does the page show up on step 2 instead of 1? /*if (empty($stage)) { display_contact(); } elseif ($stage == 'equip') { display_equip(); } else { mail(); }*/this is my speculation -- The following is for email address validation:/* $stage=true; <<<<<<<< I think this is setting the stage and making the previous if skip display_contact (is this correct?) if ($_POST){ $from=stripslashes($_POST['from']); // validate e-mail address $valid=eregi('^([0-9a-z]+[-._+&])*[0-9a-z]+@([-0-9a-z]+[.])+[a-z]{2,6}$',$from); $crack=eregi("(\r|\n)(to:|from:|cc:|bcc:)",$message); if ($from && $message && $valid && !$crack){ if (mail($to,"BBI Website Hole Opener Inquiry",$message,'From: '.$from."\r\n",$headers) && mail($from,$confirmationSubject,$confirmationBody.$message,'From: '.$to."\r\n")){ $stage=false;*/Here is the link so you can see what it does.http://www.bitbrokers.com/custom_built_hole_openers.php(Also, I'm not afraid to say that I am a noob with PHP.)The current reason the error message comes up when submit is clicked: contact page not filled out, vars not carried to step 2, validation fails due to missing email address.(I think) Link to comment https://forums.phpfreaks.com/topic/27147-multi-page-form/ Share on other sites More sharing options...
Psycho Posted November 13, 2006 Share Posted November 13, 2006 The [b]TARGET="/custom_built_hole_openers.php"[/b] from your form tag should be [b]action="/custom_built_hole_openers.php"[/b] Link to comment https://forums.phpfreaks.com/topic/27147-multi-page-form/#findComment-124138 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.