Gazz1982 Posted June 25, 2007 Share Posted June 25, 2007 I'm desinging a database as part of my archaeology masters in GIS I've been teaching myself apache server, php, mysql, html for the last month, its been a very steep learning curve and now i have got stuck: The database has an auto incremented ID number this is assigned on the 1st web page using the insert syntax this is then posted to the db the following pages simply update- but i dont know how to get it to select and store the id no. for that season? Also when i update the row each row gets written over therefore i want to set the primary key to the ID as well as a cookie - any ideas on how to do this? so far i have <?php setcookie(time()+3600); ?> This needs to be stored and remembered on each page so i assume i will need some kind of sql I have to tell the db that the newly created id no. is linked to the cookie so that all information from that user stays in the single row and does not over right any of the other data Thanks for you help Gary Nobles Link to comment https://forums.phpfreaks.com/topic/57053-set-cookies-php-as-a-pk-witha-second-idpk/ Share on other sites More sharing options...
Wildbug Posted June 25, 2007 Share Posted June 25, 2007 Why are you trying to do this? Is this something for which sessions would be better suited? Link to comment https://forums.phpfreaks.com/topic/57053-set-cookies-php-as-a-pk-witha-second-idpk/#findComment-282005 Share on other sites More sharing options...
Wildbug Posted June 25, 2007 Share Posted June 25, 2007 Don't double post: http://www.phpfreaks.com/forums/index.php/topic,146628.msg627842.html#msg627842 Link to comment https://forums.phpfreaks.com/topic/57053-set-cookies-php-as-a-pk-witha-second-idpk/#findComment-282006 Share on other sites More sharing options...
Recommended Posts