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....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.