I have a SQL query within a PHP code.
$code = "SELECT children, mother FROM family WHERE childrenID = ' " . $_GET['childrenID'] . "';";
I get an error message saying that $_GET['childrenID'] is an undefined index.
how do I define this index?
I have a SQL query within a PHP code.
$code = "SELECT children, mother FROM family WHERE childrenID = ' " . $_GET['childrenID'] . "';";
I get an error message saying that $_GET['childrenID'] is an undefined index.
how do I define this index?
First check do you have any value in $_GET['childrenID']
. If yes you may also try to write your query like
$chid_id = $_GET['childrenID'];
$code = "SELECT children, mother FROM family WHERE childrenID = $chid_id";
Hope this will help you.