Jump to content

Photos not appearing


garydt

Recommended Posts

$big = $row_Recordset2['bigimagename'];

 

<a href="editphoto.php"><img src="<?php print $big;?>" border="0" align="top" /></a></td> 

 

The photo is displayed on webpage when i try it locally but not on the remote server. I've created the same folders on the remote servers that i have locally so paths should be the same.

Heres what in the $row_Recordset2['bigimagename'] field-

./thumbnails/P6040019.JPG

Link to comment
Share on other sites

This is the path to the image when i right click on where the image should be-

http://www.elvis-people.com/smallpics/P6040012.JPG

The path is right although in the database it is stored aas '.smallpics/P6040012.JPG'

is this right?

 

Script for uploading the photo-

$uploadsDirectory = './uploads/'; 

$uploadFilename = $uploadsDirectory.$fieldname['name'];

move_uploaded_file($fieldname['tmp_name'], $uploadFilename);

resizeimage($fieldname['name']);
$smallimage = './thumbnails/'.$_FILES['file']['name'];

resizelarger($fieldname['name']);
$smallpics = './smallpics/'.$_FILES['file']['name'];

unlink($uploadFilename);

mysql_select_db($database_elvisdb, $elvisdb);
$insertSQL = sprintf("INSERT INTO images (imageName, bigimagename, usnm, bigcaption) VALUES ('$smallimage', '$smallpics', '$user', %s)", 

 

script for displaying photo

 $big = $row_Recordset2['bigimagename'];
<td valign="top" aliign="CENTER">
             <a href="editphoto.php"><img src="<?php print $big;?>" border="0" align="top" /></a></td>
[code]

It works locally but not on the server.  hope i've given the right information you asked for.

[/code]

Link to comment
Share on other sites

try this

$big = $row_Recordset2['bigimagename'];

 

<td valign="top" aliign="CENTER">

 

            <a href="editphoto.php?id=<?=$big?>">click here to view</a></td>

edit.php

$id1=$_REQUEST['id'];

<img src="<?=id1?>" border="0" align="top" />

Link to comment
Share on other sites

So, are you saying the image gets to the server but won't display, or that you cannot get it there?  I ask this because when I clicked on that JPG link, I got an e404.

 

I threw a test blue square up there.  Where it says to click on the image to edit, the IMG tag is just "".  Let me know if I am in the wrong place.

Link to comment
Share on other sites

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.