Re: PHP5

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jerry Stuckle

    Re: PHP5

    incredibody@gma il.com wrote:
    I have been using the php form below for a while now and all of a
    sudden it stopped working. I contacted the company that hosts our
    website and they think it is because they switched to php5. They
    recommend that we don't use global variables - but I don't even know
    what that means. I would appreciate if someone could look over the
    code below and let me know what changes would need to be made to make
    this compatible with php5 and without using global variables:
    >
    <Lots of code snipped>

    In their upgrade, they turned off register_global s - which is a good thing.

    Since you are posting your form, you need to look in the $_POST array
    for the values, i.e. instead of

    if ($op != "ds") {

    you need to use $_POST['op']. Additionally, you should check to see if
    the array element is set (with isset()) before using it, so your phrase
    would be:

    if (isset($_POST['op'] && $_POST['op'] == 'ds') {

    Also, you should read up on register_global s at www.php.net.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

Working...