I know you can\'t directly use PHP variables inside javascript code, but is there a way around it? I need to use these parameter\'s in javascript:
username: \'&l
Resource id #4 means u have just not complete the mysql query
mysql_query returns Resource id
u have to fetch the data using while ($row=mysql_fetch_array())
and then use
written here
For SELECT, SHOW, DESCRIBE, EXPLAIN and other statements returning resultset, mysql_query() returns a resource on success, or FALSE on error.
For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error.
don't use mysql_real_escape string
for GET data..instead use (int)$_GET['id']
see here
If no connection is found or established, an E_WARNING level error is generated