Jump to content

Very easy help.


mindfield

Recommended Posts

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.

Link to comment
Share on other sites

<?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");

 

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.