Fatal error:call to member function fetch_array?

Course Queries Syllabus Queries 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago


I am trying to create a login form, in that login form I am using fetch_array() method to fetch the fields that user enter,but it showing some errors:

Login.php

    php 
include ("Connection.php");

?>
php 
   if(isset($_POST['Login'])) 
   {
        $Em = $_POST['form-email'];
        $Pw = $_POST['form-password'];

        $result = $con->query("SELECT * FROM userdetails where Email='$Em' Password='$Pw'");

        $row = $result->fetch_assoc(MYSQLI_BOTH);

        session_start();
        $_SESSION["UserID"] = $row['UserID'];

        header('Location: index.php');


   }





 ?>

 lang="en">

    

         charset="utf-8">
         http-equiv="X-UA-Compatible" content="IE=edge">
         name="viewport" content="width=device-width, initial-scale=1">
        </span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: #303336;">GTEC Registration Form Template</span><span class="tag" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-sizing: inherit; color: #7d2727;">

        
         rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:400,100,300,500">
         rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
         rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css">
         rel="stylesheet" href="assets/css/form-elements.css">
         rel="stylesheet" href="assets/css/style.css">

        
        
        

        


    

    



        
         class="top-content">

             class="inner-bg">
                 class="container">
                     class="row">
                         class="col-sm-7 text">
                            

GTEC Network Registration Form

class="description"> class="jumbotron"> To be a premier Institution of choice in the region and become one of the leading educational Institutions in the country widely recognized for providing high quality, transformative and affordable value based education in the field of Engineering and Technology.

class="top-big-link"> class="btn btn-link-2" href="registrer.php">Sign Up!
class="col-sm-5 form-box"> class="form-top"> class="form-top-left">

Login

Fill in the form below to get instant access:
Once you login your account ,

0 views
0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.