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
kevrelland
Forum Commoner
Posts: 73 Joined: Mon Jan 08, 2007 7:41 am
Post
by kevrelland » Tue Jun 15, 2010 8:05 am
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
Post
by aravona » Tue Jun 15, 2010 8:08 am
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
Post
by kevrelland » Tue Jun 15, 2010 8:13 am
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
hypedupdawg
Forum Commoner
Posts: 74 Joined: Sat Apr 10, 2010 5:21 am
Post
by hypedupdawg » Tue Jun 15, 2010 10:59 am
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
Post
by kevrelland » Tue Jun 15, 2010 11:52 am
Cheers,
works fine
kevin