-2

Good afternoon, an error in the admin

When I enter the page, it shows errors.

Not recording in the database

Can you fix that code below?

Thank you very much for the help.

PHP Notice: Undefined index: id in /genel-ayarlar.php on line 41

<?
include ("../db.php");
$id=(int)$_GET['id'];
$calistir = mysql_query("select * from genelayarlar order by id DESC LIMIT 1") or die("An error occurred! ".mysql_error());
$sor = mysql_fetch_assoc($calistir);
?>

PHP Notice: Undefined index: id in /genel-ayarlar.php on line 199

<?
include ("../db.php");
$id=(int)$_GET['id'];
$calistir = mysql_query("select * from logo order by id DESC LIMIT 1") or die("An error occurred! ".mysql_error());
$gor = mysql_fetch_assoc($calistir);
?>
Angelino
  • 3
  • 7

1 Answers1

0

Try:

$id = isset($_GET['id']) ? (int)$_GET['id'] : null;