Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-24-2009, 02:32 PM help...php code....
Novice Talker

Posts: 5
Name: Basu
Trades: 0
i hav two tables add_url and user_credit....

add_url fields
1.url_id
2.url

user_credit fields
1.url_id
2.user_id

as per screenshot given ....it retrieve the values from add_url table...
when d logined user clicks the "start browsing" option ... it saves the values of user id,url id ---- to the user_credit tables....

now when the user comes back to the page .... clicked urls must be shown as "credited" instead of "start browsing" ....by comparing add_url table(url_id) with d user_credit table(url_id)

plzzz...help ...how can i do it.....
Attached Images
File Type: gif untitled.GIF (6.8 KB, 2 views)
web-riderz87 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-24-2009, 03:35 PM Re: help...php code....
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Cant you just add a field for "clicked"

if that field has a value of 1 then show Clicked. if its 0 ( you set to default 0 ) then show ClickMe.

?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 12-24-2009, 03:51 PM Re: help...php code....
Novice Talker

Posts: 5
Name: Basu
Trades: 0
Quote:
Originally Posted by lynxus View Post
Cant you just add a field for "clicked"

if that field has a value of 1 then show Clicked. if its 0 ( you set to default 0 ) then show ClickMe.

?

where i add tat?? ...add_url table ?? ....
web-riderz87 is offline
Reply With Quote
View Public Profile
 
Old 12-24-2009, 03:57 PM Re: help...php code....
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
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.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE



Last edited by lynxus; 12-24-2009 at 03:59 PM..
lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 12-24-2009, 04:08 PM Re: help...php code....
Novice Talker

Posts: 5
Name: Basu
Trades: 0
url tables r updated by admin....i jus retrieving it to d users page....


check ur vistors message...
web-riderz87 is offline
Reply With Quote
View Public Profile
 
Old 12-24-2009, 04:22 PM Re: help...php code....
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Use the PM system NOT visitor messages
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-24-2009, 04:27 PM Re: help...php code....
Novice Talker

Posts: 5
Name: Basu
Trades: 0
ok...thanx
web-riderz87 is offline
Reply With Quote
View Public Profile
 
Old 12-24-2009, 04:28 PM Re: help...php code....
Novice Talker

Posts: 5
Name: Basu
Trades: 0
i dnt knw whether u understand my concept...
web-riderz87 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to help...php code....
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26347 seconds with 13 queries