Jump to content

niccki

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

niccki's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, can anyone help me with my coding please.. I am developing simple website for my personal use. I have written this code which works perfectly well. Problem is that i cannot click on each record (newstitle in this case) which appears on my webpage to open its full description. How do i write codes to open each record information by clicking its name (newstitle). I hope i make sense and someone can help me.. If you need further help than please post your email add i can provide you with screenshots which will make more sense. Please see the atttached file to view my webpage. <?php function func_news_result() { ?> <?php require "connect.php"; require "functionNews.php"; $query="select * from news"; $result = @mysql_query($query,$connection) or die ("Unable to perform query.<br/>$query<br/>".mysql_error()); ?> <p>Click on Name</p> <br /><a href="addNews_page.php">Add latest News</a></td> </tr> <table border="1"> <tr> <th width="250">News Title</a></th> <th width="340">Description</th> <th width="90">Date</th> <th width="50">Edit</th> <th width="50">Delete</th> </tr> <?php while($row=mysql_fetch_array($result)) { ?> <tr> <td><a href="newsDPage.php"><?=$row['newstitle']?></a><p><?=$row['author']?></p></td> <td><?=$row['description']?></td> <td><?=$row['date']?></td> <td><a href="editNews_page.php?newsid=<?=$row['newsid']?>" onClick="return confirm('Do you really want to edit this?');">Edit</a></td> <td><a href="deleteNews.php?newsid=<?=$row['newsid']?>" onClick="return confirm('Do you really want to delete this?');">Delete</a></td> </tr> <?php } ?> </table> <a href="<?=$_SERVER['PHP_SELF']?>?max=<?=$max?>&current=0&text=<?=$_REQUEST['text']?>&field=<?=$_REQUEST['field']?>&sortby=<?=$_REQUEST['sortby']?>">|< First</a> <?php if ($current >= 10) { ?> <a href="<?=$_SERVER['PHP_SELF']?>?max=<?=$max?>&current=<?=($current-10)?>&text=<?=$_REQUEST['text']?>&field=<?=$_REQUEST['field']?>&sortby=<?=$_REQUEST['sortby']?>"><< Previous</a> <?php } else { ?> << Previous <?php } ?> <?php if (($current + 10) < $max) { ?> <a href="<?=$_SERVER['PHP_SELF']?>?max=<?=$max?>&current=<?=($current+10)?>&text=<?=$_REQUEST['text']?>&field=<?=$_REQUEST['field']?>&sortby=<?=$_REQUEST['sortby']?>">Next >></a> <?php } else { ?> Next >> <?php } ?> <a href="<?=$_SERVER['PHP_SELF']?>?max=<?=$max?>&current=<?=(floor($max/10)*10)?>&text=<?=$_REQUEST['text']?>&field=<?=$_REQUEST['field']?>&sortby=<?=$_REQUEST['sortby']?>">Last >|</a> <? } ?> [attachment deleted by admin]
×
×
  • 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.