Jump to content

Old Code Vs New Code - Language Syntax Change?


EmperorJazzy

Recommended Posts

Hi All,

 

I've recently begun programming PHP again and have found my old code doesn't work anymore. It's been a few years since my code was written, and simple functions don't seem to be working. I've done a bit of research into the syntax again and found the following;

 

I used to use a function as such;

 

if ($REQUEST_METHOD=="POST") {

 

Now I've seen alot of the syntax is

 

if ($_SERVER($REQUEST_METHOD=="POST")) {

 

And referencing variables from the form is as such;

 

$_POST['variable']

 

Where previously I could reference them in the simple form;

 

$variable

 

Has there been a language syntax change that would cause my old code to be obsolete? Is there a configuration line that could be changed to allow this old code to work?

 

Your assistance would be greatly appreciated! I'm going mad I tell you!

 

Regards,

 

Jazzy

 

P.S Same ISP, Different Version of PHP

Link to comment
Share on other sites

Thanks Barand.. is there any reference material you could guide me to to understand the security issues, and thus if it's worth requesting the ISP switch Register_Globals back on? Or of course, you opinion on switching Register_Globals back on?

Link to comment
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.