hi lads, i’m trouble with an error message that i can’t resolve. The error is on line 91 of this code, it would seem to be a syntax error but i can’t see it. Any takers?
I highlighted the area in question with the tag (line 91 error) in the code, but i feel the error maybe just before that…i’m not sure thou, i have only been using php steadily for about a month now. The error i receive is
[QUOTE]
Warning: Failed opening ‘join_form2.html’ for inclusion (include_path=’.;C:IBserverphpincludes;C:IBserverphppear’) in c:ibserverwwwpsaccountregister1.php on line 91
all the files are in the same directory.
[code=php]<?
include ‘db.php’;
// Define post fields into simple variables
$first_name = $_POST[‘first_name’];
$last_name = $_POST[‘last_name’];
$email_address = $_POST[’email_address’];
$phone =$_POST[‘phone’];
$username = $_POST[‘username’];
$ccname = $_POST[‘ccname’];
$cctype = $_POST[‘cctype’];
$ccnum = $_POST[‘ccnum’];
$ccsec = $_POST[‘ccsec’];
$street = $_POST[‘street’];
$street2 = $_POST[‘street2’];
$city = $_POST[‘city’];
$country = $_POST[‘country’];
$month = $_POST[‘month’];
$year = $_POST[‘year’];
/* Do some error checking on the form posted fields */
function check_first_name($first_name){
if(!preg_match(“/[^a-zA-Z.-ßäÄüÜöÖ ]+$/s”,$first_name)) return TRUE;
else return FALSE;
}
if(!check_first_name($first_name)){
echo “Your first name should not contain any characters other than A-Z or a-z”;
//$error++; // $error=$error+1;
include ‘join_form2.html’;
exit();
}
function check_last_name($last_name){
if(!preg_match(“/[^^a-zA-Z.-ßäÄüÜöÖ ]+$/”,$last_name)) return TRUE;
else return FALSE;
}
if(!check_last_name($lasnt_name)){
echo “Your last name should not contain any characters other than A-Z or a-z”;
//$error++; // $error=$error+1;
include ‘join_form2.html’;
exit();
}
if((!$first_name) || (!$last_name) || (!$email_address) || (!$username)){
//(!$ccname) || (!$cctype) || (!$ccnum) || //(!$ccsec) || (!$month) || (!$year) || (!$street) || (!$street2) || (!$city) || (!$country) || (!$username)){
echo ‘You did not submit the following required information! <br />’;
if(!$first_name){
echo “First Name is a required field. Please enter it below.<br />”;
}
if(!$last_name){
echo “Last Name is a required field. Please enter it below.<br />”;
}
if(!$email_address){
echo “Email Address is a required field. Please enter it below.<br />”;
}
if(!$username){
echo “Desired Username is a required field. Please enter it below.<br />”;
}
if(!preg_match(‘/^[a-z]{5,15}$/i’, $username)){
echo “your username contains invalid characters. <br />”;
}
include ‘join_form2.html’; (line 91 error)
exit();
}
//error checking………more code after that…..