Jump to content

PHP Squisher?


Azaz

Recommended Posts

if ( $r['warn'] >= 100 )
					{
						$warn = '<img src=\'images/10.gif\'>';
						$precent = "<font color=red>100</font>";
					}
                          else if ( $r['warn'] >= 90 )
					{
						$warn = '<img src=\'images/9.gif\'>';
						$precent = "90";
					}
					else if ( $r['warn'] >= 80 )
					{
						$warn = '<img src=\'images/8.gif\'>';
						$precent = "80";
					}
					else if ( $r['warn'] >= 70 )
					{
						$warn = '<img src=\'images/7.gif\'>';
						$precent = "70";
					}
					else if ( $r['warn'] >= 60 )
					{
						$warn = '<img src=\'images/6.gif\'>';
						$precent = "60";
					}
					else if ( $r['warn'] >= 50 )
					{
						$warn = '<img src=\'images/5.gif\'>';
						$precent = "50";
					}
					else if ( $r['warn'] >= 40 )
					{
					    $warn = '<img src=\'images/4.gif\'>';
						$precent = "40";
					}	
					else if ( $r['warn'] >= 30 )
					{
					    $warn = '<img src=\'images/3.gif\'>';
						$precent = "30";
					}
					else if ( $r['warn'] >= 20 )
					{
					    $warn = '<img src=\'images/2.gif\'>';
						$precent = "20";
					}
					else if ( $r['warn'] >= 10 )
					{
					    $warn = '<img src=\'images/1.gif\'>';
						$precent = "10";}			else if ( $r['warn'] <= 9 ){$warn = '<img src=\'images/0.gif\'>';$precent = "0";}

 

 

I need to find a program that automatically squishes everything into 1 line of code, because I will not need to edit this code ever again, lol!

 

Thanks! and it's taking to much space in my coding area

Link to comment
https://forums.phpfreaks.com/topic/209209-php-squisher/
Share on other sites

Ok thanks, and this query isn't working can u find out why?

 

mysql_query("UPDATE friends SET accepted='1' WHERE friend_id='$id' AND id='{$_SESSION['user_id']}");
Redirect( "You have Successfully accepted this user", './?act=Friends&m=Pending' );

 

It's for my friend system for my forum I am creating... It doesn't pop any errors but I cannot see it change in my database table hmm...  :rtfm: :rtfm: :rtfm: :rtfm:

 

ROFL I FORGOT THE "  '    " after } ZZ..my bad delete this post, lol

 

ok thx 4 ur script zzzzzzzz

Link to comment
https://forums.phpfreaks.com/topic/209209-php-squisher/#findComment-1092518
Share on other sites

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.