Entry
passing varibles doesnt work i.e.web.php?t=3 (select *from tbl where t=$t) it isnt getting it
Jan 6th, 2004 08:36
Bill Sanders, Sorin Neacsu, Eaymon Latif,
You are probably having the query inside single quotes ('). These do
not allow passing of $ variables. You have two options :
1. Use double quotes : $sql = "SELECT * FROM `tbl` WHERE t=$t";
2. Use single quotes : $sql = 'SELECT * FROM `tbl` WHERE t='.$t.'';
Consider also register globals may be turned off. If so, your query
must read:
select * from tbl where t=$_REQUEST['t']