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
Post a Comment