Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - PHP/mySQL question
  
User name:
Password:
Reply:
 

UserPost
DarkSlaya
Posts: 186/4249
I already knew that but thanks for remainding me.
Modereb
Posts: 8/75
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
Posts: 162/4249
Yup. Now I have to do them all over again
*is annoyed by functions*
Weasel
Posts: 384/454
Don't skip the basics Knowing how to do this kind of stuff is important for fun interactive sites.
DarkSlaya
Posts: 161/4249
Originally posted by Ghaleon
I'd suggest you learn php... because if you knew php this would be mad easy for you to do...


I knew a little of PHP, but I skipped some things when I was learning.
Modereb
Posts: 1/75
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.
Ghaleon
Posts: 2/2
I'd suggest you learn php... because if you knew php this would be mad easy for you to do...
DarkSlaya
Posts: 160/4249
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)
ErkDog
Posts: 592/982
the connection to the DB is done when you require function.php
DarkSlaya
Posts: 159/4249
That was simple. I don't think the rest will be hard to add (connect to db). Thanks!
Parasyte
Posts: 41/514
Something like this will do it.

$users=@mysql_query("SELECT id,name FROM users");
while ($user=@mysql_fetch_array($users)) echo "<a href=\"user.php?id=$user[id]\">$user[name]</a><br>\n";
DarkSlaya
Posts: 158/4249
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



Acmlm's Board - I2 Archive - Programming - PHP/mySQL question


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.009 seconds.