Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Web Coding

Reply
 
LinkBack Thread Tools
Old 02-10-07   #1 (permalink)
New to Overclock.net
 
Join Date: Feb 2007
Posts: 2

Rep: 0 danghelus Unknown
Unique Rep: 0
Trader Rating: 0
Smile Php newbie need your help

PHP Code:
if ($row['hyip_status'] == 1)
{
$statuscolor $colors['pay'];
$text 'PAYING';
}
 
if (
$row['hyip_status'] == 2)
{
$statuscolor $colors['wait'];
$text 'WAITING';
}
 
if (
$row['hyip_status'] == 3)
{
$statuscolor $colors['problem'];
$text 'PROBLEM';
}
 
if (
$row['hyip_status'] == 4)
{
$statuscolor $colors['notpay'];
$text 'NOT PAYING';


I had a scrip before wich wasn't working well and now i have another scrip (from GC) wich is working ok but doesn't make my banner right. I have an img.php but it doens't work with this script from goldcoders. I've saw another topic like mine here but i didn't find the answer there, that's why i'm posting now this.
I need a banner like this: http://www.globalmonitor.eu/img.php?id=11

and my actual banner looks like this:
http://www.globalmonitor.eu/2/index.php?a=image&lid=1

Can you please help me??

Last edited by BFRD : 02-12-07 at 09:31 AM.
danghelus is offline   Reply With Quote
Old 02-12-07   #2 (permalink)
Programmer
 
intel nvidia

Join Date: Nov 2006
Posts: 1,514

Rep: 94 version2 is acknowledged by some
Unique Rep: 77
Trader Rating: 3
Default

Can you fill us in on what exactly you are trying to do? What's you're problem?
__________________
System: Duo
CPU
Core 2 Duo E6600 B2
Motherboard
Asus P5B Deluxe
Memory
G.SKILL HZ 2x1gb DDR2 800
Graphics Card
EVGA 9600GSO 384mb
Hard Drive
WD 640gb, Maxtor 160gb
Sound Card
Audigy 2 ZS
Power Supply
FSP 450W
Case
Ultra Aluminus
CPU cooling
Freezer Pro 7
GPU cooling
Stock
Monitor
20.1'' SOYO LCD (Wide)
version2 is online now   Reply With Quote
Old 02-12-07   #3 (permalink)
New to Overclock.net
 
Join Date: Feb 2007
Posts: 2

Rep: 0 danghelus Unknown
Unique Rep: 0
Trader Rating: 0
Default

My problem is that my new scrip doesn't make my banner right. The banner it's looking like this: http://www.globalmonitor.eu/2/index.php?a=image&lid=1
and i'd need my script to put the image i want on it and all the informations.
If i didn't make myself clear you can go to this link:
http://www.overclock.net/web-coding/122131-php-newbie-need-help.html
because i have exactly the same problem but i didn't find the answer there.
danghelus is offline   Reply With Quote
Old 02-12-07   #4 (permalink)
Bifford
 
BFRD's Avatar
 
intel nvidia

Join Date: Dec 2004
Location: Carrollton, TX
Posts: 4,342

FAQs Submitted: 8
Folding Team Rank: 27
Hardware Reviews: 2
Trader Rating: 11
Default

PHP Code:
 
switch($row['hyip_status'])
{
  case 
1:
   
$statuscolor $colors['pay'];
   
$text 'PAYING';
   break;
 
  case 
2:
   
$statuscolor $colors['wait'];
   
$text 'WAITING';
   break;
 
  case 
3:
   
$statuscolor $colors['problem'];
   
$text 'PROBLEM';
   break;
 
  case 
4:
   
$statuscolor $colors['notpay'];
   
$text 'NOT PAYING';
   break;

For more than two choices it is cleaner to use a switch statement than mulitple ifs. What you will need to do is figure out if the array that you are using to poplulate is the problem, or if the variable causing the switch is not correct. You need to dump out the '$row['hyip_status']' variable first and make sure that it has the correct value. It has been a while since i have worked with PHP, I don't recall if it will automatically cast 4 to '4' for purposes of an evaluation. You might look into using a string to compare against instead of an int.
__________________
Helpful Posts (Hopefully )
Overclocker's Calculator
Photo Editing - B&W w/Color Accents

System: Main Rig
CPU
E6700 Conroe
Motherboard
Abit QuadGT
Memory
2GB G.Skill PC2 8000 (HZ)
Graphics Card
EVGA 8800GTX
Hard Drive
150 GB Raptor X / 300GB Storage
Sound Card
Audigy 2 ZS
Power Supply
PCP&C Silencer 750
Case
Sigma Shark
CPU cooling
Stock (for now)
GPU cooling
Stock
OS
Vista Ultimate
Monitor
Dual Samsung 204b
BFRD is offline I fold for Overclock.net Overclocked Account BFRD's Gallery   Reply With Quote
Old 02-12-07   #5 (permalink)
Programmer
 
intel nvidia

Join Date: Nov 2006
Posts: 1,514

Rep: 94 version2 is acknowledged by some
Unique Rep: 77
Trader Rating: 3
Default

Are you using php GD to create a dynamic image? If so, continue to add text to the image, based on the info you are retrieving... The rest is some simple php if cases, which you use to add to the image.
__________________
System: Duo
CPU
Core 2 Duo E6600 B2
Motherboard
Asus P5B Deluxe
Memory
G.SKILL HZ 2x1gb DDR2 800
Graphics Card
EVGA 9600GSO 384mb
Hard Drive
WD 640gb, Maxtor 160gb
Sound Card
Audigy 2 ZS
Power Supply
FSP 450W
Case
Ultra Aluminus
CPU cooling
Freezer Pro 7
GPU cooling
Stock
Monitor
20.1'' SOYO LCD (Wide)
version2 is online now   Reply With Quote
Reply



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



All times are GMT -4. The time now is 12:37 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.27426 seconds with 8 queries