kalidust
23-01-2005, 14:02/02:02PM
I'm not sure what to do to correct this.
If you go to www.ladir.org/gov , the links for the url are like
http://www.ladir.org/gov/leg.php?reg=1&cat=sen
That doesn't validate cuz of the & in the url
so I had changed it to &s; , however when it goes to the leg.php page, the "cat_print" I have set up - example
if ($reg=="1" && $cat=="sen"){
$cat_print = "Region 1 Senators";
}
elseif ($reg=="1" && $cat=="rep"){
$cat_print = "Region 1 Representatives";
}
elseif ($reg=="2" && $cat=="sen"){
$cat_print = "Region 2 Senators";
}
doesn't display cuz it doesn't match what the url is.
the sql is
$sql_where = ( !empty($cat) ) ? "WHERE title = '$cat' " : "";
$sql_where .= ( !empty($reg) ) ? ( ( !empty($sql_where) ) ? " && (region ='$reg' or region2 = '$reg' or region3 = '$reg') " : "WHERE region ='$reg' " ) : "";
$sql_where .= ( !empty($com) ) ? ( ( !empty($sql_where) ) ? " && (com1 ='$com' OR com2 = '$com') " : "WHERE com1 ='$com' OR com2 = '$com' " ) : "";
Any thoughts on what could be done?
If you go to www.ladir.org/gov , the links for the url are like
http://www.ladir.org/gov/leg.php?reg=1&cat=sen
That doesn't validate cuz of the & in the url
so I had changed it to &s; , however when it goes to the leg.php page, the "cat_print" I have set up - example
if ($reg=="1" && $cat=="sen"){
$cat_print = "Region 1 Senators";
}
elseif ($reg=="1" && $cat=="rep"){
$cat_print = "Region 1 Representatives";
}
elseif ($reg=="2" && $cat=="sen"){
$cat_print = "Region 2 Senators";
}
doesn't display cuz it doesn't match what the url is.
the sql is
$sql_where = ( !empty($cat) ) ? "WHERE title = '$cat' " : "";
$sql_where .= ( !empty($reg) ) ? ( ( !empty($sql_where) ) ? " && (region ='$reg' or region2 = '$reg' or region3 = '$reg') " : "WHERE region ='$reg' " ) : "";
$sql_where .= ( !empty($com) ) ? ( ( !empty($sql_where) ) ? " && (com1 ='$com' OR com2 = '$com') " : "WHERE com1 ='$com' OR com2 = '$com' " ) : "";
Any thoughts on what could be done?