Having problem inserting data in the same row of a DB !!!!!!
Posted: Sun Jul 13, 2003 11:56 pm
Hi, need some help.
I´m creatting a web aplication who post data from diferent forms.
I create a first form, with a validation, in this file I create a part of code:
$expire = 365*24*3600;
setcookie("username","$username",time()+$expire,"/","");
setcookie("smartid","$smartid",time()+$expire,"/","");
session_start();
session_register('username');
session_register('smartid');
The variables I need to insert in my DB in this form are working well.
The problem is in the next form I need to continue inserting data to the same row in my DB.
In my second verify file for my second form I verify if my COOKIE is alive, this validation is working, the fact is when I insert the data of this form to my DB, a new register is create, and I need to continue posting this data to the same register that was create in my first form.
My code for the COOKIE validation is this:
if ($HTTP_COOKIE_VARS['username'] || $HTTP_COOKIE_VARS['smartid'])
{
session_start();
session_register('username');
session_register('smartid');
IF you coul help me it´s really important for me, ´cause is for a client project.
Mail me if someone know a posible solution. maceved23@yahoo.com
THANKS, Mario
I create a first form, with a validation, in this file I create a part of code:
$expire = 365*24*3600;
setcookie("username","$username",time()+$expire,"/","");
setcookie("smartid","$smartid",time()+$expire,"/","");
session_start();
session_register('username');
session_register('smartid');
The variables I need to insert in my DB in this form are working well.
The problem is in the next form I need to continue inserting data to the same row in my DB.
In my second verify file for my second form I verify if my COOKIE is alive, this validation is working, the fact is when I insert the data of this form to my DB, a new register is create, and I need to continue posting this data to the same register that was create in my first form.
My code for the COOKIE validation is this:
if ($HTTP_COOKIE_VARS['username'] || $HTTP_COOKIE_VARS['smartid'])
{
session_start();
session_register('username');
session_register('smartid');
IF you coul help me it´s really important for me, ´cause is for a client project.
Mail me if someone know a posible solution. maceved23@yahoo.com
THANKS, Mario