function getLink($sa){
if($sa=='1'){
$sa = 'qp_bbl';
} else {
$sa = 'qp_sbl';
}
return $sa;
}
if(!$_POST['action']){
header ("Location: index.php");
}else{
$sa = $_POST['select'];
$sa = getLink($sa);
$link = connect(HOST, USER, PASSWORD, $sa);
(....)
}
This is driving me crazy. Select can be '1' or '2'. If i hard code $sa = '1' or '2' it all works great but if get set it from $_POST['select'] it's a no go. I don't really understand...