url string not working **Fixed**

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kevrelland
Forum Commoner
Posts: 73
Joined: Mon Jan 08, 2007 7:41 am

url string not working **Fixed**

Post 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
Last edited by kevrelland on Tue Jun 15, 2010 11:53 am, edited 2 times in total.
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

Re: url string not working

Post 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 :)
kevrelland
Forum Commoner
Posts: 73
Joined: Mon Jan 08, 2007 7:41 am

Re: url string not working

Post 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
User avatar
hypedupdawg
Forum Commoner
Posts: 74
Joined: Sat Apr 10, 2010 5:21 am

Re: url string not working

Post 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.
kevrelland
Forum Commoner
Posts: 73
Joined: Mon Jan 08, 2007 7:41 am

Re: url string not working

Post by kevrelland »

Cheers,
works fine
kevin
Post Reply