Adding "'s to a $_POST value

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

    Adding "'s to a $_POST value

    Hi,

    I'm a bit of a newbie to php.

    I have some values that I'm getting via the post method which I want to
    include in an sql statement - the problem is I need to enclose the value in
    "'s but I dont know how.

    e.g $id = $_POST["id"];

    so, if $id = monkey I want to turn it into "monkey"

    Any help much appreciated - I'm sure it's something obvious and I'm just
    being thick.



  • Ant

    #2
    Re: Adding "'s to a $_POST value

    no more replies please, I've worked it out...

    thanks though
    "Ant" <nospam@allthan ks.com> wrote in message
    news:ddii5m$24f $1@wisteria.csv .warwick.ac.uk. ..[color=blue]
    > Hi,
    >
    > I'm a bit of a newbie to php.
    >
    > I have some values that I'm getting via the post method which I want to
    > include in an sql statement - the problem is I need to enclose the value
    > in
    > "'s but I dont know how.
    >
    > e.g $id = $_POST["id"];
    >
    > so, if $id = monkey I want to turn it into "monkey"
    >
    > Any help much appreciated - I'm sure it's something obvious and I'm just
    > being thick.
    >
    >
    >[/color]


    Comment

    Working...