Hi,

I have a link in my site..

<a href='talk.php?page=1&news_id=".$row["news_id"]."'class='bottomlink'>Read More..</a>

Which obviously goes to the page where i can grab the values. IS there a way in PHP to go to the page, get the values but hide the info in the URL?

I think this might be possible as i have a form where the i enter data go to the page described in the action where i can get the values but they dont apear in the URL.

Thanks in advance,

David.

    A $GET variable is passed through the URL a $POST or $SESSION variable is not so use them instead! $REQUEST array contain all $GET $POST $_COOKIE data!

      thanks for the reply

      so if i used.....

      $url = $_POST['talk.php?page=1&news_id=".$row["news_id']'];

      echo "<a href='$url'>here</a>";

      that should be the way to go?

        Not really you would need to make a $SESSION variable and in this case is would at the top of the page that is going to pass the $SESSION variable use start_session() then wherever you wanted that variable within your script just set it like below

        $_SESSION['news_id']="$row["news_id"];
        or set a short variable like
        $newsID =$row["news_id"];
        //then set the $_SESSION
        $_SESSION['news_id']=$newsID; 

        Then on your next page you would first start a session with session_start() and then you can retrieve it with $_SESSION'news_id'].

          If you do have difficulties using $SESSION varaibles then feel free to post at anytime. $SESSION variables are good throughout the users stay on yur site and can once set be used on any page within your site, they are really neat that this can happen with them. Once set till the user leaves the site they are kept. So play around with them and the best part is that you don't see the variables passed with the URL to your page and can not be bookmarked or manipulated like a $_GET variable passed through the URL.

            Write a Reply...