Jump to content

Small code help


Php_Ghost

Recommended Posts

 

I need a small help over this code.  I am getting $ID variable not defined. So i dont what code should I used to prevent this error.  If id variable not exist then it should go to sorry. it is going but also showing that msg.  Any idea how to fix that.

 

<?php


$ID = $_GET['ID'];

if ($ID)                //if ID has some value then it should on screen. 

echo $ID;

else

echo "Sorry"

?>

Link to comment
https://forums.phpfreaks.com/topic/203271-small-code-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.