Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 4th, 2004, 03:02 PM
Registered User
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hidden redirect but no php parsing

Please help. I have a domain website, and in that index html i want a hidden redirect to a site with an ip adres for example http://123.233.44.55:81 (it's fake i know). this last site uses php and mysql. first i had the redirect with frames (because i want to show the site name instead of the ip adres. but it's not parsing any of the php variables. i have looked on the web and i found some stuff (also on here ) but no one exactly with the same problem as me. (weird?!), what i tried last time was this:

<HTML>
<TITLE> Site name</TITLE>

<frameset>
<frame name="tkb" src="
<?php
if (isset($_SERVER['QUERY_STRING']))
{
 echo "http://123.456.78.90?".$_SERVER['QUERY_STRING'];
}
else {
 echo "http://123.456.78.90";
}
?>">;
</frameset>

<BODY>
<NOFRAMES>
</NOFRAMES>

</BODY>


but it always goes to the first if, even when there's no query string. is this the right way?
if not: does anybody have the solution? or should i use global variables in php? but isn't that a security risk? or should i change my apache configuration? please help.

Greetings,
Klokkie ([email protected])


 
Old August 5th, 2004, 08:44 AM
Authorized User
 
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe you should try to change this:
if (isset($_SERVER['QUERY_STRING']))

Into:
if ($_SERVER['QUERY_STRING'] <> "")

 
Old August 5th, 2004, 11:09 AM
Registered User
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Genuine
 Maybe you should try to change this:
if (isset($_SERVER['QUERY_STRING']))

Into:
if ($_SERVER['QUERY_STRING'] <> "")


thanks, that worked for the if statement. but the php variable parsing still doesn't work. maybe it's got to do with the fact they are not global ?? cause since some version they are not global anymore....
maybe someone knows something?

greetings,
klokkie







Similar Threads
Thread Thread Starter Forum Replies Last Post
Help With PHP ?=name redirect. TheSchwa Beginning PHP 4 September 12th, 2007 02:32 AM
Error in php xml parsing... caught PHP How-To 0 April 12th, 2007 03:54 AM
empty fields not hidden anymore (php/mySQL) jasmin Beginning PHP 1 January 17th, 2005 12:42 PM
Parsing URL with PHP turklet BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 November 27th, 2004 09:24 PM
Parsing in PHP Walter G Pro PHP 2 August 14th, 2003 01:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.