how would:

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

how would:

Post by tim »

I was just thinking the other day.

user options, like on this board for example, you can tell it to "show/hide your email address." How would you go about doing that?

I pondered up a few ideas but just thought there'd be something better
1. make a extra column in the MySQL table and set the default to 0 (not show) and use the UPDATE feature to change it to 1(to show it)
2. set a cookie
3 sessions (i'd rther stay far away from them personally)

Just curious to see if anyone else has/use a more creative way that perhaps dont require any of the above, cheers for your thoughts
User avatar
PrObLeM
Forum Contributor
Posts: 418
Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:

Post by PrObLeM »

Ding ding ding survey says!!!!
Image

1. make a extra column in the MySQL table and set the default to 0 (not show) and use the UPDATE feature to change it to 1(to show it)
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

1. make a extra column in the MySQL table and set the default to 0 (not show) and use the UPDATE feature to change it to 1(to show it)

:D
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

lol you lazy people, i was asking if there was an alternate way I didnt think about.

I was leaning towards the table method as thats how i've done things before, thats all I needed to know. i'll go about it that way, kudos for the road path
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

I once tried a revolutionary new biological processor. Six pandas are kept in a cage. If the user selects "show email" the pandas get fed a ton of bamboo, if not they don't.

$pandas->isValid() returns state: either snoozy, contented pandas or grumpy, snarling pandas.

It's kind of tough on the pandas if no-one wants to show their email and it didn't work anyway. Pandas are always grumpy, snarling sons of b****s even when they are well-fed.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

did u by chance get in trouble for animal cruelty? :P
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

You could store the users settings in a text file ? The methodology behind this is pretty much the same as if you were doing it with a mySQL table, the only difference is in how you would do it. It might also take longer than using a mySQL table.
Post Reply