Source code is
1)?php
2)include('connect.php');
3)mysql_select_db("$table_name1");
4)$query = "select * from userid where username="$_REQUEST[username]";
The error message is:
PHP Parse error: parse error, unexpected T_VARIABLE in e:\inetpub\wwwroot\yuan\adduser1.php on line 4
Thank you
Bob
Help me: PHP Parse error
Moderator: General Moderators
- trollll
- Forum Contributor
- Posts: 181
- Joined: Tue Jun 10, 2003 11:56 pm
- Location: Round Rock, TX
- Contact:
Try replacing line 4 with:
The "." appends strings together so that:
"Hello"." "."world." would return "Hello world."
Code: Select all
$query = "select * from userid where username=".$_REQUEST[username];"Hello"." "."world." would return "Hello world."
Code: Select all
4)$query = "select * from userid where username="$_REQUESTїusername]";Code: Select all
4)$query = "select * from userid where username='" . $_REQUESTї'username'] . "'";