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 Link to comment https://forums.phpfreaks.com/topic/117418-a-problem-as-regards-mysqli/ Share on other sites More sharing options...
deathisonitsway Posted July 31, 2008 Author Share Posted July 31, 2008 please help me, :'( Link to comment https://forums.phpfreaks.com/topic/117418-a-problem-as-regards-mysqli/#findComment-604304 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... Link to comment https://forums.phpfreaks.com/topic/117418-a-problem-as-regards-mysqli/#findComment-604819 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.