Results 1 to 6 of 6

Thread: Php

  1. #1
    Question Php
    I have Apache and PHP 5 installed on my Mac and run it as a testing server before uploading to my host site. I have been scripting in PHP for a while, but cant understand why I keep running into this one problem. I have created a form and use the post method to send to a handling page, but when I go to retrieve the variables from the post, they will not show up to be processed. Every other part of PHP shows up (when viewed in a browser) i.e. print function, if then statements, etc, but the variables wont be extracted and be processed. Now for the kicker, when I upload my page to a hosting server and view, everything works fine—variables extracted and all. Any clue why my machine wont pick up the variables? Any help would be great! Thanks.

  2. #2
    You probably have register_globals disabled on your local machine.

    Instead of reffering to a variable named $qwerty, try $_POST["qwerty"];

  3. #3
    Thanks, do you know how I would go about changing the register_globals on my machine?

  4. #4
    Murlyn's Avatar
    Member Since
    Jun 11, 2003
    Mount Vernon, WA
    Your Mac's Specs
    MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
    Rep Power
    Don't, always use the global vars $_POST, $_GET, $_SERVER, $GLOBALS, etc.. always use those, so that they will be compatible with I believe PHP 4.1x and up, including PHP 5.

  5. #5
    thanks for all the help, it works now

  6. #6
    Yea they tried using globals as the default for a little bit in php4 , however it caused some major issues. They then turned it off by default, if you still find that you want to use this you can turn it on in your php.ini file! It is the near the top, I highly recomend you keep this off, it is just good practice to use $_POST['var'];, or $_HTTP_POST_VARS['var']; the second is becoming obsolete as well!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP with OS X
    By Yodda_Hunter in forum macOS - Apps and Games
    Replies: 4
    Last Post: 12-30-2013, 11:39 AM
  2. PHP 4.3.11 to PHP 5
    By prplxd in forum macOS - Development and Darwin
    Replies: 1
    Last Post: 12-04-2005, 11:57 AM
  3. PHP Help
    By JoeyRamoneLives in forum Web Design and Hosting
    Replies: 2
    Last Post: 04-26-2005, 10:01 PM
  4. Setting up PHP and PHP Nuke
    By EvoMac in forum Web Design and Hosting
    Replies: 2
    Last Post: 02-18-2005, 01:38 PM
  5. PHP Help
    By knaggsy in forum Web Design and Hosting
    Replies: 11
    Last Post: 10-20-2004, 09:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts