mysql - PHP Show/hide link -


I have a function that prints articles from my database and edit, add, show / hide shows / In the Hide Link I want to be able to hide / show that particular article. How can I do it? Edit: I need to be able to hide / show in my backend page and it needs to be hidden in front page

  function displaynews () {$ data = mysql_query ("SELECT * FROM News ") // query or die (mysql_error ()); While ($ info = mysql_fetch_array ($ data)) {$ id = $ info ['id']; Look & lt; Br> & Lt; A href = edit.php? Id = $ id & gt; Edit & lt; / A & gt; & Lt; / A & gt; & Lt; A href = 'addnews.php' & gt; Add & lt; / A & gt; & Lt; A href = '#' & gt; Show / Hide & lt; / A & gt; & Lt; Br> & Lt; Strong & gt; ". $ Info ['date']" & lt; / Strong> & Lt; Br> ". $ Info ['news_content']" & lt; Hour & gt; & Lt; Br> "; // print article and date}}    

You can set the style by using the attribute: None to hide, then display: block to show it again or use jQuery.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -