I have this code:
<?php
session_start();
$cmd=$_GET["cmd"];
$con = mysql_connect("localhost","root","geheim");
if(!con)
{
die('Connection failed because of' .mysql_error());
}
mysql_select_db("ebay",$con);
if($cmd=="GetEmployee")
{
sleep(10);
echo "<table border='1' width='100%'>
<tr>
<th>test1</th>
<th>test2</th>
<th>test3</th>
</tr>";
$sql="select * from tblAuction";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result))
{
echo "<tr>
<td>".$row['SELLER_ID']."</td>
<td>".$row['ACCESSSTARTS']."</td>
<td>".$row['ARTICLE_NAME']."</td>
</tr>";
}
echo "</table>";
}
mysql_close($con);
?>
Which returns
Undefined index: cmd in C:\Programme\EasyPHP 2.0b1\www\get_employee.php on line 3
Notice: Use of undefined constant con - assumed 'con' in C:\Programme\EasyPHP 2.0b1\www\get_employee.php on line 5
And I am not exactly sure why.