Wherever your reading the list from?
If i understand what your trying to do..Is.
Someone logs in.
They click a link and youw ant it to show clicked for that account?
I would have 2 tables..
1 with urls and user id's in.
and another for that user.
IE:
usertable
-id ( int - primary key - auto incr )
-username ( varchar )
-password ( varchar )
-credits (int )
urltables
-id ( int - primary key - auto incr )
-username ( varchar )
-url ( varchar )
-clicked ( int )
Then when someone adds a url,
You add it to the urltable ie:
lynxus http://google.com 0
Shows my name, url and if its clicked.
When they click it,, Update this table to show cliecked - 0 where username = lynxus and url = google.com
then update their credits to credits + credits +1 ( $credits ++; )
Hope this makes sense?
Basically you link urls to users in your user table.
Keeping it clean.
Last edited by lynxus; 12-24-2009 at 03:59 PM..
|