Current location: Hot Scripts Forums » Programming Languages » PHP » Page not showing new DB update!!


Page not showing new DB update!!

Reply
  #1 (permalink)  
Old 09-15-06, 11:34 PM
webdevised webdevised is offline
Newbie Coder
 
Join Date: Sep 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Page not showing new DB update!!

I made this CMS that would allow a band to login and update their show list. The problem I am having is that after they have updated their show list and then use the link to go to the page that displays the shows the page is not updated.. I have to hit the refresh button to have the new shows displayed.

What am I doing wrong??

I am using PHP and MYsql,

-Thanks Brad-

this is the code for the "View" Page
PHP Code:

<?php include("pwp.php"); ?>


<?
include("dbinfo.inc.php");
mysql_connect($host,$username,$password);
@
mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM contacts ORDER BY id ASC";
$result=mysql_query($query);

$num=mysql_numrows($result); 

mysql_close();

?>

<table border="0" cellspacing="2" cellpadding="2">
<tr> 
<th><font face="Arial, Helvetica, sans-serif">Name</font></th>
<th><font face="Arial, Helvetica, sans-serif">Phone</font></th>
<th><font face="Arial, Helvetica, sans-serif">Mobile</font></th>
<th><font face="Arial, Helvetica, sans-serif">Fax</font></th>
<th><font face="Arial, Helvetica, sans-serif">E-mail</font></th>
<th><font face="Arial, Helvetica, sans-serif">Website</font></th>
<th><font face="Arial, Helvetica, sans-serif">&nbsp;</font></th>
</tr>

<?
$i
=0;
while (
$i $num) {
$id=mysql_result($result,$i,"id");
$first=mysql_result($result,$i,"first");
$last=mysql_result($result,$i,"last");
$phone=mysql_result($result,$i,"phone");
$mobile=mysql_result($result,$i,"mobile");
$fax=mysql_result($result,$i,"fax");
$email=mysql_result($result,$i,"email");
$web=mysql_result($result,$i,"web"); 
?>

<tr> 
<td><font face="Arial, Helvetica, sans-serif"><? echo "$first $last"?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$phone"?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$mobile"?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$fax"?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><a href="mailto:<? echo "$email"?>">E-mail</a></font></td>
<td><font face="Arial, Helvetica, sans-serif"><a href="<? echo "$web"?>">Website</a></font></td>
<td><font face="Arial, Helvetica, sans-serif"><a href="update.php?id=<? echo "$id"?>">Edit</a>&nbsp;&nbsp;&nbsp;<a href="delete.php?id=<? echo "$id"?>">delete</a></font></td>
</tr>
<?
++$i;

echo 
"</table><BR /><br /><a href=\"add.php\">Add Info</a>&nbsp;|&nbsp;<a href=\"pwp.php?logout\">logout</a>";


?>

Last edited by webdevised; 09-16-06 at 12:16 AM.
Reply With Quote
  #2 (permalink)  
Old 09-16-06, 05:55 PM
jfulton's Avatar
jfulton jfulton is offline
Community VIP
 
Join Date: Apr 2006
Location: Los Angeles, CA
Posts: 660
Thanks: 0
Thanked 0 Times in 0 Posts
You might want to play with the cache control in the header of your document to make sure the client isn't cacheing the document. It also might be a setting in your browser (I've had problems with IE cacheing certain jsp pages and images) but you most likely will be able to fix it by specifying the correct parameters in the header.

http://codedump.jonasjohn.de/snippets/headers.htm
http://www.web-caching.com/mnot_tutorial/
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
need help creating an update & confirm page mikewooten PHP 1 11-08-04 04:28 PM
need help creating an update page within admin mikewooten PHP 2 11-01-04 10:39 PM
Help with multipart update form into MySQL DB... jimb575 PHP 0 07-01-04 02:42 PM
Classified Ads skipper23 Perl 2 12-30-03 03:43 AM


All times are GMT -5. The time now is 07:28 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.