Hi mike,
Get this variable in url:
?client=Abbey+National%2FInscape+UK&subfund=not_set&director=not_set&contact=not_set&submit=Continue
Still get blank page.
Any ideas?
Heres my code on the following page that checks fields, etc.:
PHP Code:$client = $_POST['client'];
// Connect to Database
$conn = db_connect();
if (!$conn)
return 'Could not connect to Database;';
// Perform Query
$query="select * from client as c, director as d, contact as co, subfund as s where c.client = '$client' and c.client_ID=s.client_ID";
if(isset($_POST['subfund']!= 'not_set')) {
$subfund = $_POST['subfund'];
$query .=" and s.subfund='$subfund'";
}
if(isset($_POST['director']!= 'not_set')) {
$director = $_POST['director'];
$query .=" and d.director='$director' and d.director_ID=s.director_ID";
}
if(isset($_POST['contact']!= 'not_set')) {
$contact = $_POST['contact'];
$query .=" and co.name='$contact' and co.contact_ID=s.contact_ID";
}
$result = mysql_query($query) or die(mysql_error());
$num_results = mysql_num_rows($result);
echo '<p><span class="header">Director Selected: '.$director.'</span></p>';
echo '<table width="600" border="1" cellspacing="2" cellpadding="0">';
for ($i=0; $i<$num_results; $i++)
{
$row = mysql_fetch_array($result);
echo '<tr><td>Client:</td><td>'.$row['client'].'</td></tr>';
echo '<tr><td>Entity: </td><td>'.$row['entity'].'</td></tr>';
echo '<tr><td>Subfund: </td><td>'.$row['subfund'].'</td></tr>';
}
echo '</table>';
and heres my select menus:
PHP Code:$select_echo_1 = "<option value=\"not_set\">Select Client</option>";
$select_echo_2 = "<option value=\"not_set\">Select Subfund</option>";
$select_echo_3 = "<option value=\"not_set\">Select Director</option>";
$select_echo_4 = "<option value=\"not_set\">Select Name</option>";
while ($row = mysql_fetch_array($result))
{
$select_echo_1 .= "<option value='" . $row["client"] . "'>" . $row["client"] . "</option>";
$select_echo_2 .= "<option value='" . $row["subfund"] . "'>" . $row["subfund"] . "</option>";
$select_echo_3 .= "<option value='" . $row["director"] . "'>" . $row["director"] . "</option>";
$select_echo_4 .= "<option value='" . $row["name"] . "'>" . $row["name"] . "</option>";
}
echo("<select name='client'>$select_echo_1</select><br /><br />");
echo("<select name='subfund'>$select_echo_2</select><br /><br />");
echo("<select name='director'>$select_echo_3</select><br /><br />");
echo("<select name='contact'>$select_echo_4</select><br /><br />");







Bookmarks