insert session id to table

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

    #1

    insert session id to table

    I'm trying to insert a session id to a table but am not sure of the code can
    anyone help.

    Something like:

    $result= MYSQL_QUERY("IN SERT INTO cart (cartId)".
    "VALUES ('session_id()' )");


  • Michael Fesser

    #2
    Re: insert session id to table

    .oO(de Beers)
    [color=blue]
    >I'm trying to insert a session id to a table but am not sure of the code can
    >anyone help.
    >
    >Something like:
    >
    >$result= MYSQL_QUERY("IN SERT INTO cart (cartId)".
    > "VALUES ('session_id()' )");[/color]

    For example:

    $query = sprintf('INSERT INTO cart (cartId) VALUES ("%s")',
    session_id());
    $result = mysql_query($qu ery);

    Micha

    Comment

    Working...