<?php
echo '<form method="post">';
$rows = db_select("SELECT idcompany, company FROM company order by idcompany;");
if($rows === false) {
$error = db_error();
echo "<ul class='error'>";
echo "<li class='error'>Error : $error </li> ";
echo "</ul>";
}
?><label>Company: </label><?php
?><select id="Company" onChange=" onChange="location.reload()"> <?php
foreach($rows as $row){
echo "<option value='" . $row['idcompany'] ."'>" . $row['company'] ."</option>";
}
echo '</select>';
echo '</form>';
?>
// SELECT * FROM notifications_vw where idcompany = $id_company
$id_company = $_GET['Company'];
$rows = db_select("SELECT * FROM notifications_vw where idcompany = $id_company");
if($rows === false) {
$error = db_error();
echo $error;
}
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE