A better way???
Posted: Sun Sep 21, 2003 7:45 pm
I'm trying to make a button to navigate from one record to the next. So essentially I'll have previous, next, first and last. Now I thought I was on to something with the following code...
But... I got the following once I clicked on the next record link
Forbidden
You don't have permission to access /SELECT * FROM tblEmployee WHERE EmployeeID=2 on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/2.0.47 (Win32) PHP/4.3.3 Server at localhost Port 80
What is going wrong? Is there a better way to navigate records in a database?
Code: Select all
<?php
<p align=center><a href="<?= $query = "SELECT * FROM tblEmployee WHERE EmployeeID=2"; // get second record
$result = mysql_query($query) or die("Query failed : " . mysql_error()); ?>">Next Record</a></p>
?>Forbidden
You don't have permission to access /SELECT * FROM tblEmployee WHERE EmployeeID=2 on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/2.0.47 (Win32) PHP/4.3.3 Server at localhost Port 80
What is going wrong? Is there a better way to navigate records in a database?