Jump to content

remzone

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

remzone's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. HI all, I am trying to learn PHP and MYSql been doing it a grand total of 4 Days and enjoying it tbh. I have been playing with superglobals to get used to them but have come across a problem with them which you guys will prob think it's peice of cake but I got to start somewhere eh [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] . <?php echo "Hi! Your IP is: $_SERVER['REMOTE_ADDR']"; ?> Produces : Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING. I tried something outta my own head but dunno if I did right but still it didn't wortk anywayz. <?php $sip = $_SERVER['REMOTE_ADDR']; echo $sip; ?> With this I get a variable not assigned error but as far as I was awear superglobals are predfined so didn't think I had to assign a value to $_SERVER, unless there is a problem with assigning $sip the value of a superglobal? I've tried to find my php.ini to see if globals are switched off but a, they have it hidden i guess and b, I thought that superglobals would still work with that switched off? any help would be appreciated [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]
×
×
  • 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.