You are here: I am a php noob and have a quick question « PHP Programming Language « IT news, forums, messages
I am a php noob and have a quick question

Posted by Computer Guy on 06/18/07 22:21

Hi I have recently started working with PHP and am making a
neighborhood website. I am connecting to my Mysql database and am
having difficulty understanding what is happening in the example on
the PHP website. It connects fine but I do not understand the code.
I do not just like to take other people's code so if someone can
explain this to me that would be great.

<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

I do not understand the if (!$link) part
what does the ! mean and what is the value of link?

thank you

 

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

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