hi ,
please can any body help me. i am making a website so i am using the combination of mysql and php.there is a error in fetching the field from url.i have made a hypertext as C LANGUAGE and behind this url is
<a href="indexblank.php?course=C LANGUAGE">C language</a>
now on page indexblank.php i am retrieving data from mysql data base so my lines of code are:
<?php
$connection=mysql_connect('localhost',"a","aaa") or die(mysql_error());
$db='a';
mysql_select_db('a') or die (mysql_error());
//echo 'connection a successful';?>
<?php
$c=$_get;
$query="select * from ittraining where course like ' $c'";
$result=mysql_query($query) or die (mysql_error());
if($row = mysql_fetch_array($result))
{echo $row . " " ;
echo $row . " " ;
echo $row . " " ;
echo $row . " " ;
}
else
{
mysql_error();
mysql_free_result($result);
}
?>
now the prob here is that it is saying undefined variable at line where $c=$_get is written that is in declaring the variable.so,kindly remove my error and help me out if any body can.i will be really thankful to you.