Php "get" - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming > PHP » Php "get"


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 02-01-2007   #1 (permalink)
itkgrp
Junior Member
 
Join Date: Jan 2007
Posts: 17
Question Php "get"

When a person enters a url like http://www.abc.com/url.php?id=90, how does PHP redirect the person to the page say member_login.html?
itkgrp is offline   Reply With Quote


Old 02-05-2007   #2 (permalink)
Klown
Member
 
Klown's Avatar
 
Join Date: Feb 2007
Posts: 34
Default Re: Php "get"

I generally use a javascript redirect, below I'm posting the complete code for a redirect that I use for members.. this page is immediately after the login page.

PHP Code:
<?php

$password
=$_POST['password'];
$username=$_POST['username'];
$url="yes";
if (!
$password || !$username) {$url="forgotpassword.php";}

mysql_connect("localhost"'username''password'
    or
die(
"could not connect");
mysql_select_db("your-database");                    

$query "SELECT * FROM users WHERE username='$username';";
$result mysql_query($query) or die(mysql_error());
$row mysql_fetch_array($result);

$thepassword=$row['password'];
if (
$thepassword==$password) {$url="members.php";}
else {
$url="forgotpassword.php";}

?>
<html>
<head>
<title>User Authentification</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
function jump(url){
    window.location = url
}
//-->
</script>
</head>
<body onLoad="jump('<?php echo $url?>')">
 Redirecting now, Please Wait... 
</body>
</html>
__________________
Search Engine Optimization and Stuff - Search Engine Optimization Services, PHP Guides, and Other Stuff for Web Masters
Klown is offline   Reply With Quote

Old 02-05-2007   #3 (permalink)
itkgrp
Junior Member
 
Join Date: Jan 2007
Posts: 17
Default Re: Php "get"

Thanks Buddy.
itkgrp is offline   Reply With Quote

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


footer left
All times are GMT. The time now is 08:54 PM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Internet Advertising | Auto Loans | Hotel Santiago de Compostela | McDonalds | Loans

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49