473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

rewrite the url

I'm using a get variable to enable a guest login via a hyperlink. Once
I've used it, is there a simple way of rewriting the url to remove ther
get details?

tia,

Steve
Jul 17 '05 #1
6 2314
I'm assuming your using a form to load the page from which you extract the
get variable. Instead of using get, try post. Using post in your form will
prevent the variable information from appearing in the URL.
example:
<form action="loginpage.php" method="post"> rather than <form
action="loginpage.php" method="get">

You'll also need to extract the information from the URL as a post variable
rather than as a get variable.
example:
If your using $_GET[variable], you'll need to change it to $_POST[variable]
or
if your using $HTTP_GET_VARS, you'll need to change it to $HTTP_POST_VARS.
"Steve" <Th*****@Aint.valid> wrote in message
news:cg**********@lust.ihug.co.nz...
I'm using a get variable to enable a guest login via a hyperlink. Once
I've used it, is there a simple way of rewriting the url to remove ther
get details?

tia,

Steve

Jul 17 '05 #2
John Victor wrote:
I'm assuming your using a form to load the page from which you extract the
get variable. Instead of using get, try post. Using post in your form will
prevent the variable information from appearing in the URL.
example:
<form action="loginpage.php" method="post"> rather than <form
action="loginpage.php" method="get">

You'll also need to extract the information from the URL as a post variable
rather than as a get variable.
example:
If your using $_GET[variable], you'll need to change it to $_POST[variable]
or
if your using $HTTP_GET_VARS, you'll need to change it to $HTTP_POST_VARS.
"Steve" <Th*****@Aint.valid> wrote in message
news:cg**********@lust.ihug.co.nz...
I'm using a get variable to enable a guest login via a hyperlink. Once
I've used it, is there a simple way of rewriting the url to remove ther
get details?

tia,

Steve


No, I'm using a hyperlink... <a href="index.php?Guest=1">Trial</a> and
testing them at the other end.

Steve
Jul 17 '05 #3
"Steve" <Th*****@Aint.valid> wrote in message
news:cg**********@lust.ihug.co.nz...
John Victor wrote:
I'm assuming your using a form to load the page from which you extract the get variable. Instead of using get, try post. Using post in your form will prevent the variable information from appearing in the URL.
example:
<form action="loginpage.php" method="post"> rather than <form
action="loginpage.php" method="get">

You'll also need to extract the information from the URL as a post variable rather than as a get variable.
example:
If your using $_GET[variable], you'll need to change it to $_POST[variable] or
if your using $HTTP_GET_VARS, you'll need to change it to $HTTP_POST_VARS.

"Steve" <Th*****@Aint.valid> wrote in message
news:cg**********@lust.ihug.co.nz...
I'm using a get variable to enable a guest login via a hyperlink. Once
I've used it, is there a simple way of rewriting the url to remove ther
get details?

tia,

Steve


No, I'm using a hyperlink... <a href="index.php?Guest=1">Trial</a> and
testing them at the other end.


use

<a href="setguest.php?guest=1">Trial</a>

in setguest.php store the value of guess into a cookie or a session
variable, and then use header('location: index.php');

Jul 17 '05 #4
CJ Llewellyn wrote:
"Steve" <Th*****@Aint.valid> wrote in message
news:cg**********@lust.ihug.co.nz...
John Victor wrote:
I'm assuming your using a form to load the page from which you extract
the
get variable. Instead of using get, try post. Using post in your form
will
prevent the variable information from appearing in the URL.
example:
<form action="loginpage.php" method="post"> rather than <form
action="loginpage.php" method="get">

You'll also need to extract the information from the URL as a post
variable
rather than as a get variable.
example:
If your using $_GET[variable], you'll need to change it to
$_POST[variable]
or
if your using $HTTP_GET_VARS, you'll need to change it to
$HTTP_POST_VARS.

"Steve" <Th*****@Aint.valid> wrote in message
news:cg**********@lust.ihug.co.nz...
I'm using a get variable to enable a guest login via a hyperlink. Once
I've used it, is there a simple way of rewriting the url to remove ther
get details?

tia,

Steve

No, I'm using a hyperlink... <a href="index.php?Guest=1">Trial</a> and
testing them at the other end.

use

<a href="setguest.php?guest=1">Trial</a>

in setguest.php store the value of guess into a cookie or a session
variable, and then use header('location: index.php');

Like it! I may rewrite everything so that all config is loaded into
session vars and then index.pgp is called.

Nice, simple and elegant.

Cheers,

Steve
Jul 17 '05 #5
Well, after "logging them in as guest" (saving a session, or whatever
you're doing), if you want the address bar to change you could have
the login-script redirect to a new location.
header('Location: http://...somewhere.../');

Steve <Th*****@Aint.valid> wrote in message news:<cg**********@lust.ihug.co.nz>...
John Victor wrote:
I'm assuming your using a form to load the page from which you extract the
get variable. Instead of using get, try post. Using post in your form will
prevent the variable information from appearing in the URL.
example:
<form action="loginpage.php" method="post"> rather than <form
action="loginpage.php" method="get">

You'll also need to extract the information from the URL as a post variable
rather than as a get variable.
example:
If your using $_GET[variable], you'll need to change it to $_POST[variable]
or
if your using $HTTP_GET_VARS, you'll need to change it to $HTTP_POST_VARS.
"Steve" <Th*****@Aint.valid> wrote in message
news:cg**********@lust.ihug.co.nz...
I'm using a get variable to enable a guest login via a hyperlink. Once
I've used it, is there a simple way of rewriting the url to remove ther
get details?

tia,

Steve


No, I'm using a hyperlink... <a href="index.php?Guest=1">Trial</a> and
testing them at the other end.

Steve

Jul 17 '05 #6
.oO(CJ Llewellyn)
in setguest.php store the value of guess into a cookie or a session
variable, and then use header('location: index.php');


The Location-header requires an absolute URL. See manual for details.

Micha
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Link | last post by:
Hello!I am new to Python and I would like to rewrite the following code to python use to call by C program:// JPython code ======================================= import...
1
by: darrel | last post by:
We're using URL rewriting (Isapi Rewrite). Is there any way to grab the pre-rewritten URL or can you only grab the rewritten one? I'm assuming you can't (as that's sort of the point of URL...
2
by: VM | last post by:
I'm about to work on a 'buggy' WIndows C GUI application that was entirely made in C. All the user controls were all hard-coded and the code is pretty hard to understand. The application was made...
1
by: baroque Chou | last post by:
Thanks for the help available on msdn, I have succesful done the rewrite job. But there are 2 problems arise: 1.when I try to rewrite the url from say: www.yoursite.com/beverages.aspx to...
14
by: Stan Canepa | last post by:
This post is mostly for discussion. Why rewrite in .NET? Just a general discussion not related to any specific details. I was just looking to see what reasons developers are looking to, to help...
18
chunk1978
by: chunk1978 | last post by:
hi everyone. i just started learning how to dynamically show/hide elements with a checkbox toggle. i would like to know if it's possible to delete/rewrite elements instead of simply show/hide...
1
by: polilop | last post by:
Is there a URL rewrite module that allows to rewrite url by looking at the database. Egxample: http://www.somesite.com/object.aspx?objectCountryId=1&objectId=22 now i look into the database, see...
1
by: mazdotnet | last post by:
Hi all, I've installed the new Microsoft URL Rewrite Module for IIS 7.0 http://www.iis.net/downloads/default.aspx?tabid=34&i=1691&g=6 on both my laptop (Vista Home Premium) and my desktop...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.