NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page cant see what is wrong with small bit of code. any ideas?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 02-25-2006, 02:12 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
edmarriner's Avatar
Join Date: Apr 2005
Location: England :D
Posts: 834
edmarriner is a jewel in the roughedmarriner is a jewel in the roughedmarriner is a jewel in the rough
 



cant see what is wrong with small bit of code. any ideas?


hi,

i cant see what i have done wrong, its problly something simple.

any help welcome

PHP Code:
  <?php 
  
if($p=="0"){
????: NamePros.com http://www.namepros.com/programming/171250-cant-see-what-wrong-small-bit.html
  echo
"<script language='JavaScript' src='http://digg.com/diggjs/front/$cat/30' type='text/javascript'></script>";
  }
  elseif(
$p=="1"){
  echo
"<script language='JavaScript' src='http://digg.com/diggjs/submitted/$cat/30' type='text/javascript'></script>";
  }
  else(!
$cat){
  echo
"$intro";
  } 
  
?>
thanks ,

-ed

--edit--

lol, i worked it out. my else at the end was wrong.

thanks anyways
__________________
Leeds united football club


Last edited by edmarriner; 02-25-2006 at 02:16 PM.
edmarriner is offline  
Old 02-25-2006, 03:46 PM   #2 (permalink)
NamePros Regular
 
Tree's Avatar
Join Date: Feb 2006
Location: Atlanta, GA, USA
Posts: 335
Tree will become famous soon enoughTree will become famous soon enough
 



PHP Code:
  else(!$cat){
  echo
"$intro";
  }
  
?> 
'else' shouldn't have an expression.
Tree is offline  
Old 02-26-2006, 12:17 PM   #3 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,803
stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of
 



Just to clarify, the else is elseif

http://us2.php.net/elseif

-Steve
stscac is offline  
Closed Thread


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic HTML Tutorial webgear Webmaster Tutorials 8 04-02-2005 02:20 PM
2 Huge Name Forsale Vegas Entertainment Domains For Sale - Make Offer 9 09-21-2004 02:37 PM
CorePimps Code Is For Sale! contemptx For Sale / Advertising Board 2 07-20-2004 09:24 AM
Free Source Code Protector! getthis For Sale / Advertising Board 7 05-10-2004 03:14 PM

 
All times are GMT -7. The time now is 02:10 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger