php not working?

Discussion in 'PHP' started by Matt Ridge, Sep 26, 2011.

  1. webshore88

    webshore88 Well-Known Member

    Messages:
    131
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    123
    #21
    ok you can use empty() this way


    if(!empty($_POST['Added_By'])){
    $Added_By = $_POST['Added_By'];
    }
    elseif(!empty($_POST['Added_By_Date'])){
    $Added_By_Date = date('Y-m-d',strtotime($_POST['Added_By_Date']));
    }
    elseif(!empty($_POST['Nexx_Part'])){
    $Nexx_Part = $_POST['Nexx_Part'];
    }
    ................
    else{
    header('location:redirect to form page')
    }
    hope will help you
     
    webshore88, Sep 27, 2011 IP
  2. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #22
    The hidden input is just a check that should be unique to that form, so we can see if the form has been submitted.
     
    Last edited: Sep 27, 2011
    blueparukia, Sep 27, 2011 IP