Jump to content

set cookies (php) as a PK witha second ID(PK)


Gazz1982

Recommended Posts

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
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.