Getting this to work: $_POST[$val["vname"]];

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keiron Waites

    Getting this to work: $_POST[$val["vname"]];

    I'd like to access $_POST["variablena me"] where $val["vname"] is the
    variable name. $_POST[$val["vname"]]; gets an error message:

    Parse error: parse error, unexpected '[', expecting ',' or ';' in
    C:\Documents and
    Settings\ShepMo de\Desktop\Webs ites\CGLD.net\W eb\checkform.fu nction.php on
    line 8

    Is there any way to do what I'm trying to do?


  • Jon Kraft

    #2
    Re: Getting this to work: $_POST[$val["vname&quo t;]];

    Keiron Waites <webmaster@-NOSPAM-sharemonkey.com > wrote:
    [color=blue]
    > I'd like to access $_POST["variablena me"] where $val["vname"] is the
    > variable name. $_POST[$val["vname"]]; gets an error message:
    >
    > Parse error: parse error, unexpected '[', expecting ',' or ';' in
    > C:\Documents and
    > Settings\ShepMo de\Desktop\Webs ites\CGLD.net\W eb\checkform.fu nction.php on
    > line 8[/color]

    Shouldn't be any problem and works here - could you post the complete code
    section?

    JOn

    Comment

    Working...