Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 20-12-2002, 12:44 AM
New kid on the block
 
Join Date: Dec 2002
Posts: 2
Rep Power: 0
bizikit is on a distinguished road
status forum

ni ade source code forum yg aku cuba nak hack tapi tak dapat lagii .....cam ner yer nak buat status ni

if(@$info[level] == "1") {
$status = "Member";
if($info['posts'] > "5" )
{
$status1 = "good member";
}
elseif($info['posts'] > "10" )
{
$status1 = "excellent";
}

}
......$info['post'] ni berapa dia send kat forum tu
macam mana nak buat bila dia lebih 10 dai jadi excellent ........sebab yg kat atas ni bila dia lebih 5 dia kuar jadi good member .....kalo dia lebih 10 dia still good member ....... aku dah try dgn ...&& .......tapi dia cakap error .....macam mana yer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 20-12-2002, 10:05 AM
mozaks's Avatar
Senior Webmaster
 
Join Date: Jul 2001
Location: Jail
Posts: 228
Rep Power: 94
mozaks is on a distinguished road
Send a message via ICQ to mozaks Send a message via AIM to mozaks Send a message via Yahoo to mozaks
ko sepatutnya letakkan nilai yg tinggi kat atas dulu... sebab kalau info[post] tu nilai dia 11, dia tetap lebih besar dari 5 sebab tu dia kluar camtu...

penyelesaian:

if($info['posts'] > 10 )
{
$status1 = "excellent";
}
elseif($info['posts'] > 5 )
{
$status1 = "good member";
}

atau cara lain:

if(10 > $info['posts'] && $info['posts'] > 5 )
{
$status1 = "good member";
}
elseif($info['posts'] > 10 )
{
$status1 = "excellent";
}
__________________
Malaysia's Best Web Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 25-12-2002, 01:37 PM
Novice Webmaster
 
Join Date: Dec 2001
Posts: 22
Rep Power: 0
hd2000 is on a distinguished road
Send a message via ICQ to hd2000
Code:
$info[level] == "1"
Jika $info[level] ialah integer, it should be $info[level] == 1
the variable must compare dengan number not a string atau character, fail to obey the rules, will result indertermined result
__________________
Life is short , get funky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 25-12-2002, 02:17 PM
mozaks's Avatar
Senior Webmaster
 
Join Date: Jul 2001
Location: Jail
Posts: 228
Rep Power: 94
mozaks is on a distinguished road
Send a message via ICQ to mozaks Send a message via AIM to mozaks Send a message via Yahoo to mozaks
Quote:
Originally posted by hd2000
Code:
$info[level] == "1"
Jika $info[level] ialah integer, it should be $info[level] == 1
the variable must compare dengan number not a string atau character, fail to obey the rules, will result indertermined result
doublequote tidak memberi sebarang kesan pada integer
__________________
Malaysia's Best Web Hosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-01-2003, 02:43 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 769
Rep Power: 101
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
aha... aku sokong dengan pendapat mozaks, doublequote tak memberi kesan pada integer.
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
question about member's status yipguseng FeedBack & Suggestion 12 14-04-2007 04:51 PM
Please submit your forum to my forum directory tansks Other Webmaster-related Services and Promotion 6 17-11-2006 03:27 PM
wat do i need to have a forum? cyrick Paid Hosting Discussion Forum 16 21-02-2006 11:14 PM
First Malaysian forum with forum Ai napy8gen Mamak Stall 0 12-07-2002 03:19 AM


All times are GMT +8. The time now is 03:19 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61