You are here: Help! im having trouble error handling mysqli_connect() with posted passwords. « PHP SQL « IT news, forums, messages
Help! im having trouble error handling mysqli_connect() with posted passwords.

Posted by Ninja_Monkey on 02/14/06 01:38

hi im trying to write myself a simple database management system. and I have
noticed that whenever i use a connect command like this:
$connection = mysqli_connect($_POST['host'], $_POST['user'],
$_POST['pass']);

if all three parts are supplied it goes ok and returns an Object which i can
check after with is_object($connection).
However if there is the $_POST['pass'] empty and it is required. the error
it generates automaticly prints the error where the mysqli_connect() was
called even if i add 'or die()' at the end.
i have found that the type this error returns is boolean but i cant seem to
get the error to stop printing automaticy as its called?

i have tried putting scripts in strait after like if
(mysqli_connect_errno()) {} ect. and the error still prints at the call.

can anyone help?

 

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

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