Hi,
I have a few issues i need to address with app that I'm hoping someone can help me with! Pretty please
Firstly. My sessions! Basically i need to assign some pages to be viewed by only users and some by only admin. At the moment, you type in the address of any of the pages and you can see them. I need to get my sessions working too.
Secondly i'm trying to extract data from a MySQL table into a html/php table to be viewed.
That's my code and i'm getting this error : Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given. Anyone can help me with that?
Thanks in advance!
I have a few issues i need to address with app that I'm hoping someone can help me with! Pretty please
Firstly. My sessions! Basically i need to assign some pages to be viewed by only users and some by only admin. At the moment, you type in the address of any of the pages and you can see them. I need to get my sessions working too.
Secondly i'm trying to extract data from a MySQL table into a html/php table to be viewed.
Code:
<?php
include ('/content/base.php');
$query1 = mysql_query("SELECT * FROM testablishment");
echo "<table border ='1'>
<tr>
<th>Establishment ID</th>
<th>Establishment Name</th>
<th>Establishment URL</th>
<th>User ID</th>
</tr>";
while($row = mysql_fetch_array($query1)){
echo "<tr>";
echo "<td>" . $row['cEstablishmentID'] . "</td>";
echo "<td>" . $row['cEstablishmentName'] . "</td>";
echo "<td>" . $row['cEstablishmenURL'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
That's my code and i'm getting this error : Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given. Anyone can help me with that?
Thanks in advance!