chriscloyd Posted February 28, 2007 Share Posted February 28, 2007 okay heres my problem when i have my output echoed its showing L heres my code <?php $dbhost = 'localhost'; $dbuser = '******'; $dbpass = '******'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = '******'; mysql_select_db($dbname); //news// $get_news = mysql_query("SELECT * FROM `cl_news` ORDER BY `news_id` DESC LIMIT 0 , 5"); if ($get_news) { while ($news = mysql_fetch_assoc($get_news)) { $title = $news['news_title']; $news = $news['news_message']; $author = $news['news_author']; $date = $news['news_date']; $id = $news['news_id']; ?> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td colspan="2" class="headerright"><?php echo $title; ?> <a href="javascript:void();" class="style1" onclick="show_hide('<?php echo $id; ?>')">+/-</a></td> </tr> </table> <table id="<?php echo $id; ?>" width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td colspan="2" class="contentright"><?php echo $news; ?></td> </tr> <tr> <td width="68%" class="contentright">Posted on : <?php echo $author; ?><br> On : <?php echo $date; ?><br> </td> <td width="32%" class="contentright"><a href="view_news.php?id=<?php echo $id; ?>">Comments (0)</a> </td> </tr> </table> <?php } } else { echo 'Theres no news to display right now. Sorry for the inconvenience.'; } ?> but on phpmyadmin i did the query because theres only 1 news article in there this is what shows up SQL query: SELECT * FROM `cl_news` LIMIT 0, 15 ; Rows: 1 news_id news_title news_author news_date news_views news_message 1 This is a test news haqshot Wednesday, February 28, 2007 2:52pm 0 Lorem ipsum dolor sit amet, consectetuer adipiscin... Quote Link to comment Share on other sites More sharing options...
chriscloyd Posted February 28, 2007 Author Share Posted February 28, 2007 like heres the link http://www.chaoslegionclan.net/index.php if u look at the links on comments.php?id=L it says and where it says posted by: L on : L Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.