mysqli while loop not retriving ahref
Posted: Wed May 18, 2016 8:12 pm
Hi.
I'm having an issue with the ahref linking to the file of each row correctly. if I echo the path, it displays correctly, but not when i add the path to the ahref. Any help would be appreciated.
I'm having an issue with the ahref linking to the file of each row correctly. if I echo the path, it displays correctly, but not when i add the path to the ahref. Any help would be appreciated.
Code: Select all
<?php
$company_presentation_list_query = "SELECT * FROM company_presentations ORDER BY date DESC";
$company_presentation_result = mysqli_query($dbc, $company_presentation_list_query) or trigger_error("Query Failed! SQL: $query - Error: ". mysqli_error($mysqli), E_USER_ERROR);
if($company_presentation_result) {
while($company_presentation_result_row = mysqli_fetch_assoc($company_presentation_result)) {
$path = "images/" . $company_presentation_result_row['company_name']. "/" . $company_presentation_result_row['presentation_file_name'] ;
echo '<li><em><a href=' . $path . ">" . $company_presentation_result_row['presentation_name'] . '</a></em> <small>' . $company_presentation_result_row['date']. '</small>';
echo '<span class="uk-float-right"><a href="del_presentsation.php?id=' . $company_presentation_result_row['id'] . '">Delete</a> </span>';
}
echo "<br />";
}
?>