"; } if (empty($paper_title)){ $errors=1; $error_msg.="- Paper title is a required field. Please specify the paper title.
"; } if (empty($first_name)){ $errors=1; $error_msg.="- First name is a required field. Please specify the first name.
"; } if (empty($last_name)){ $errors=1; $error_msg.="- Last name is a required field. Please specify the last name.
"; } if (empty($company)){ $errors=1; $error_msg.="- Company is a required field. Please specify the company.
"; } if (empty($address)){ $errors=1; $error_msg.="- Address is a required field. Please specify the address.
"; } if (empty($city)){ $errors=1; $error_msg.="- City is a required field. Please specify the city.
"; } if (empty($country)){ $errors=1; $error_msg.="- Country is a required field. Please specify the country.
"; } //email - valid email address //echo "PHP Version: ".phpversion().'
'; //FILTER_VALIDATE_EMAIL works on PHP 5.2.0 or higher //if(filter_var($email, FILTER_VALIDATE_EMAIL)==FALSE){ $regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/'; if (empty($email)){ $errors=1; $error_msg.="- Email is a required field. Please specify the email address.
"; }elseif (preg_match($regex, $email)==FALSE) { $errors=1; $error_msg.="- Email address is not valid. Please enter a valid email address.
"; } if (empty($registration_fee)){ $errors=1; $error_msg.="- Registration fee is a required field. Please select one type of registration fee.
"; } //no of accompanying persons can be a positive number 0 or more if (!is_int($no_accomp_persons) || $no_accomp_persons < 0){ $errors=1; $error_msg.="- The number of accompanying persons must be a positive integer.
"; } // // //if $errors found redisplay the form with submited data and with error message. else if ($errors==1) { include 'orpform.html'; } else{ //calculate total amount $total_amount += $registration_fee; if ($no_accomp_persons > 0){ /* if ($welcome_cocktail=="welcome-cocktail"){ $total_amount += $no_accomp_persons*30; }*/ //if ($gala_dinner=="gala-dinner"){ $total_amount += $no_accomp_persons*175; // } } //show registration review include 'review-orpform.html'; } //if $_POST['review'] show registration review form //if $_POST['payment'] save registration to db, email registration confirmation form to sohoma13@cimr.pub.ro //and prepare and send data to payment gateway // // //TO DO: // 1. DONE activare validare script browser (comanda onsubmit) // 2. DONE linkuri de submit form catre editare formular // trimitere formulare catre payment gateway (butoane de submit javascript, vezi vmware forum 2013 registration form) // 3. completare formular de pe aceasta pagina cu hidden input fields (copiezi pe cele din formularul de editare/creare) // 4. db pentru stocare registration forms } ?>