Jump to content

Cookies as a second Primary Key? Please help!


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.