php - Get the rows and display them in echo mysqli prepared -


im trying rows database mysqli prepare statments , display them in echo <?php echo $username; ?> don't know how them , wasted 4 hours no success , greate

php

 <?php  include("secure/functions.php");  session_start();  $stmt = $mysqli->prepare("select * members username = ?");      $stmt->bind_param('s', $_session['username']); // bind "$username" parameter.     $stmt->execute(); // execute prepared query.     $stmt->store_result();      if($stmt->num_rows == 1) {      $stmt->bind_result($id,$username); // variables result.        $stmt->fetch(); } ?> 

you used $session_start(); should session_start(); no dollar sign.


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -