Page 1 of 1

url string not working **Fixed**

Posted: Tue Jun 15, 2010 8:05 am
by kevrelland
Hi
i'm trying to add the image id to the end of this string

Code: Select all

header("Location: update_links.php?upload_message=image uploaded&upload_message_type=success&show_image=".$_FILES["image_upload_box"]["name"]&link_id"="$row_links['link_id']");
and i get T_CONSTANT_ENCAPSED_STRING error
anybody know how to fix it
Cheers
Kev

Re: url string not working

Posted: Tue Jun 15, 2010 8:08 am
by aravona
I think you need to look again at your " " around the = sign, i dont think thats needed at all.

Also "</span>); you're span is outside your initial " ". Try changing those and see what happens :)

Re: url string not working

Posted: Tue Jun 15, 2010 8:13 am
by kevrelland
sorry i was trying to highlight the text to show what part was not working

Code: Select all

header("Location: update_links.php?upload_message=image uploaded&upload_message_type=success&link_id=".$_REQUEST["link_id"]"&show_image=".$_FILES["image_upload_box"]["name"]);
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

Re: url string not working

Posted: Tue Jun 15, 2010 10:59 am
by hypedupdawg
You're missing one of the concatenation dots between the $_REQUEST["link_id"] variable and the "&show_image=" string:

Code: Select all

header("Location: update_links.php?upload_message=image uploaded&upload_message_type=success&link_id=".$_REQUEST["link_id"]."&show_image=".$_FILES["image_upload_box"]["name"]);
should work fine.

Re: url string not working

Posted: Tue Jun 15, 2010 11:52 am
by kevrelland
Cheers,
works fine
kevin