Jump to content

Cleaning website. Don't understand weird PHP.


caryhartline

Recommended Posts

I am cleaning up my website (replace tables with divs and turning all design code in to CSS).  I would like to know a couple things.  First, I see that register_globals is deprecated, but I still see new blog posts and such saying to keep it.  I want to know if I should remove it, how it works, and if I do remove it what should I replace it with.  Also, I have code like:

 

'".$SETTINGS['siteurl']."uploaded/".$val["pict_url"]."'

 

and I was wondering whether it can be replaced with Javascript.  Please don't call me a noob or tell me to Google it because when it comes to me, Google, and PHP; I'm like a kid in a candy shop and all the candy is filled with dirt.

Link to comment
Share on other sites

I doubt that there are blogs telling people to use register_globals.  Don't use it.  It is completely deprecated (removed entirely) from php v. 5.3.  It's defunct, dead, gone. 

 

In the way you are describing it, Javascript runs in the browser (client).  It can not be used to replace php, nor can php be used to replace javascript.  They are two different tools that run in entirely different places.  PHP runs on the server.

 

Just for completeness sake, there are projects that allow you to write serverside code in javascript, but that is not relevant to this question, nor an avenue open to you in regards to a site based on php scripts.

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.