<?php
//LOAD USER
$result = mysql_query("SELECT * FROM event");
while ($data = mysql_fetch_array($result)){
?>

<tr>
<td><?php echo $data['event'];?></td>
<td><?php echo $data['tempat'];?></td>
<td><?php echo readDate($data['mulai']);?></td>
<td><?php echo readDate($data['selesai']);?></td>

>

I have this error:

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\php_template2\event_manager.php on line 206

Line 206 is: while ($data = mysql_fetch_array($result)){


What's wrong with it?

Thanks.

It will fail if mysql_query returns an error. Did you forget to connect to your server/database perhaps ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.