|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-29 15:52 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 03:00:01 2025 UTC |
Description: ------------ sir, i am new user of PHP. i need to open a database in MySQL using new mysqli(). But my web page is blank if i run that program since the user name and password is not given. i need to know if root is the user what should be in user name and what should be in password column. Reproduce code: --------------- <?php @ $db=new mysqli('localhost','','','hotel'); if (mysqli_connect_errno()) { echo 'Error:could not connect to db'; } $pid=1; $pln='ap'; $sgl=300.00; $dbl=600.00; $dlflg=0; $qry="insert into plan values(".$pid.",'".$pln."',".$sgl.",".$dbl.",".$dlflg.")"; $result=$db->query($qry); if( $result) echo 'inserted'; ?> Expected result: ---------------- I need to see that the querry is inserted. Actual result: -------------- i debugged the program when line 2 is executed the control transfers some where.