Question
If Else - select all drop down
PHP/MySQL
Form Post
Drop Down
I want to retrieve all results when users choose the defaulted drop down option of 'select all'.
How to I create the database query on the results page?
I attempted an if else statement, but this leaves the page blank. Would if else be the correct approach?... and if so, where is my syntax error?
if (isset($_POST['securityclearance']) == '' {
$colname_rs == "#";
}
else {
$colname_rs = "-1";
if (isset($_POST['id'])) {
$colname_rs = $_POST['id'];
}
mysql_select_db($database_connDB2, $connDB2);
$query_rs = sprintf("SELECT j* FROM X
WHERE id = %s", GetSQLValueString($colname_rs, "int"));
$rs = mysql_query($query_rs, $connDB2) or die(mysql_error());
$row_rs = mysql_fetch_assoc($rs);
$totalRows_rs = mysql_num_rows($rs);
