Jump to content

Recommended Posts

Hi all,

 

I'm quite novice with php but have been charged with trying to update some code so it will work properly when my client has register_globals set to "Off" in the near future. Here is two snippets of existing code.. Can anyone please supply me with the correct way to do this so it will work when he changes over?

Thanks so much!!

 

@extract($_SERVER);
if($_SERVER["REQUEST_URI"]=="/condos.php?id=resort"){ 
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: http://www.myrtlebeachcondosdirect.com/condos.php?barefoot_resort");
    exit();
} 

 

and that if statement continues...

 

And another spot in the same file:

 

<?
if($id=='resort' || isset($barefoot_resort))
{
$query = "select * from client_content_html where content_name='Barefoot Resort'";
$photo_query="select q.image_thumb as thumbnail,q.image_large as photo from photo_gallery p inner join photo_gallery q on (p.id=q.gallery_id) where p.title='Barefoot Resort' and p.gallery_id=0";
}

 

And again, the if statement continues but I've only included the first example.

 

I think if I get help with the first one the rest will come easily. Thanks so much!

Link to comment
https://forums.phpfreaks.com/topic/87867-conversion-help-with-register_globals/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.