Setting and passing variable from query

I’m using an upload and crop script that works, but I need to pass it a variable for a user so that each user can upload and crop their pic. I pass a query to the script and it works, except I can’t use it as part of another variable.

[php]
$var = @$_GET[‘u’];

$upload_dir = “reg/” . “$u”;
$upload_path = $upload_dir."/";
$large_image_name = “large.jpg”;
$thumb_image_name = “thumb.jpg”;
[/php]

THe $upload_dir doesn’t work. It shows up as

[php]/reg//[/php]

What am I doing wrong?

$u doesn’t exist, unless its coming from somewhere else.
don’t need the quotes around $u
don’t surpress error messages until after you get it working, remove the $ from infront of the $_GET
as far as i can tell, you’re not using $var anywhere, that’s why its not working.

Sponsor our Newsletter | Privacy Policy | Terms of Service