• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/site/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/site/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/site/index.php
Line: 315
Function: require_once

I have a blog, the code of the login in this blog is divided in two pincipal files, a php file and a html file that include javascipt code to use ajax service. When I click the button login with id = "get" the result is not present, the space dedicated to print the result remain empty.

index.html

                                   Accedi- ListenMe!                                   

EXAMPLE






AJAX RESPONSE

login.php

num_rows > 0) {     while($row = $result->fetch_assoc()) {         /*         echo "id: " . $row["id"]."
". "email: " . $row["email"]."
". "password: " . $row["password"]. "
". "token: " . $row["token"]. "
"; echo ($row["token"]); */ $token = $row["token"]; echo json_encode($token); } } else { echo "0 results"; } mysqli_close($conn); ?>

enter image description here

Download script demo [LINK] [Origin]
Download script demo [LINK 2] [Onedrive] Download script demo [LINK 2] [Google drive]