• 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 am getting this warning and I am not aware what to do.

js code:

var xhttp = new XMLHttpRequest();  subBtn.addEventListener("click",function(){     var crd = document.createElement("div");     crd.setAttribute("class", "card");     crd.innerHTML = inptTxt.value;     contDiv .appendChild(crd);     xhttp.onreadystatechange=function() {         if (this.readyState == 4 && this.status == 200) {             document.getElementsByClassName("card").bgColor = JSON.parse(this.responseText).color;                   }     };     xhttp.open("GET","http://api.creativehandles.com/getRandomColor","" ,true);     xhttp.send();  }) 

How can I solve this problem?

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