deathisonitsway Posted July 30, 2008 Share Posted July 30, 2008 <?php $link=mysqli_connect("localhost","root","","deneme"); if(mysqli_connect_errno()) { printf("baglanti hatasi:%s",mysqli_connect_error()); exit(); } $stmt = mysqli_prepare($link, "INSERT INTO uye VALUES (?,?)"); mysqli_stmt_bind_param($stmt, 'ss', $mail, $sifre); $mail = 'a'; $sifre = 'b'; mysqli_stmt_execute($stmt); printf("%s Row inserted.\n", mysqli_stmt_affected_rows($stmt)); mysqli_stmt_close($stmt); ?> this code does not insert in database...but I could not find where is the problem.please help me. such as following my uye table fields; id----mail----password ..................... Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given in C:\apache2triad\htdocs\deneme.php on line 14 Warning: mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, boolean given in C:\apache2triad\htdocs\deneme.php on line 20 Warning: mysqli_stmt_affected_rows() expects parameter 1 to be mysqli_stmt, boolean given in C:\apache2triad\htdocs\deneme.php on line 22 Row inserted. Warning: mysqli_stmt_close() expects parameter 1 to be mysqli_stmt, boolean given in C:\apache2triad\htdocs\deneme.php on line 24 that gives a error such as above Quote Link to comment Share on other sites More sharing options...
deathisonitsway Posted July 31, 2008 Author Share Posted July 31, 2008 please help me, :'( Quote Link to comment Share on other sites More sharing options...
fenway Posted July 31, 2008 Share Posted July 31, 2008 Perhaps because you're declaring your variables after you use them... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.