Q:

How to retrieve url data with form action?

I want to retrieve the id of the page but the page is dynamic depending upon the id 
e.g filepath/Post.php?id=5
Data is sent through a form action where i want to get the other pages id but i don't know how to do it.
echo "<form action='../PHP/Comment.php' method='post'>" . "<input class='comment' type='text' name='comment' placeholder='Add a comment'>" . "</form>"  

//then what the action does
$id = isset($_GET['id']); //trying to get the page id but it doesn't
$comment = $_POST['comment'];

//insertion into the table in the database.
mysql_query("INSERT INTO comments (id, comment) VALUES ('$id', '$comment')") 

A:

There are better ways to do this. have you tried using a dedicated $_SESSION variable? In PHP, i cud do this:-
<?php $_SESSION['PAGE_ID'] = 10;?>

then retrieve it on the form as 
<?php echo $_SESSION['PAGE_ID']?>

