0

media.php

<?php
session_start();

if (empty($_SESSION[username]) AND empty($_SESSION[passuser])){
  echo "<link href='style.css' rel='stylesheet' type='text/css'>
 <center>Untuk mengakses modul, Anda harus login <br>";
  echo "<a href=index.php><b>LOGIN</b></a></center>";
}
else{
?>

Notice: Use of undefined constant username - assumed 'username' in C:\xampp\htdocs\SourceCodePHP\bab 4\toko\adminweb\media.php on line 4

Notice: Use of undefined constant passuser - assumed 'passuser' in C:\xampp\htdocs\SourceCodePHP\bab 4\toko\adminweb\media.php on line 4

Notice: Use of undefined constant module - assumed 'module' in C:\xampp\htdocs\SourceCodePHP\bab 4\toko\adminweb\content.php on line 9

Repeated error on line 4: if (empty($_SESSION[username]) AND empty($_SESSION[passuser])){

Why is it? I successfully the admin web, and now is the admin page, with few errors.

4
Contributors
4
Replies
9
Views
6 Years
Discussion Span
Last Post by mschroeder
0

These are just notices. PHP prefers that variables be defined before they are used but it will create them as it finds them. If you don't want to see the notices, you can change the error_reporting in the program or in the php.ini file.

The error message line numbers aren't in sync with the listing of the module that you provided so something must have changed in the module since you copied the errors (but that doesn't matter much, the notices would just have different line numbers).

0

revision: I successfully bypass to the admin web.

Well, basically my point is how to fix the errors so that it won't appears anylonger and at the same time my web works perfectly?

what does it mean: Use of undefined constant username ?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.