I have some problem in running this page whan i running three pages have same error on the last line of the page
i could not find any solution ,can someone tell me the procedure how can i run this page
amit6sharma86 0 Newbie Poster
The attachment preview is chopped off after the first 10 KB. Please download the entire file.
<?php
session_start();
include('fun.php');
if(!isset($_SESSION['adnuser'])){
header('Location: index.php?DBGSESSID='.$_REQUEST[DBGSESSID].'.PHPSESSID='.$_REQUEST[PHPSESSID].'.err=Your Session is expire.');
exit;
}
$str = "select * from phone_handling where id = " . $id ."" ;
$result = dbQuery($str);
if($row=dbFetchAssoc($result))
{
if ($_SERVER["http_referer"] != $str3 ){
header("str4");
}
$reg_id = (int)$_REQUEST["Reg_id"];
if( $reg_id != -1 ){
$id = $_REQUEST["Reg_id"];
}elseif( $_REQUEST["id"] != "" and $_REQUEST["id"] != 0 ){
$id = $_REQUEST["id"] ;
}
//server.execute "matching_result3.php";
//}
$id = (int)$id;
$str = $_SERVER['HTTP_HOST'];
$str1 = "/matching_critaria_indiv.php";
$str2 = "/index.html";
$str3 = "http://" . $str . $str1;
$str4 = "http://" . $str . $str2;
$str5 = "http://" . $str . "/welcome.php";
$str6 = "http://" . $str . "/logout.php";
//echo $str3 . "<BR>";
//echo $str4 . "<BR>";
//echo request.servervariables("http_referer") ;
//exit;
if( $_SERVER['HTTP_REFERER'] != $str3 ){
header("location". $str4."");
}
$str ="";
$str1 = "";
$str2 = "";
if (session("username") == "" ){
header("Location :post_regi$strationform1.htm");
$id = $REQUEST("id");}
if ($id == "" ){
$id = -1;}
else{
$id = (int)($id) ;
}
$ca_fname = trim($_REQUEST("ca_fname"));
$ca_mname = trim($_REQUEST("ca_mname"));
$ca_lname = trim($_REQUEST("ca_lname"));
$ca_relation1 = trim($_REQUEST("ca_relation1"));
$ca_pin = trim($_REQUEST("ca_pin"));
$ca_ph_type_11 = trim($_REQUEST("ca_ph_type_11"));
$ca_std_1 = trim($_REQUEST("ca_std_1"));
$ca_ph_1 = trim($_REQUEST("ca_ph_1"));
$ca_ph_type_21 = trim($_REQUEST("ca_ph_type_21"));
$ca_std_2 = trim($_REQUEST("ca_std_2"));
$ca_ph_2 = trim($_REQUEST("ca_ph_2"));
$ca_mobile = trim($_REQUEST("ca_mobile"));
$ca_email = trim($_REQUEST("ca_email"));
$cp_fname = trim($_REQUEST("cp_fname"));
$cp_mname = trim($_REQUEST("cp_mname"));
$cp_lname = trim($_REQUEST("cp_lname"));
$cp_relation1 = trim($_REQUEST("cp_relation1"));
$cp_pin = trim($_REQUEST("cp_pin"));
$cp_ph_type_11 = trim($_REQUEST("cp_ph_type_11"));
$cp_std_1 = trim($_REQUEST("cp_std_1"));
$cp_ph_1 = trim($_REQUEST("cp_ph_1"));
$cp_ph_type_21 = trim($_REQUEST("cp_ph_type_21"));
$cp_std_2 = trim($_REQUEST("cp_std_2"));
$cp_ph_2 = trim($_REQUEST("cp_ph_2"));
$cp_mobile = trim($_REQUEST("cp_mobile"));
$cp_email = trim($_REQUEST("cp_email"));
$cdt_fname = trim($_REQUEST("cdt_fname"));
$cdt_mname = trim($_REQUEST("cdt_mname"));
$cdt_lname = trim($_REQUEST("cdt_lname"));
$cdt_ph_type_11 = trim($_REQUEST("cdt_ph_type_11"));
$cdt_pin = trim($_REQUEST("cdt_pin"));
$cdt_std_1 = trim($_REQUEST("cdt_std_1"));
$cdt_ph_1 = trim($_REQUEST("cdt_ph_1"));
$cdt_ph_type_21 = trim($_REQUEST("cdt_ph_type_21"));
$cdt_std_2 = trim($_REQUEST("cdt_std_2"));
$cdt_ph_2 = trim($_REQUEST("cdt_ph_2"));
$cdt_mobile = trim($_REQUEST("cdt_mobile"));
$cdt_email = trim($_REQUEST("cdt_email"));
$str = "select * from phone_handling ";
$str1 = " where ";
if ($id != -1 );
$str2 = " id = " . $id;
if ($ca_fname != "" );
if( $str2 = "" ){
$str2 = " ca_fname like '" . $ca_fname . "%' ";}
else{
$str2 = $str2 . " and ca_fname like '" . $ca_fname . "%' ";
}
if( $ca_mname != "" );
if ($str2 = "" ){
$str2 = "ca_mname like '" . $ca_mname . "%' ";}
else{
$str2 = $str2 . "and ca_mname like '" . $ca_mname . "%' ";
}
if ($ca_lname != "" );
if ($str2 = "" ){
$str2 = "ca_lname like '" . $ca_lname . "%' ";}
else{
$str2 = $str2 . "and ca_lname like '" . $ca_lname . "%' ";
}
if ($ca_relation1 != "" );
if ($str2 = "" ){
$str2 = "ca_relation1 like '" . $ca_relation1 . "%' ";}
else{
$str2 = $str2 . "and ca_relation1 like '" . $ca_relation1 . "%' ";
}
if ($ca_pin != "" );
if( $str2 = "" ){
$str2 = "ca_pin like '" . $ca_pin . "%' ";}
else{
$str2 = $str2 . "and ca_pin like '" . $ca_pin . "%' ";
}
if ($ca_ph_type_11 != "" or $ca_std_1 != "" or $ca_ph_1 != "" )
if ($str2 = "" ){
$str2 = "((ca_ph_type_11 like '" . $ca_ph_type_11 . "%' and ca_std_1 like '" . $ca_std_1 . "%' and ca_ph_1 like '" . $ca_ph_1 . "%') ";}
else{
$str2 = $str2 . " and ((ca_ph_type_11 like '" . $ca_ph_type_11 . "%' and ca_std_1 like '" . $ca_std_1 . "%' and ca_ph_1 like '" . $ca_ph_1 . "%') ";
}
$str2 = $str2 . " or ( ca_ph_type_21 like '" . $ca_ph_type_11 . "%' and ca_std_2 like '" . $ca_std_1 . "%' and ca_ph_2 like '" . $ca_ph_1 . "%'))";
if ($ca_ph_type_21 != "" or $ca_std_2 != "" or $ca_ph_2 != "" );
if ($str2 = "" ){
$str2 = " ((ca_ph_type_11 like '" . $ca_ph_type_21 . "%' and ca_std_1 like '" . $ca_std_2 . "%' and ca_ph_1 like '" . $ca_ph_2 . "%') ";}
else{
$str2 = $str2 . " and ((ca_ph_type_11 like '" . $ca_ph_type_21 . "%' and ca_std_1 like '" . $ca_std_2 . "%' and ca_ph_1 like '" . $ca_ph_2 . "%') ";
}
$str2 = $str2 . " or (ca_ph_type_21 like '" . $ca_ph_type_21 . "%' and ca_std_2 like '" . $ca_std_2 . "%' and ca_ph_2 like '" . $ca_ph_2 . "%')) ";
if ($ca_mobile != "" );
if( $str2 = "" ){
$str2 = "(ca_mobile like '" . $ca_mobile . "%') ";}
else{
$str2 = $str2 . " and (ca_mobile like '" . $ca_mobile . "%') ";
}
if( $ca_email != "" );
if( $str2 = "" ){
$str2 = "(ca_email like '" . $ca_email . "%')";}
else{
$str2 = $str2 . " and ( ca_email like '" . $ca_email . "%' )";
}
if( $cp_fname != "");
if( $str2 = "" ){
$str2 = "cp_fname like '" . $cp_fname . "%' ";}
else{
$str2 = $str2 . " and cp_fname like '" . $cp_fname . "%' ";
}
if ($cp_mname != "" );
if( $str2 = "" ){
$str2 = "cp_mname like '" . $cp_mname . "%' ";}
else{
$str2 = $str2 . "and cp_mname like '" . $cp_mname . "%' ";
}
if ($cp_lname != "" );
if ($str2 = "" ){
$str2 = "cp_lname like '" . $cp_lname . "%' ";}
else{
$str2 = $str2 . "and cp_lname like '" . $cp_lname . "%' ";
}
if ($cp_relation1 != "" );
if( $str2 = "" ){
$str2 = "cp_relation1 like '" . $cp_relation1 . "%' ";}
else{
$str2 = $str2 . "and cp_relation1 like '" . $cp_relation1 . "%' ";
}
if ($cp_pin != "" );
if( $str2 = "" ){
$str2 = "cp_pin like '" . $cp_pin . "%' ";}
else{
$str2 = $str2 . "and cp_pin like '" . $cp_pin . "%' ";
}
if ($cp_ph_type_11 != "" or $cp_std_1 != "" or $cp_ph_1 != "" )
if( $str2 = ""){
$str2 = "((cp_ph_type_11 like '" . $cp_ph_type_11 . "%' and cp_std_1 like '" . $cp_std_1 . "%' and cp_ph_1 like '" . $cp_ph_1 . "%') ";}
else{
$str2 = $str2 . " and ((cp_ph_type_11 like '" . $cp_ph_type_11 . "%' and cp_std_1 like '" . $cp_std_1 . "%' and cp_ph_1 like '" . $cp_ph_1 . "%') ";
$str2 =$ $str2 . " or ( cp_ph_type_21 like '" . $cp_ph_type_11 . "%' and cp_std_2 like '" . $cp_std_1 . "%' and cp_ph_2 like '" . $cp_ph_1 . "%'))";
}
if ($cp_ph_type_21 != "" or $cp_std_2 != "" or $cp_ph_2 != "" )
if( $str2 = "" ){
$str2 = " ((cp_ph_type_11 like '" . $cp_ph_type_21 . "%' and cp_std_1 like '" . $cp_std_2 . "%' and cp_ph_1 like '" . $cp_ph_2 . "%') ";}
else{
$str2 = $str2 . " and ((cp_ph_type_11 like '" . $cp_ph_type_21 . "%' and cp_std_1 like '" . $cp_std_2 . "%' and cp_ph_1 like '" . $cp_ph_2 . "%') ";
$str2 = $str2 . " or (cp_ph_type_21 like '" . $cp_ph_type_21 . "%' and cp_std_2 like '" . $cp_std_2 . "%' and cp_ph_2 like '" . $cp_ph_2 . "%')) ";
}
if ($cp_mobile != "" );
if( $str2 = "" ){
$str2 = "(cp_mobile like '" . $cp_mobile . "%') ";}
else{
$str2 = $str2 . " and (cp_mobile like '" . $cp_mobile . "%') ";
}
if ($cp_email != "" );
if ($str2 = "" ){
$str2 = "(cp_email like '" . $cp_email . "%')";}
else{
$str2 = $str2 . " and ( cp_email like '" . $cp_email . "%' )";
}
if ($cdt_fname != "");
if( $str2 = "" ){
$str2 = "cdt_fname like '" . $cdt_fname . "%' ";}
else{
$str2 = $str2 . " and cdt_fname like '" . $cdt_fname . "%' ";
}
if ($cdt_mname != "" );
if( $str2 = "" ){
$str2 = "cdt_mname like '" . $cdt_mname . "%' ";}
else{
$str2 = $str2 . "and cdt_mname like '" . $cdt_mname . "%' ";
}
if ($cdt_lname != "" );
if ($str2 = "" ){
$str2 = "cdt_lname like '" . $cdt_lname . "%' ";}
else{
$str2 = $str2 . "and cdt_lname like '" . $cdt_lname . "%' ";
}
if ($cdt_pin != "" );
if( $str2 = "" ){
$str2 = "cdt_pin like '" . $cdt_pin . "%' ";}
else{
$str2 = $str2 . "and cdt_pin like '" . $cdt_pin . "%' ";
}
if ($cdt_ph_type_11 != "" or $cdt_std_1 != "" or $cdt_ph_1 != "" )
if ($str2 = "" ){
$str2 = "((cdt_ph_type_11 like '" . $cdt_ph_type_11 . "%' and cdt_std_1 like '" . $cdt_std_1 . "%' and cdt_ph_1 like '" . $cdt_ph_1 . "%') ";}
else{
$str2 = $str2 . " and ((cdt_ph_type_11 like '" . $cdt_ph_type_11 . "%' and cdt_std_1 like '" . $cdt_std_1 . "%' and cdt_ph_1 like '" . $cdt_ph_1 . "%') ";
$str2 = $str2 . " or ( cdt_ph_type_21 like '" . $cdt_ph_type_11 . "%' and cdt_std_2 like '" . $cdt_std_1 . "%' and cdt_ph_2 like '" . $cdt_ph_1 . "%'))";
}
if ($cdt_ph_type_21 != "" or $cdt_std_2 != "" or $cdt_ph_2 != "" )
if( $str2 = "" ){
$str2 = " ((cdt_ph_type_11 like '" . $cdt_ph_type_21 . "%' and cdt_std_1 like '" . $cdt_std_2 . "%' and cdt_ph_1 like '" . $cdt_ph_2 . "%') ";}
else{
$str2 = $str2 . " and ((cdt_ph_type_11 like '" . $cdt_ph_type_21 . "%' and cdt_std_1 like '" . $cdt_std_2 . "%' and cdt_ph_1 like '" . $cdt_ph_2 . "%') ";
$str2 = $str2 . " or (cdt_ph_type_21 like '" . $cdt_ph_type_21 . "%' and cdt_std_2 like '" . $cdt_std_2 . "%' and cdt_ph_2 like '" . $cdt_ph_2 . "%')) ";
}
if ($cdt_mobile != "" );
if ($str2 = "" ){
$str2 = "(cdt_mobile like '" . $cdt_mobile . "%') ";}
else{
$str2 = $str2 . " and (cdt_mobile like '" . $cdt_mobile . "%') ";
}
if( $cdt_email != "" );
if ($str2 = "" ){
$str2 = "(cdt_email like '" . $cdt_email . "%')";}
else{
$str2 = $str2 . " and ( cdt_email like '" . $cdt_email . "%' )";
}
if ($str2 != "" );{
$str = $str . $str1 . $str2;
}
echo $str
?>
<!
Suomedia 5 Junior Poster
You have a missing curly bracket, clearly the one you have commented here:
//server.execute "matching_result3.php";
//}
Matti Ressler
Suomedia
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.