Hello,
I am making a tutorial CMS, but I'm facing a very wierd problem. I have a 'view category section' where I can view tutorials in the category. But, when I add a tutorial, within the category, the most recent tutorial added is not there. For example, lets say I added tutorial 1. In the category section, tutorial 1 is not there. Then Bob comes, and adds tutorial 2. Now tutorial 1 is showing, but 2 is not.
This is what I have so far:
$subcat = $_GET['sub'];
$sqls = "SELECT * FROM `tutorials` WHERE `subcatid` = '$subcat' and `catid` = '$idf' ORDER BY `name`";
$results=mysql_query($sqls);
$rowss=mysql_fetch_array($results);
$catids = $rowss['catid'];
$subcatids = $rowss['subcatid'];
$id = $rowss['id'];
$author = $rowss['author'];
$description = $rowss['description'];
$name = $rowss['name'];
$imageurl = $rowss['imageurl'];
$url = $rowss['url'];
$totalviewed = $rowss['hits'];
echo '<div id="bluebar">'.$subcatids.' tutorials.</div>
<br />';
echo "
<div class='tutorial'>
<div class='tutorialtitle'> <span class='style1'><a href='".$url."'>".$name."</a></span><br />
Author: <a href='#'>".$author."</a> <br> Rating: <span class='style3'>Coming Soon</span></div>
<img src='".$imageurl."' width='44' height='43' alt='' /><br />".$description."<br />
<span class='style2'>22nd March 2006 <span class='style3'><a href='#'>Report Tutorial</a></span> <span class='style3'>Total Views: <strong>".$totalviewed."</strong></span> <span class='style3'>Categorgy: <a href='viewcat.php?id=".$catid."'><strong>".$cat3."</strong></a></span></span></div>
";
What'd I do wrong?