Jump to content

Give me an idea please, I want to make member system with degrees


plodos

Recommended Posts

EACH MEMBER HAS GRADE like that sql table

CREATE TABLE `person` (
..............................
`grade` INT NOT NULL, 
.............................
) 

php/query for list the members without GRADE system

<?php 
include('dbconfig.php');

$data = mysql_query("select p.*
                     from join_person_committee j, person p
                     where j.committee_id=1 AND j.person_id = p.person_id"); //sample query without GRADE
                     
while($info=mysql_fetch_array($data))
{

	echo"			{$info['fname']} {$info['lname']}, {$info['country']} <br>";
	echo"			{$info['uni']}<br>";
	echo"			{$info['uni_dept']}<br>";
}

?>

 

grade = 0          normal member

grade = 0-50    silver member

grade = 50-100  gold member

 

If user has 100 Grade,

output will be like that

echo"			{$info['fname']} {$info['lname']}, {$info['country']} ([b]GOLD MEMBER[/b])<br>";
	echo"			{$info['uni']}<br>";
	echo"			{$info['uni_dept']}<br>";

 

If user has 50 Grade,

output will be like that

echo"			{$info['fname']} {$info['lname']}, {$info['country']} ([b]SILVER MEMBER[/b])<br>";
	echo"			{$info['uni']}<br>";
	echo"			{$info['uni_dept']}<br>";

 

If user has 0 Grade,

output will be like that

echo"			{$info['fname']} {$info['lname']}, {$info['country']} ([b]NORMAL MEMBER[/b])<br>";
	echo"			{$info['uni']}<br>";
	echo"			{$info['uni_dept']}<br>";

 

Thats not possible to write NORMAL/SILVER/GOLD MEMBERs one by one for each user..There must be a auto-system..

You understood what I mean...

How can I write these code? What must I do? Who can give me the sample/example code?

Thanks for helping me....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.