+ 1

Help plss

this is my code <?php if (isset($_POST['submit'])){ $search=$_POST['search'] $result=$conn->query("select * from tablename where ID='$search' "); $row=mysqli_fetch_object($result); ?> and to display the record <p><?php echo $row->ID ?></p> my question is , can I store this "$row ->ID" in variable ? I tried it like this <?php $store=$row->ID; ?> but its not working... plss help me

16th Mar 2018, 6:36 AM
Naruto Shippuden
Naruto Shippuden - avatar
1 ответ
0
You need to convert the object into a variable first, before you can echo it. you can look that up or you can do it all the traditional way without using object orientation
25th Mar 2018, 6:39 PM
Jean-louis du Plessis
Jean-louis du Plessis - avatar