Register_globals help


#1

Hello

I moved a site from my old host that had a 1. search 2. log-in box.

These worked fine before but now they do not work and just end up sending users back to the home page instead of logging them in.

I asked around why this is happening and some people have said it is due to ‘register_globals’ being off on my server. Does anyone know how to turn them on?

Thanks.


#2

If it is due to ‘register_globals’ being off, you can try to create a custom php.ini file for your domain.

Hope this can help
http://wiki.dreamhost.com/PHP.ini

Save $97 (MAX Discount) with code: [color=#CC0000]97YES[/color] Sign Up NOW or More Codes Here


#3

You should check out this article on the DreamHost Wiki:
register_globals

With register_globals enabled, PHP automatically creates global variables out of form data. For example, will automatically give you a global variable of $control when the form is submitted. Instead of using $control, you would need to use $_POST[‘control’] or $_GET[‘control’] (depending on which method you are using to send the form).

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


#4

It says I should use

  • $_COOKIE
  • $_GET
  • $_FILES
  • $_POST
  • $_SERVER
  • $_SESSION

But does not say where or how to use them.

I don’t understand how that works.


#5

[quote]It says I should use

  • $_COOKIE
  • $_GET
  • $_FILES
  • $_POST
  • $_SERVER
  • $_SESSION

But does not say where or how to use them.

I don’t understand how that works.[/quote]
It is all predefined variables used by PHP to get value from cookies and session you set, form submission field value, and server environment.

They are all array variables that you can access using index mechanism, eg:

$_COOKIE[“timeout”]=3600;
echo $_GET[“name_field”];

etc.

Anyway, in order to understand that variables I recommend you learn how website work especially using PHP.

There are many good books on PHP, I recommend this one.

Supernova

Need Promo Code? Use [color=#CC0000]SUPERNOVA[/color] [color=#00CC00]($97 OFF): SIGN UP NOW ![/color]


#6

[quote]But does not say where or how to use them.

I don’t understand how that works.[/quote]
I explained how it works in my paragraph above. Just to be clear, however, I will edit the wiki article to give an example.

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL