Jump to content

pls help on smart part of codnig


yeakyau

Recommended Posts

<?php

 

// load the configuration file.

 

include("config.php");

 

        //load all news from the database and then OREDER them by newsid

 

        //you will notice that newlly added news will appeare first.

 

        //also you can OREDER by (dtime) instaed of (news id)

 

        $result = mysql_query("SELECT * FROM news ORDER BY newsid DESC",$connect);

 

        //lets make a loop and get all news from the database

 

        while($myrow = mysql_fetch_assoc($result))

 

            {//begin of loop

 

              //now print the results:

 

              echo "<b>Title: ";

 

              echo $myrow['title'];

 

              echo "</b><br>On: <i>";

 

              echo $myrow['dtime'];

 

              echo "</i><hr align=left width=160>";

 

              echo $myrow['text1'];

 

              // Now print the options to (Read,Edit & Delete the news)

 

              echo "<br><a href=\"read_more.php?newsid=$myrow[newsid]\">Read More...</a>

 

                || <a href=\"edit_news.php?newsid=$myrow[newsid]\">Edit</a>

 

                || <a href=\"delete_news.php?newsid=$myrow[newsid]\">Delete</a><br><hr>";

 

            }//end of loop

 

?>

 

After i remove echo "<br><a href=\"read_more.php?newsid=$myrow[newsid]\">Read More...</a>

 

                || <a href=\"edit_news.php?newsid=$myrow[newsid]\">Edit</a>

 

                || <a href=\"delete_news.php?newsid=$myrow[newsid]\">Delete</a><br><hr>";

 

            }//end of loop

 

the edit and delete part it become error may i knw is there any method to remove it wihout showing that 2

Link to comment
https://forums.phpfreaks.com/topic/197340-pls-help-on-smart-part-of-codnig/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.