Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - PHP/mySQL question | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 158/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
I'm wondering what is the php code that let's me display a link for every individual row in my table (lets say a User Table). Something like this: First Row of Table Second Row of Table Third Row of Table Fourth Row of Table (edited by DarkSlaya on 06-03-04 04:54 PM) |
|||
Parasyte Bullet Bill Level: 35 Posts: 41/514 EXP: 267348 For next: 12588 Since: 05-25-04 Since last post: 104 days Last activity: 32 days |
| ||
Something like this will do it.$users=@mysql_query("SELECT id,name FROM users"); |
|||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 159/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
That was simple. I don't think the rest will be hard to add (connect to db). Thanks! | |||
ErkDog Fuzz Ball Level: 47 Posts: 592/982 EXP: 752190 For next: 14013 Since: 03-15-04 From: Richmond, VA Since last post: 40 days Last activity: 19 days |
| ||
the connection to the DB is done when you require function.php | |||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 160/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
I still have one question: How would I have a different link color depending on a attribute in my table (like the powerlevel/user sex, here) |
|||
Ghaleon Newcomer Level: 3 Posts: 2/2 EXP: 64 For next: 64 Since: 05-28-04 Since last post: 516 days Last activity: 339 days |
| ||
I'd suggest you learn php... because if you knew php this would be mad easy for you to do... | |||
Modereb Paragoomba Level: 15 Posts: 1/75 EXP: 14749 For next: 1635 Since: 06-04-04 Since last post: 350 days Last activity: 339 days |
| ||
Even if you know a shitload of PHP, it's not like you'll emediately know how a new forum system is put together, especially if that system uses a bunch of custom functions, which is usually the case. Don't be a smartass. Anyway, name colors are created using the sex and powerlevel fields, an example (assuming you are selecing the sex and powerlevel fields): <font ".getnamecolor($user[sex],$user[powerlevel]).">$user[name]</font> getnamecolor($user[sex],$user[powerlevel]) outputs strings like color=000000, color=453423, color=876543, etcetera. |
|||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 161/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
Originally posted by Ghaleon I knew a little of PHP, but I skipped some things when I was learning. |
|||
Weasel Missionary in Peru Level: 34 Posts: 384/454 EXP: 236444 For next: 17207 Since: 03-15-04 From: Washington Since last post: 467 days Last activity: 339 days |
| ||
Don't skip the basics Knowing how to do this kind of stuff is important for fun interactive sites. | |||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 162/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
Yup. Now I have to do them all over again *is annoyed by functions* (edited by DarkSlaya on 06-04-04 08:21 PM) |
|||
Modereb Paragoomba Level: 15 Posts: 8/75 EXP: 14749 For next: 1635 Since: 06-04-04 Since last post: 350 days Last activity: 339 days |
| ||
Just learning PHP from a tutorial is futile. Things like functions, custom functions, etcetera, it's all good and cool to know, but if you don't need them for a while, you won't use them and most likely will forget them anyway. Things you should get under your knee and know about, and not with just PHP for that matter, are syntax, possibilities and flexibility. Let's say you start building a webpage, and you're in need of a specific function, from that point, it's good to look up on the function, and if you did that a few times, or maybe even the first time, you'll get the hang of that function. Don't just learn all kinds of stuff you most likely won't ever need anyway. |
|||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 186/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
I already knew that but thanks for remainding me. |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - PHP/mySQL question | | | |