Jump to content

Archived

This topic is now archived and is closed to further replies.

rayvee

I need to display next dtabase record when page is refreshed

Recommended Posts

Dear Coderz,
I am starting with developing applications with dreamweaver and php. I need to create a page where this page is refreshed lets say every 15 seconds. What needs to be done when the page is refreshed is that it needs to display the next record from the database. What is the easiest way of doing this? I need to know how to refresh the page. My database hase a Id field in it. Maybe I need to pass the Id parameter to the page url and display the next record? If that is so, how do I go about coding it. Is there a way to do it without using the Id also? Below you will find the code I have up till now. This has been done in dreamweaver 8. Please explain to me how I need to code (detailed).

Thanks in advance,
Raymond.


[code]<?php
//Connection statement
require_once('Connections/Persinfo.php');

// begin Recordset
$query_RSPersinfokpn = "SELECT Id, Naam, Terz, Sign_leng, Sign_post, Sign_huidkl, Sign_haarkl, Sign_haarso, Sign_oogkl, Sign_gelaatv, Sign_bijzh, Image FROM voorvl_gegev";
$RSPersinfokpn = $Persinfo->SelectLimit($query_RSPersinfokpn) or die($Persinfo->ErrorMsg());
$totalRows_RSPersinfokpn = $RSPersinfokpn->RecordCount();
// end Recordset

//PHP ADODB document - made with PHAkt 3.6.0
?>






<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Maininfo</title>
<style type="text/css">
<!--
body {
    margin-left: 5px;
    margin-top: 0px;
}
.style3 {
    font-size: 22px;
    font-weight: bold;
    font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style4 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style6 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: #FF0000;
    font-size: 18px;
}
.style7 {
    font-size: 20px;
    font-weight: bold;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    color: #FF0000;
}
.style9 {font-size: 18px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; }
-->
</style></head>


<body>
<table width="99%" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td width="217" rowspan="6" valign="top"><img src="<?php echo $RSPersinfokpn->Fields('Image'); ?>" hspace="4" vspace="4" width="200" height="200" /></td>
    <td width="8" rowspan="6" valign="top"><p> </p>    </td>
    <td colspan="3" valign="top"><div align="center" class="style7">
      <div align="left">Opsporing en Aanhouding Gevraagd Voor:</div>
    </div></td>
  </tr>
  <tr>
    <td colspan="3" align="left" valign="top"> </td>
  </tr>
  <tr>
    <td width="108" align="left" valign="top"><div align="left"><span class="style3">Naam: </span></div></td>
    <td width="13" align="left" valign="top"> </td>
    <td width="528" align="left" valign="top"><div align="left" class="style7"><?php echo $RSPersinfokpn->Fields('Naam'); ?></div></td>
  </tr>
  <tr>
    <td align="left" valign="top"><span class="style4"></span></td>
    <td width="13" align="left" valign="top"> </td>
    <td align="left" valign="top"><span class="style4"></span></td>
  </tr>
  <tr>
    <td align="left" valign="top"><div align="left"><span class="style9">Ter Zake:</span></div></td>
    <td width="13" align="left" valign="top"> </td>
    <td align="left" valign="top"><div align="left"><span class="style4"></span><span class="style4"></span><span class="style4"></span><span class="style4"></span><?php echo $RSPersinfokpn->Fields('Terz'); ?></div></td>
  </tr>
  
  <tr>
    <td colspan="3" valign="top"> </td>
  </tr>
  <tr>
    <td colspan="5"> </td>
  </tr>
  <tr>
    <td colspan="5"><span class="style6">Signalement:</span></td>
  </tr>
  <tr>
    <td colspan="5"><span class="style4"></span><span class="style4"></span><span class="style4"></span>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="161" valign="top"><span class="style4"><strong>Lengte :</strong></span></td>
          <td width="16" valign="top"><img src="images/spacer.gif" width="5" height="25" /></td>
          <td width="421"><?php echo $RSPersinfokpn->Fields('Sign_leng'); ?></td>
        </tr>
        <tr>
          <td valign="top"><span class="style4"><strong>Postuur :</strong></span></td>
          <td width="16"><img src="images/spacer.gif" width="5" height="25" /></td>
          <td><?php echo $RSPersinfokpn->Fields('Sign_post'); ?></td>
        </tr>
        <tr>
          <td valign="top"><span class="style4"><strong>Huidskleur :</strong></span></td>
          <td width="16"><img src="images/spacer.gif" width="5" height="25" /></td>
          <td><?php echo $RSPersinfokpn->Fields('Sign_huidkl'); ?></td>
        </tr>
        <tr>
          <td valign="top"><span class="style4"><strong>Haarkleur :</strong></span></td>
          <td width="16"><img src="images/spacer.gif" width="5" height="25" /></td>
          <td><?php echo $RSPersinfokpn->Fields('Sign_haarkl'); ?></td>
        </tr>
        <tr>
          <td valign="top"><span class="style4"><strong>Haar Soort : </strong></span></td>
          <td width="16"><img src="images/spacer.gif" width="5" height="25" /></td>
          <td><?php echo $RSPersinfokpn->Fields('Sign_haarso'); ?></td>
        </tr>
        <tr>
          <td valign="top"><span class="style4"><strong>Oog Kleur : </strong></span></td>
          <td width="16">:<img src="images/spacer.gif" width="5" height="25" /></td>
          <td><?php echo $RSPersinfokpn->Fields('Sign_oogkl'); ?></td>
        </tr>
        <tr>
          <td valign="top"><span class="style4"><strong>Gelaatsvorm : </strong></span></td>
          <td width="16"><img src="images/spacer.gif" width="5" height="25" /></td>
          <td><?php echo $RSPersinfokpn->Fields('Sign_gelaatv'); ?></td>
        </tr>
        <tr>
          <td valign="top"><span class="style4"><strong>Bijzonderheden : </strong></span></td>
          <td width="16"><img src="images/spacer.gif" width="5" height="25" /></td>
          <td width="500"><?php echo $RSPersinfokpn->Fields('Sign_bijzh'); ?></td>
        </tr>
      </table>      
    <span class="style4"></span></td>
  </tr>
</table>
</body>
</html>
<?php
$RSPersinfokpn->Close();
?>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.