Hide Querystring in URL

Light Poster
16Mar2008,03:50   #1
FarSeer's Avatar
Hello,
I know this is a common question, but is there a way to hide the GET variables from the browser's url? The catch is, I'm sending the variables via a link so I can't use the POST method.
Team Leader
16Mar2008,21:40   #2
pradeep's Avatar
Yiou can't hide it, you can encrypt it or use iframes like GMail does, so that people don't see the URL while browsing!
Light Poster
17Mar2008,07:30   #3
FarSeer's Avatar
Thanks for the reply. Let me ask a different question; Would it be possible to eliminate the variables after my code is done executing so that they are visible only while the page is loading?
Team Leader
17Mar2008,10:24   #4
pradeep's Avatar
Yes! Say you call a script with an id, then you can redirect it to an URL which does not have the id in the URL.

http://urdomain.com/delete.php?id=154 --> visible, while loading
after processing, redirect to
http://urdomain.com/deleteconfirmation.php --> id not present
Light Poster
18Mar2008,06:40   #5
FarSeer's Avatar
OK. I think I know what you're saying. I can acquire the variables then store them in a temporary session while I reload the page without the querystring in the URL. Thank you for the help.
Light Poster
18Mar2008,07:05   #6
FarSeer's Avatar
I have the following code:
Code:
<?php
session_start(); 
include "code.php";
?>
<html>
<head>
<?php
if(!isset($_SESSION['video'])) {
$decode = $_GET['video'];
$video = decoded($decode);
$_SESSION['video'] = $video;
echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=video.php">';}
?>
However, the page just continually reloads ad infinitum. What am I missing?
Light Poster
18Mar2008,07:16   #7
FarSeer's Avatar
OK. I figured it out. I was destroying the session before the page reloaded. It works great now.

I'm sorry about all of these posts. I can't edit/delete my posts.
Team Leader
18Mar2008,10:12   #8
pradeep's Avatar
Yeah right! :-)