Jump to content

Recommended Posts

Hi im having trouble with uploading images with spaces in as they dont show up in the browser.

Here is the code:

$image = addslashes($_FILES['image']['name']);

$target = "images/"; 
$target = $target . basename( $_FILES['image']['name']); 

  //Writes the photo to the server 
if(move_uploaded_file($_FILES['image']['tmp_name'], $target)) 
{ 

 

Any help would be appreciated.

Perhaps you don't understand what we're asking.  The code you're showing us is used to move the uploaded file to a permanent storage location.  You need to show us code that includes an <img> tag, that's the code that displays the image.

Ah I get you now! Well I select it from the mysql table its been saved to and is:

"<div id='profileimage'><img src=".$image." width='200px' height='200px'></div> "

 

but after looking at the source code the hyperlink is stopping at the white space in the title "<img src=http://www.fightwatcher.com/images/Blue "stops here! then no hyperlink after here!"hills.jpg width='200px' height='200px'></div>

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.