Jump to content

complexed... clicked link -> add row action


fabiez

Recommended Posts

1. Use session/cookie, I'd probably use a cookie ( http://no2.php.net/manual/en/function.setcookie.php ) It remembers it in the web browser.

 

2. You can also store it in a db both times, make column for if it is temp or final. You would need something unique to identify the person though. Is there not any username or whatever, then use the ip, or set an unique random cookie that you can identify the person in the db by. (seems like a waste). So I'd maybe use the ip or just use cookie for the temp.

 

Again store it as a cookie till it's been locked would be the best, and store it in the db afterward would be good.

 

You can also make it write to a text file instead of a db. ( http://www.tizag.com/phpT/filewrite.php ) Would be okay to use when it's getting locked.

Link to comment
Share on other sites

I use session, but lets say its four bets first he pick 1,3 and 4 and then he removes 3 and adds 2. I feel a problem coming :) And there won't always be 4 choices

 

1. Use session/cookie, I'd probably use a cookie ( http://no2.php.net/manual/en/function.setcookie.php ) It remembers it in the web browser.

 

2. You can also store it in a db both times, make column for if it is temp or final. You would need something unique to identify the person though. Is there not any username or whatever, then use the ip, or set an unique random cookie that you can identify the person in the db by. (seems like a waste). So I'd maybe use the ip or just use cookie for the temp.

 

Again store it as a cookie till it's been locked would be the best, and store it in the db afterward would be good.

 

You can also make it write to a text file instead of a db. ( http://www.tizag.com/phpT/filewrite.php ) Would be okay to use when it's getting locked.

Link to comment
Share on other sites

I don't see the problem though.

If there is one cookie per "match".

 

To change the cookie, just re-set it with the same function.

 

You said they could only pick one alternative to win per match, but if it's 10 teams and 3 to pick out per match. 10P3 alternatives. So that would be no happy time making a function for. I would then instead make one cookie per position you can pick per match too.

Link to comment
Share on other sites

hahah so I'm screwed cause it's not always gonna be for example a maximum of 10 games. Or I should start trying on my own first... :)

I don't see the problem though.

If there is one cookie per "match".

 

To change the cookie, just re-set it with the same function.

 

You said they could only pick one alternative to win per match, but if it's 10 teams and 3 to pick out per match. 10P3 alternatives. So that would be no happy time making a function for. I would then instead make one cookie per position you can pick per match too.

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.