PHP - How Do I Remove Cache Limiter Error? Urgent!
Hi Guys,
I am building this website for experimental data collection. I am getting the below error at the bottom of the website but don't know how it has creep-ed in. Kindly help me out in this issue. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/computat/public_html/b2.php:199) in /home/computat/public_html/_config-rating.php on line 21. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id='b2'' at line 1 My _config-rating.php file is: Code: [Select] <html> <head> <title> Do you Like/Dislike this image? </title> </head> <body> <h1> Do you Like/Dislike this image? </h1> <form name="form1" method ="post"> <input type="submit" name="Like" value="Like"> <input type="submit" name="Dislike" value="dislike"> </form> </body> </html> <?php session_start(); ob_start(); $host="localhost"; $username="computat_abhi"; $password="1123581321"; $databasename="computat_button"; $tbl_name="record"; $db=mysql_connect ("localhost", "computat_abhi", "1123581321")or die(mysql_error()); mysql_select_db($databasename, $db) or die(mysql_error()); if( isset($_POST['Like']) ) { $sql = 'INSERT INTO record(ImageNumber,LikeCounter) VALUES (\'b1\', 1)'; mysql_query($sql, $db) or die(mysql_error()); echo 'Like vote was registered'; } elseif(isset($_POST['Dislike'])){ $sql = 'INSERT INTO record(ImageNumber,DislikeCounter) VALUES (\'b1\', 1)'; mysql_query($sql, $db) or die(mysql_error()); echo 'Dislike vote was registered'; } Please help me out as soon as possible. Thanks :) ob_end_flush(); ?> Please help me out Similar TutorialsWarning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/hedgehog/public_html/class/class.phpmailer.php:3005) in /home/hedgehog/public_html/admin/class/authenticate.class.php on line 15 I own a website, www.gpstudios.com Some time ago I started recieiving this error after posting comments on the playgame page/news page. Try posting comments yourself on this game: http://www.gpstudios.com/playgame.php?gameid=324 I have attached a picture of the error. Unfortunately, I have no idea when this bug appeared. It must have happened a while ago, but I never noticed. Anyone know how or why I am getting this bug? Because I'm unsure as to where/when the error occurred, I cannot supply the code. Sorry for the lack of details, but I'm hoping someone will understand this error a little better than me :S Thanks, -Tom I am getting an error message. But the program works Code: [Select] Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\Exam_Online\try.php:3) in C:\xampp\htdocs\Exam_Online\Staff_login_process.php on line 4 Wrong Username or Password my code is <Html> <?php //session_start(); include 'Staff_login_process.php'; MYSQL_CONNECT(localhost,'root','') OR DIE("Unable to connect to database"); @mysql_select_db(Examination) or die( "Unable to select database"); ?> <body> <form action="try1.php" method="post"> <?PHP $query=("SELECT * FROM User u, User_X_Subject us, Subject s WHERE u.Use_Name = '{$_SESSION['username']}' AND u.Use_ID= us.Use_ID AND s.Sub_ID=us.Sub_ID"); $result=mysql_query($query) or die ("Unable to Make the Query:" . mysql_error() ); echo "<select name=myselect>"; while($row=mysql_fetch_array($result)){ echo "<OPTION VALUE=".$row['Sub_ID'].">".$row['Sub_Name']."</OPTION>"; } echo "</select>"; ?> <input type="submit" value="submit"/> </form> </body> </html> I'm having an issue, and I can't think of a good way to fix it that wont make the code too messy. Long story short, pull data from database and display it. One of the fields is "Description" however on this particular page i want to limit the description view to 250 characters, and i do it like so... Code: [Select] if(strlen($row['Description']) > 250) { echo substr($row['Description'],0,250); } This works great, however it has it's issues. This particular one that I need to find a work-around for is if the description contains any HTML, it will break the text following the above echo. I realized this when the 250 limit cut a link in half <a href="http://www.xy and it cuts that off there which then causes my ...more link to assume it's linking to www.xy which clearly returns a broken page. My question is how can i avoid this, is there an easy way to notice wait i just opened a tag, forget 250 limit finish it just before or just after the tag that is being cut off. Thanks in advance. Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in /home/aep/public_html/administrator/page/master_psevent_edit.php on line 71 Code: [Select] <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .style1 {color: #FFFFFF} --> </style> </head> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <td> <form action="" method="post" name="" id=""> <table width="600" border="0" align="left" cellpadding="2" cellspacing="2"> <tr > <td valign="top" ><input name="topcheckbox" type="checkbox" class="check" id="topcheckbox" onClick="selectallps();" value="ON"> Select All</td><td></td> <? $id = $_GET[id]; $connection=mysql_connect("$server", "$username", "$password") or die("Could not establish connection"); mysql_select_db($database_name, $connection) or die ("Could not select database"); $query="select DATE_FORMAT(event_datefrom, '%d %b %Y') AS datefrom, DATE_FORMAT(event_dateto, '%d %b %Y') AS dateto, event_venue , ucase(event_name) as eventname from master_event where event_id = '$id' "; $result=mysql_query($query,$connection) or die(mysql_error()); while($row=mysql_fetch_array($result)) { $eventdatefrom =$row['datefrom']; $eventdateto =$row['dateto']; $eventvenue =$row['event_venue']; echo "<strong>"; echo $row['eventname']; echo "</strong>Date : "; echo "$eventdatefrom - $eventdateto"; echo "<br> Venue : $eventvenue <br><br>"; } ?> </tr> <tr><table width="600" frame="box" rules="all" border="3px" align="left" cellpadding="2" cellspacing="2"> <td><strong><a href="javascript:goDelps()">Del</a></strong></td> <td width = "100" valign="top"><strong>Logo</strong></img></td> <td width = "400" ><strong>Type/Company Name</strong></td> </tr> <? $connection=mysql_connect("$server", "$username", "$password") or die("Could not establish connection"); mysql_select_db($database_name, $connection) or die ("Could not select database"); $query="SELECT master_psevent.*, pstype_desc, company_name, logo_filename FROM master_psevent LEFT JOIN master_pstype ON master_psevent.pstype_id = master_pstype.pstype_id LEFT JOIN master_ps ON master_ps.ps_id = master_psevent.ps_id where master_psevent.event_id = '$id' order by pstype_desc, company_name "; $result=mysql_query($query,$connection) or die(mysql_error()); while($row=mysql_fetch_array($result)) { $imagepath = $row['logo_filename']; $pseventid = $row['psevent_id']; $companyname = $row['company_name']; $type = $row['pstype_desc']; ?> <tr> <td valign="top"><input name="<? echo $pseventid; ?>" type="checkbox" class="check"></td><td> //this is line 71--<?echo "<img src=".$logo_dir."/".$imagepath." width="95%" height="95%"></img> "; ?> </td> <td valign="top" ><div align="left"> </div><? echo $type; ?><br><b><? echo $companyname; ?></b></td> </tr> <? } ?> <tr> <td><strong><a href="javascript:goDelps()" style="color:white; text-decoration:none;"><img src='images\delete.jpg'></img></a></strong></td> <td><strong><img src='images\photos.jpg'></img> </strong></td> <td><strong><img src='images\ps.bmp'></img> </strong></td> </tr> </table> </form></td> </tr> <form name = "eventinfor"> <input type='hidden' name='eventid' value=<? echo"$_GET[id]"; ?> > </form> </table> </html> Code: [Select] Notice: Undefined variable: page in C:\Program Files (x86)\EasyPHP5.2.10\www\admin.php on line 119 That line is: <?php session_start(); $_SESSION['prev_page'] = $_SERVER['REQUEST_URI']; if (!session_is_registered('username')) { header("location:login.php"); } ?> <hr> <style type="text/css"> table.gridtable { color:#333333; border-width: 1px; border-color: #666666; border-collapse: collapse; width: 100%; } table.gridtable th { border-width: 1px; padding: 1px; border-style: solid; border-color: #666666; background-color: #dedede; } table.gridtable td { border-width: 1px; padding: 1px; border-style: solid; border-color: #666666; } .valid { border-width: 1px; padding: 1px; border-style: solid; border-color: #666666; background-color: transparent; } </style> </div> <div class="newsJustify"> <script type="text/javascript"> function checkall(delchk) { for (i = 0; i < delchk.length; i++) delchk[i].checked = true; } </script> <script type="text/javascript"> function uncheckall(delchk) { for (i = 0; i < delchk.length; i++) delchk.checked = false; } </script> <script language="JavaScript"> function loadPage(list) { location.href=list.options[list.selectedIndex].value } </script> <?php mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("chat") or die(mysql_error()); if (isset($_POST['del'])) { for ($count = 0; $count < count($_POST["delchk"]); $count++) { $delete = $_POST["delchk"][$count]; $query = "DELETE FROM members_shouts WHERE id = '$delete'"; $result = mysql_query($query); if (!$result) { die("Error deleting accounts! Query: $query<br />Error: " . mysql_error()); } } } $data = mysql_query("SELECT * FROM `members_shouts`") or die(mysql_error()); $rows = mysql_num_rows($data); if (isset($_GET['limit'])) { $page_rows = $_GET["limit"]; if ($page_rows == '') { $page_rows = 5; // no double quotes (int) } elseif ($page_rows == 'all') { $page_rows = $rows; } else { $page_rows = $_GET['limit']; /* validate this */ } if (!isset($_GET['pagenum'])) { $page = 1; } else { $page = (int) $_GET['pagenum']; } } else { $page_rows = 10; } ?> <?php $max_pages = ceil($rows / $page_rows); $last = ceil($rows / $page_rows); $pagenum = ($page && $page > 0 && $page <= $last) ? $page : 1; $max = 'limit ' . ($pagenum - 1) * $page_rows . ',' . $page_rows; $data_p = mysql_query("SELECT * FROM members_shouts $max") or die(mysql_error()); ?> <?php $result = mysql_query("SELECT * FROM members_shouts"); if (mysql_num_rows($result) > 0) { ?> <span style="float: left;margin-left: 2px;"> <form> <select name="file" size="1" onchange="loadPage(this.form.elements[0])" target="_parent._top"> <option value="" <?php if ($page_rows == 0) { echo 'selected'; } ?>>Select Limit</option> <option value="?limit=9" <?php if ($page_rows == 9) { echo 'selected'; } ?>>9</option> <option value="?limit=15" <?php if ($page_rows == 15) { echo 'selected'; } ?>>15</option> <option value="?limit=30" <?php if ($page_rows == 30) { echo 'selected'; } ?>>30</option> <option value="?limit=all" <?php if ($page_rows == 'all') { echo 'selected'; } ?>>All</option> </select> </form> </span> <span style="float: right;margin-top: 2px;margin-right: 2px;"> <center> <?php if ($pagenum == 1) { } else { echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=1&limit={$page_rows}'>First</a> "; echo " | "; echo " "; $previous = $pagenum - 1; $current = $pagenum; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$previous&limit={$page_rows}'>$previous</a> "; echo " | "; } echo "$pagenum"; if ($pagenum == $last || $last == 0) { } else { $next = $pagenum + 1; echo " | "; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$next&limit={$page_rows}'>$next</a> "; echo " "; echo " | "; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$last&limit={$page_rows}'>Last</a> "; } ?> </center> </span> <style type="text/css"> .clear2 { clear:both; height:0px; overflow:hidden; } </style> <div class="clear2"></div> <hr> <?php echo "<table class=\"gridtable\"> <thead> <tr> <th align=\"center\" scope=\"col\">user</th> <th align=\"center\" scope=\"col\">message</th> <th align=\"center\" scope=\"col\">when</th> <th align=\"center\" scope=\"col\">Delete?</th> </tr> </thead> <tbody>"; echo "<form name = 'myform' action='' method='post'>"; ?> <?php while ($info = mysql_fetch_array($data_p)) { echo "<tr align=\"center\">"; echo "<td class=\"valid\" >" . $info['user'] . "</td>"; echo "<td class=\"valid\" >" . $info['message'] . "</td>"; echo "<td>" . $info['when'] . "</td>"; echo '<td><input type="checkbox" id="delchk" name="delchk[]" value="' . $info['id'] . '" /></td>'; echo "</tr>"; } echo "</tbody>"; echo "</table>"; echo "<hr>"; echo "<input type='submit' name = 'del' value='Delete Selected'></form>"; echo "<input type='button' onclick='checkall(document.myform[\"delchk\"]);' value='Select All'>"; echo "<input type='button' onclick='uncheckall(document.myform[\"delchk\"]);' value='Deselect All'>"; echo "<hr>"; ?> <?php } else { // No rows were found ... echo '<center>No logged accounts.</center><hr>'; } ?> </hr> The line its refferring too is: $pagenum = ($page && $page > 0 && $page <= $last) ? $page : 1;[/QUOTE] in this block: $max_pages = ceil($rows / $page_rows); $last = ceil($rows / $page_rows); $pagenum = ($page && $page > 0 && $page <= $last) ? $page : 1; $max = 'limit ' . ($pagenum - 1) * $page_rows . ',' . $page_rows; $data_p = mysql_query("SELECT * FROM members_shouts $max") or die(mysql_error()); [/i] This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=319414.0 hi i m adding the last field to my query but getting unexpected t_string error $order_detail="insert into detail_table(unique_id,order_id, customer_name, customer_login_id, order_date, product_name, quantity, shipping, price,total_cost,compatibility) values('$unique_id',$order_id,'$username','$log_id','$shop_date','".$row['product_name'] . "' , " . $row['quantity'] . "," . $row['shipping_cost'] . ",". $row['price'] .",". $row['total_cost']. ",". '". $row['compatibility'] . "'. ")"; mysql_query($order_detail); help me remove it vineet Hi By the the way the server this site is hosted on is flipping fast! I'm still a php beginner. I have a php file, the entire code is he <?php get_header(); ?> <?php if(!is_paged()) { ?> <div id="top" class="clearfloat"> <div id="headline"> <?php if ( function_exists('show_nivo_slider') ) { show_nivo_slider(); } ?> </div> <div id="featured"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(8) ) : ?> <?php endif; ?> </div> </div> <div id="middle" class="clearfloat"> <?php $display_categories = array(7, 13, 17, 18, 1528); $i = 1; foreach ($display_categories as $category) { ?> <div id="cat-<?php echo $i; ?>" class="category"> <?php query_posts("showposts=1&cat=$category")?> <span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span> <a href="<?php echo get_category_link($category);?>"></a> </div> <?php $i++; ?> <?php } ?> </div> <?php } ?> <div id="bottom" class="clearfloat"> <div id="front-list"> <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=-27,-28&paged=$page&posts_per_page=10"); ?> <?php while (have_posts()) : the_post(); ?> <div class="clearfloat"> <h3 class=cat_title><?php the_category(', '); ?> »</h3> <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div> <div class="spoiler"> <?php $values = get_post_custom_values("Image"); if (isset($values[0])) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=150&h=150&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="150px" height="150px" /></a> <?php } ?> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?> <div class="navigation"> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?> <div class="right"><?php next_posts_link('Next Page »') ?></div> <div class="left"><?php previous_posts_link('« Previous Page') ?></div> <?php } ?> </div> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?> I want to remove the following block on line 19 to 33 because I don't need it: <?php $display_categories = array(7, 13, 17, 18, 1528); $i = 1; foreach ($display_categories as $category) { ?> <div id="cat-<?php echo $i; ?>" class="category"> <?php query_posts("showposts=1&cat=$category")?> <span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span> <a href="<?php echo get_category_link($category);?>"></a> </div> <?php $i++; ?> <?php } ?> </div> <?php } ?> But when I remove that I get the error, unexpected end of file error and references to <?php get_footer(); ?> I need to understand why this is happening, not just how to fix it (although I need that too). My suspicion is one of the endif's. How is it possible, in PHP, to display an error message next to a form input text field if a user is attempting to submit a form with empty fields? Moreover, how is it possible to remove the same error message when the user fills in the input field with the required data and/or refreshes the page? I have 2 files that I am working with: application.php and process.php.
application.php mainly has the HTML of the form. I am very new to learning PHP (I started learning it last week) and I have been searching for hours for a clear answer. I have already tried different methods for generating the error message including: using empty(), !isset, $_POST["name"] = "", etc, and have tried using session_start();, $row, echo, print, and other variables to try and display error message on the page, and I have tried using unset();, and = null, to try and remove the error message once the input field has been filled but all to no avail. Either the method I try only half works, or nothing works, and I cannot pinpoint which is the part that is not working. I only have 2 files to work with, and as an example of what I want to do is:
1. If the first name field is empty when the user clicks submit, an error message should appear next to the input. Is this possible with PHP? I run an image hosting site and it's using a lot of resources. I temporaly disabled the images by using this code: <?php $myImage = imagecreatefromjpeg('ua.jpg'); header("Content-type: image/jpeg"); imagejpeg($myImage); imagedestroy($myImage); ?> I redirected all images to one, but he server still getting high loads. Is there a way to cache this image so it doesn't use many resources? I have a question about caching files, the way i have seen people do it on tutorials is they save the file to a cache/ folder if non exists, then check if it exists when the page loads so if it doesn't then load the file normally or if it does then include the cache/file but what is the difference? if the browser has to load the file every time someone goes to it so you cache it for better performance isn't including the cache/file just the exact same thing? the server still has to download the included cached file. Does anyone know how to cache Tweets as to not reach the API rate limit? I am using the Twitter-provided widget to display multiple profiles on a website, but the API hits the limit of 150 per hour. Is there any way to cache the Tweets and still use this widget? Or does anyone know of a good widget that caches, or simple code? If anyone knows, please explain in newbie terms. Thanks a lot! Hi, I have a question. is that code below made a problem in google search, mean if I put this codes in header did google find my homepage? header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); Thnx. T Hi, I am looking for reliable, effective code to cache one or two of my website webpages. I know there are packages like the pear cache lite but is far beyond my needs and complex in terms of never used pear before etc. I am looking for a good cache class perhaps or a link to a good cache script. Does anyone have any code they would like to share or know of any good cache classes etc? I want to keep it relatively simple if possible. Thanks for any suggestions, help. PHPLOVER Hi Guys
I have recently been looking into implementing browser caching after reading this: https://developers.g...ctices/cachingĀ
There are a few things in that google article that don't make much sense to me so I'm hoping someone can clarify.
Firstly Question
The document says:
" we recommend that you configure your web server to explicitly set caching headers and apply them to all cacheable static resources"
This implies you can set caching headers for just some resources. How would you do this? Lets assume I only wanted to set caching headers for a file styles.css - would I need to output headers within the CSS file and then change the extension to .php? e.g.
<link rel="stylesheet" href="styles.php"/>Second question Etags have me very confused. How would you set etag headers for specific files and then generally? And if you set the etag in the header of the main php page does that mean everything gets cached? Any help someone can provide would be very, very welcome! Drongo I want to set the correct header / cache values for a site. I am working on a social network / forum style site. I want to ensure that every page a user requests results in a fresh one being requested from the server as most content changes by the minute. (1) How would I set this? (2) Also, can I prevent nav bars being reloaded as these never, ever change. I have some JavaScript that sends an AJAX request to the following PHP script every 4 seconds. The idea behind this is that every 4 seconds a new, randomly generate piece of content is loaded. This works fine in Firefox and Chrome, however when I test it in IE it seems to just load the same piece of content over and over again. I'm pretty sure there is nothing wrong with the script so could this be something to do with IE caching the first piece of content returned? Thanks for any help. $random_number = 0; $random_number = rand(1,6); if ($random_number == 1 ) { echo("<a href=\"\"><h4>Aliquam erat volutpat. Vivamus feugiat tempor quam, faucibus elementum.</h4><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae ante at erat tempor facilisis. Quisque blandit faucibus suscipit. Proin suscipit est sed. </p></a>"); } if ($random_number == 2) { echo("<a href=\"\"><h4>Quisque ac lacus nibh, ac semper ante. Sed imperdiet.</h4><p>Vestibulum aliquam pellentesque lacus quis mollis. Proin quis lobortis libero. Ut nec tempor lectus. Pellentesque habitant morbi tristique senectus et netus id. </p></a>"); } if ($random_number == 3) { echo("<a href=\"\"><h4>Suspendisse vestibulum dui augue, nec viverra erat. Proin id.</h4><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eu sollicitudin elit. Cras mauris mi, luctus non luctus quis, tristique vitae turpis turpis duis. </p></a>"); } if ($random_number == "4") { echo("<a href=\"\"><h4>Vestibulum gravida elit posuere arcu.</h4><p>Phasellus sit amet rutrum purus. Cras vulputate pretium quam eleifend viverra. Morbi convallis eros ac tellus suscipit nec euismod nibh semper. In quam posuere. </p></a>"); } if ($random_number == "5") { echo("<a href=\"\"><h4>Vestibulum ante ipsum primis in.</h4><p>Aliquam consectetur aliquet libero. Mauris malesuada tortor eu ipsum mollis sit amet blandit erat sollicitudin. Cras consequat dui ac elit semper pharetra amet. </p></a>"); } if ($random_number == "6") { echo("<a href=\"\"><h4>Nam ornare, nisl non interdum aliquam, erat urna consequat elit, vel.</h4><p>Nulla ut libero est, eu convallis urna. Nullam fringilla mollis ligula, id fringilla enim sagittis non. Nunc lectus nunc, condimentum eget imperdiet massa nunc.</p></a>"); } I've tried to disable caching of HTML for certain pages but they seem to prevent the storing of the php sid cookies. Is there any way to prevent caching and keep cookie? I did some research on the topic and came across no-cache='set cookie' but the description of that directive seems opposite my need. Help is a greatly appreciated! Ive been using no cache at the very top of my page and then using a header with a number in the link Code: [Select] <?php header("Location: settings.php?change=3"); ?> so the form updates after submit Then I have a if statment to echo that form was submited Any better ideas on how I can do this? Shouldnt I beable to just use no cache and use a standard echo in the form with no header in the form the problem with the way im doing it now if user keeps refreshing the screen it keeps saying the echo. which makes sense maybe its cause im not using the action in my form correctly with putting a link there? small example below Code: [Select] <?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-cache"); header("Pragma: no-cache"); if(isset($_GET['change'])) { echo "form submited";} if(isset($_POST['build_naq'])) { if(!empty($_POST['stargate_naq'])) { mysql_query("UPDATE settings SET naq= '".mysql_real_escape_string($_POST['naq'])."'"); } header("Location: settings.php?change=3"); } ?> I need to know when a file was last modified to see if the browser has an updated cached version, if the browser does use its cache otherwise get the most current version. How can I do this? |