Nelamurire erori Undefined variable /Constant
Scris: Vin Mar 11, 2016
Salut, am un script de chat dar imi afiseaza urmatoarele erori, cum as putea sa le rezolv ?
Linia 234 :
Cod:
Linia 261:
Cod:
Linia 373:
Cod:
Cod: Selectaţi tot
Notice: Undefined variable: online1 in C:\xampp\htdocs\chat\syns_mods\admin\settings.php on line 234
Notice: Use of undefined constant guest_limit - assumed 'guest_limit' in C:\xampp\htdocs\chat\syns_mods\admin\settings.php on line 261
Warning: mysqli_close() expects parameter 1 to be mysqli, array given in C:\xampp\htdocs\chat\syns_mods\admin\settings.php on line 373
Cod: Selectaţi tot
<tr><td><b>Chatroom Online?<b></td><td><select name="chat_online"><option value="yes" '.$online1.'>yes<option value="no" '.$online2.'>no</select></td></tr>
Cod: Selectaţi tot
if($settings['chat_online'] === "yes"){
$online1 = 'selected="yes"';
}else{
$online2 = 'selected="no"'; }
Cod: Selectaţi tot
<tr><td><b>Guest limit: (Allow Guest Access must be set to yes)<b></td><td><input type="number" name="guest_limit" value="'.$settings[guest_limit].'"> Guest(s)</td></tr>
Cod: Selectaţi tot
$guest_limit = mysqli_real_escape_string($settings, $_POST[guest_limit]);
Cod: Selectaţi tot
mysqli_close($settings);
Cod: Selectaţi tot
$settings = new mysqli($config['dbConnection']['host'],$config['dbConnection']['user'],$config['dbConnection']['pass'],$config['dbConnection']['name']);