Hi,
I'm trying to make a dropdown box pull it's contents from a table called client but the page isn't loading it just goes blank and without the dropdown it loads fine so I've obviously messed this up, it connects to the database ok but just doesn't like what i did with the drop down.
PHP Code:
<td>Referred by:</td><td><select name="referredBy" tabindex="11">
<option value="">Please select a client or the value None</option>
<option value="None">None</option>
<?php
//Assign the query
$query = "SELECT * FROM client ORDER BY clientId ASC";
//Execute the query
$result = mysql_query( $query );
if(!$result){
die ("Could not query the database: <br />". mysql_error());
}
while ($result_row = mysql_fetch_array($result, MYSQL_ASSOC)){
{
echo '<option value="' . $result_row["clientId"] . '">'. $result_row["clientId"] . ' ' . $result_row["firstName"] . ' ' . $result_row["surName"] . '</option>';
}
?>
</select></td>
any help would be greatly appreciated, I'm still really new at php so I'm sorry if my code isn't clearly laid out.
thanks