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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.