You are here: Checking string contents « All PHP « IT news, forums, messages
Checking string contents

Posted by James_sgp on 06/19/07 06:21

Hi, I`m trying to write code that will check the contents of a
variable ($distance) to see if it contains the value 'ft'. If it is
true, I need it to divide the valiable $max_depth by 3.28; then write
the variable into a MYSQL database. I have tried several different
ways, but it seems that only the original (not divided by 3.28) value
keeps getting put into the database. I`m using the line below to do
the checking:

if(strcmp($distance,"ft")==0) $max_depth=$max_depth/3.28;


Does it matter where I put this line? I have it just before the
INSERT command.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация