mindfield Posted December 8, 2007 Share Posted December 8, 2007 Im new to this and I know this is going to be nothing to the experts on here but I need help with this. http://pgerochi.com/newsmanager/news.php So right now I am able to add an article and it will post. My problem is that when i go to the id... it wont do anything, it wont post the content and all that, please help? If you want to see my coding tell me. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 8, 2007 Share Posted December 8, 2007 Post your news_article.php code. Quote Link to comment Share on other sites More sharing options...
mindfield Posted December 8, 2007 Author Share Posted December 8, 2007 <?php // ********************************************** // Includes required files include("includes/start.php"); include("includes/connect.php"); include("includes/functions.php"); // ********************************************** // Include header files include("includes/html_header.php"); include("includes/header.php"); ?><title>News Article</title> <h1>News Article</h1> <?php // Build query $query = 'SELECT article_id,article_content FROM news_article'; // Execute query $result = mysql_query($query,$connect) or die(mysql_error()); // Display results for($i=0; $i<mysql_num_rows($result); $i++){ // Get next record list($article_content) = mysql_fetch_row($result); // Display title echo '<br />'.$article_content.'<br />'; } ?> <?php // ********************************************** // Include footer files include("includes/footer.php"); include("includes/html_footer.php"); ?> Quote Link to comment Share on other sites More sharing options...
revraz Posted December 8, 2007 Share Posted December 8, 2007 You dont have an $_GET statements getting the ID you're sending over. Quote Link to comment Share on other sites More sharing options...
mindfield Posted December 8, 2007 Author Share Posted December 8, 2007 what is the code for that? $news_article = $_GET['article_id']; i type this in but it doesnt work 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.