Jump to content


Photo

[solved]elseif problams.


  • Please log in to reply
4 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 20 August 2006 - 07:31 PM

for some reason the code is not doing what it's suppose to.

i can get the first image but not the rest please help.

it's like the elseif dosent seem to work.

<?php

if($programming_lanuage="html"){

$picture="html.png";

}elseif($programming_lanuage="php"){

$picture="php.png";

}elseif($programming_lanuage="mysql"){

$picture="mysql.png";

}elseif($programming_lanuage="asp"){

$picture="asp.png";

}elseif($programming_lanuage="javascript"){

$picture="javascript.png";

}elseif($programming_lanuage="java"){

$picture="java.png";

}elseif($programming_lanuage="cgi"){

$picture="cgi.png";

}elseif($programming_lanuage="c++"){

$picture="c.png";

}elseif($programming_lanuage="css"){

$picture="css.png";

}elseif($programming_lanuage="python"){

$picture="python.png";

}elseif($programming_lanuage="delphi"){

$picture="delphi.png";

}
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 20 August 2006 - 07:35 PM

"=" assigns, "==" compares. You should know that by now.

#3 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 20 August 2006 - 07:36 PM

Use "==" instead of "=".

= is an assignment operator, == is a comparison operator.  So when your script executes, the first if statement makes $programming_lanuage equal to "html".

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 20 August 2006 - 07:37 PM

i do no that but it didnt work 1 min.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 20 August 2006 - 07:42 PM

sorry for that solved typo.

sorry i was assigning both conditions didnt see it cheers.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users