Jump to content

multi-page form


Shockstomp

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.