Jump to content

a problem as regards mysqli


deathisonitsway

Recommended Posts

<?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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.