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 Acmlmboard support?.
Acmlm's Board - I2 Archive - Acmlmboard support? - how would I do this? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 196/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 05-21-04 11:03 PM Link | Quote
ok i have it so when someone registers they can pick a class(paladin, warrior, etc) and so far it works, it puts a number in a Class field in the users table, but now in the profile, I want it to show the name of the class, like say they Pick paladin, that adds 1 to the class field, and in profile I want it to actually show Paladin, instead of the number 1, I tried an if statement, but it doesnt wanna work...here is what I have in the register.
$classu="
select name=class>
option value =Paladin>Paladin
option value =Druid>Druid
option value =Magician>Magician
option value =Warrior>Warrior
/select>";
(with the < in from of them, if I did that it would actually make the drop down box here)

that works fine....even though the value says the name, it puts a number in the database, is there anyway to make it put that value as the Name of the class?



(edited by Chaosflare on 05-21-04 02:04 PM)
(edited by Chaosflare on 05-21-04 02:05 PM)
(edited by Chaosflare on 05-21-04 02:05 PM)
ErkDog

Fuzz Ball
Level: 47

Posts: 553/982
EXP: 752190
For next: 14013

Since: 03-15-04
From: Richmond, VA

Since last post: 40 days
Last activity: 19 days
Posted on 05-22-04 02:29 AM Link | Quote
well obviously you took someone else's code and just inserted it into your code... otherwise you would understand how it works...

as far as displaying the the actual class

why do you have a select list box ??

it should be soemthing like

$blah = select class from user

switch $blah
case : 1 echo "paladin"
case : 2 echo "druid"

etc....

and obviously you need to use the real code there...
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 199/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 05-22-04 03:17 AM Link | Quote
for one, I wrote this from scratch, 2nd it uses a select list box to select the class they want when registering, but it only inserts a number into the database not any text, but ill figure it out, I have an idea actually.
ErkDog

Fuzz Ball
Level: 47

Posts: 562/982
EXP: 752190
For next: 14013

Since: 03-15-04
From: Richmond, VA

Since last post: 40 days
Last activity: 19 days
Posted on 05-22-04 08:08 AM Link | Quote
well you could 1) change the data field to ... text 15 characters ...

or 2) use the code I just gave you
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 204/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 05-22-04 08:46 AM Link | Quote
ok I started trying a different approach...here it is, this is from profile.php

if ($user[class] == 1){
$class="img src=/images/class/paladin.png";
}
and yeah, I didnt put the < or > because it messes up here...
and it makes the page blank and white...I dont see anything wrong with it...


(edited by Chaosflare on 05-21-04 11:47 PM)
Xkeeper
The required libraries have not been defined.
Level: NAN

Posts: -4357/-863
EXP: NAN
For next: 0

Since: 03-15-04

Since last post: 2 hours
Last activity: -753366 sec.
Posted on 05-22-04 08:49 AM Link | Quote
Originally posted by Chaosflare
ok I started trying a different approach...here it is, this is from profile.php

if ($user[class] == 1){
$class="img src=/images/class/paladin.png";
}
and yeah, I didnt put the < or > because it messes up here...
and it makes the page blank and white...I dont see anything wrong with it...
It might have something to do with the class thing. Seeing as how a lot of things tend to use that as a keyword...

But other than that...
Sokarhacd

Ball and Chain Trooper
Resistance is Futile
You Will Be Assimilated
Hab SoSlI' Quch
Level: 61

Posts: 205/1757
EXP: 1799888
For next: 76708

Since: 03-15-04

Since last post: 6 days
Last activity: 4 hours
Posted on 05-22-04 08:54 AM Link | Quote
I tried changing it to $classu but same results....sometimes I just hate php
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Acmlmboard support? - how would I do this? | |


ABII


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



Page rendered in 0.005 seconds.