hammerslane
01-12-2004, 03:57 AM
hi there, i'm processing a form which simply passes a few hidden variables through a page.<form action='2delete.php'>
<input type=hidden name=jobtitle value=$_GET['foo']>
<input type=submit value='Go'>
</form>
The browser doesn't like the apostrophes in the $_GET['foo'] so when i just put $_GET[foo], if $foo has space in it, for example "nice variable" it truncates it to "nice", which screws up all my SQL Queries..
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /dir/blah/bar/page.php on line 149[/code] (above is the error it returns)
what can i put so that it doesn't hate spaces, and so it doesn't return an error?
thanks!
<input type=hidden name=jobtitle value=$_GET['foo']>
<input type=submit value='Go'>
</form>
The browser doesn't like the apostrophes in the $_GET['foo'] so when i just put $_GET[foo], if $foo has space in it, for example "nice variable" it truncates it to "nice", which screws up all my SQL Queries..
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /dir/blah/bar/page.php on line 149[/code] (above is the error it returns)
what can i put so that it doesn't hate spaces, and so it doesn't return an error?
thanks!