Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

News article archive - stopped working

Featured Replies

Hi,

 

My php is very limited and I had a developer created a news page which archived on a monthly basis. I have an issue where the articles have stopped archiving for the last 2 months so neither June or July are showing, I am unable to contect my developer and really need to fix this issue, can nanybosy please help?

 

Many thanks for looking

 

 

***NEWS/ARCHIVE PAGES***

 

<?php
$mon = $_REQUEST['mid'];
$obj = new util();
$sql = "SELECT * FROM articles WHERE MONTH(date)='$mon' ORDER BY date DESC";
$exe = mysql_query($sql);
while($rows=mysql_fetch_array($exe))
{
?>
		 <tr>
			 <td>
			 <?php $desc = stripslashes($rows['article']); ?>
				 <strong style="font-size:12px;"><?php echo($obj->date_time($rows['date']));?></strong>  
<div style="margin-right:20px;"><?php echo substr($desc,0,340);?>
<?php if($rows['article_id']==54) { } else { ?> <br/> <?php } ?>
				 <a href="read_more.php?nid=<?php echo($rows['article_id']);?>" style="color:#999; text-decoration:none;"><strong>Read More.</strong></a>		
				 </div>		
		 <br/>
				 </td>
		 </tr>
		 <tr>
			 </td>
		 </tr>
		 <?php } ?>
	 </table>
 </div>
 <?php
$mon_arr = array('January','February','March','April','May','June','July','August','September','October','November','December');
$month = date('m');
$qry = "SELECT COUNT(article_id) total,MONTH(date) AS Mon,articles.* FROM articles WHERE MONTH(date)!='$month' GROUP BY MONTH(date)";
$run = mysql_query($qry);
?>
 <div class="archive" id="archive">
<!--	 <h2>Archive</h2>
-->	 <?php
while($data=mysql_fetch_array($run)) {
?>
 <?php
?>
 <br />
 <p><a href="archive.php?mid=<?php echo($data['Mon']);?>" style="color:#FFF;text-decoration:none;font-size:12px;font-weight:bolder;"><?php echo($mon_arr[$data['Mon']-1]); ?></a>
 <?php
$sql = "SELECT * FROM articles WHERE MONTH(date)='" . $data['Mon'] . "' AND tags!='' ORDER BY sort_order ASC";
$rs = mysql_query($sql);
while($rw = mysql_fetch_array($rs)) {
?>
 <br/><a href="read_more.php?nid=<?php echo($rw['article_id']);?>" style="text-decoration:none;"><strong style="color: rgb(105, 105, 105);"><?php echo stripslashes($rw['tags']); ?></strong></a>
 <?php } ?>
 </p>
 <?php } ?>
</div></div>
  • 2 weeks later...

First step: in the folder where that file is stored is there another file called "error.log" or similar?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.