Forum Moderators: coopster

Message Too Old, No Replies

Detecting A Link Click

and displaying accordingly on same page

         

kkonline

3:16 pm on Sep 2, 2007 (gmt 0)

10+ Year Member


I am working on an article manager. For that i now need to work on add and view comment part to the article.

In case of form system, we have submit button with a value which is checked using [php]isset($_POST['done'] && strlen($_POST['done'])>0)[/php] and so on...

Now is there any way i can detect/check if the user has pressed the link (say link to comment.php or showcomment.php). And if he has pressed then i would show the comments or give him a comment box accordingly on the current page.

phparion

5:56 am on Sep 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



use queryString in your URL / Link that will be pressed / clicked e.g

<a href='page.php?mode=comments'>click to view comments</a>

on within page.php you can use

if($_GET['mode'] == "comments") {
//show comments
}

kkonline

4:43 pm on Sep 3, 2007 (gmt 0)

10+ Year Member



thanks phparion, that was exactly what i wanted to do...