I'm using PHP 4.2.1 and MySQL 3.23.39 for WinXP.
My problem is that I can't seem to be able to pass a value through the URL. I tried to catch the variable with this : $id= HTTP_GET_VARS['id']; I also tried without but it always give me a notice.
The SQL query I'm using :
$query= "SELECT * FROM employees WHERE id = '$id'";
When using the line $id= HTTP_GET_VARS['id'];
Parse error: parse error, unexpected '[' in C:\Web_Wolf_PHP\employee.php on line 4 // Line 4 == $id= HTTP_GET_VARS['id'];
Without using the line $id= HTTP_GET_VARS['id'];
Notice: Undefined variable: id in C:\Web_Wolf_PHP\employee.php on line 17 // Line 17 == SQL query
My problem is that I can't seem to be able to pass a value through the URL. I tried to catch the variable with this : $id= HTTP_GET_VARS['id']; I also tried without but it always give me a notice.
The SQL query I'm using :
$query= "SELECT * FROM employees WHERE id = '$id'";
When using the line $id= HTTP_GET_VARS['id'];
Parse error: parse error, unexpected '[' in C:\Web_Wolf_PHP\employee.php on line 4 // Line 4 == $id= HTTP_GET_VARS['id'];
Without using the line $id= HTTP_GET_VARS['id'];
Notice: Undefined variable: id in C:\Web_Wolf_PHP\employee.php on line 17 // Line 17 == SQL query