SitePoint Sponsor

User Tag List

Page 29 of 31 FirstFirst ... 1925262728293031 LastLast
Results 701 to 725 of 767
  1. #701
    SitePoint Addict
    Join Date
    Jan 2009
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    spikeZ thanks for the code

    I still can't get it to work

    1. Loading preupload(.php) I get the Notice

    Notice: Undefined variable: photo_category_list in /Applications/MAMP/htdocs/3_ForumGallery/preupload.php on line 17

    I fixed this by declaring photo_category as an empty variable at the top of the page.

    2. When I upload the photo an add a caption upload(.php) loads where I get

    Table 'gallery.gallery_photos' doesn't existPhoto not uploaded

    I think refers to this part of the code


    PHP Code:
    mysql_query("INSERT INTO gallery_photos(`photo_filename`,`photo_caption`,`photo_category`) 
                                    VALUES ('0' , '"
    .addslashes($photo_caption[$counter])."','".addslashes($_POST['category'])."')"
                                    or die(
    mysql_error() . 'Photo not uploaded'); 

    Any help with this matter would be greatly appreicated.

  2. #702
    SitePoint Addict
    Join Date
    Jan 2009
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got it working - I had a typo in my DB table name

  3. #703
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    Glad you got it working ttmt, I have edited the code and added the $photo_category_list variable
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  4. #704
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Hi Priya,

    Could you change this line for me and test it out?:

    Look for:
    PHP Code:
    if( strcasecmp($_POST['action'], "Submit")==&& !empty( $_POST['category_id'] ) )
            { 
    Change to:
    PHP Code:
    if( strcasecmp($_POST['action'], "Submit")==&& !empty( $_POST['photo_id'] ) )
            { 
    The form has been set to 'photo_id' and not 'category_id' and due to this when you click on Submit the code bypasses the update and delete code to only display the message.

    spence

  5. #705
    SitePoint Guru
    Join Date
    Nov 2002
    Location
    Dubai
    Posts
    714
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Spence, when I do that, I get the message "Action not understood" instead of "Process completed".

  6. #706
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by jppp View Post
    Spence, when I do that, I get the message "Action not understood" instead of "Process completed".
    Ok, from what I have found this time round (I'm not as tierd) is the photo_id was not being placed in key areas. When displaying the page the 'Picture Id:' should show the ID but it was blank and so was other areas.

    I found that you had placed $_POST['photo_id'] instead of $_GET['photo_id'] in certain areas.

    I've changed the code for you ready to copy and paste then try :
    PHP Code:
    <?php
        
    include("config.inc.php");
        
    // collect and check the data sent by url is a number
    $photo_id = (int)($_GET['photo_id']);
    // Check $photo_id is not empty
    if(!empty($photo_id) )
        {
        
    // Firstly Lets get the Photo ID
     
        
    $result mysql_query("SELECT photo_caption,photo_filename,photo_category FROM gallery_photos WHERE 
    photo_id='"
    .addslashes($photo_id)."'")
    or die(
    mysql_error());
    $nr mysql_num_rows($result);
        if( 
    $nr )
        {
            echo(
    "Photo not found in DB!");
        }
        else
        {           
        
    $row mysql_fetch_array$result );
        
    mysql_free_result$result );
        echo(
    "Picture ID: ".$_GET['photo_id']."<br><br>");
        echo(
    "<a href='viewgallery.php?cid=".$row['photo_category']."&pid=".$_GET['photo_id']."'><img 
    src='"
    .$images_dir."/tb_".$row[1]."' border='0' alt='".$row[0]."' /></a>");
        
    // Firstly Lets build the Category List
        
    $result mysql_query"SELECT category_id,category_name FROM gallery_category" );
        while( 
    $row2 mysql_fetch_array$result ) )
        {
            if( 
    $row2['category_id'] == $row['photo_category'] )
            {
    $category_list .= '<option value="'.$row2[0].'" selected>'.$row2[1].'</option>\n';
            }
            else
            {
    $category_list .= '<option value="'.$row2[0].'">'.$row2[1].'</option>\n';
            }
        }
        
    mysql_free_result$result );
        
    $category_list '<select name="category_id">'.$category_list.'</select>';
    }
    ?>
    <form name="photo_move" action="edit_photo.php" method="post">
    <b>Move Photo / Update Caption:</b><br />
    Select New Category: <?php echo($category_list); ?><br /><br />
    Update Caption: <input type="text" name="caption" value="<?php echo($row['photo_caption']); ?>" /><br />
    <input type="hidden" value="<?php echo($_GET['photo_id']); ?>" name="photo_id" />
    <input type="submit" value="Submit" name="action" />
    </form>
    <br />
    <form name="photo_delete" action="edit_photo.php" method="post">
    <b>Delete Photo:</b><br />
    <input type="hidden" value="<?php echo($_GET['photo_id']); ?>" name="photo_id" />
    <input type="submit" value="Delete This Photo?" name="action" onclick="return confirm('Are you sure you want to do delete 
    this photo?')" />
    </form>
    <a href="admin.php">Back to Administration Page</a>
    <?php
        
    }
        else
        {
            if( 
    strcasecmp($_POST['action'], "Submit")==&& !empty( $_POST['photo_id'] ) )
            {
                
    edit_photo($_POST['photo_id'], $_POST['caption'], $_POST['category_id']);
            }
            else if( 
    strcasecmp($_POST['action'], "Delete This Photo?")==&& !empty( $_POST['photo_id'] ) )
            {
                
    delete_photo($_POST['photo_id']);
            }
            else
            {
                echo(
    "Action not understood"); exit;
            }
            echo(
    "Process completed!");
            echo(
    "<br><a href='admin.php'>Back to Administration Page</a>");
        }
    // the functions here
    function edit_photo$photo_id$new_caption$new_category )
    {
    mysql_query"UPDATE gallery_photos SET photo_caption='".addslashes$new_caption )."', photo_category='".addslashes
    $new_category )."' WHERE photo_id='".addslashes$photo_id )."'"  );
    }
    function 
    delete_photo($photo_id)
    {
    global 
    $images_dir;
    $result mysql_query("
       SELECT photo_filename
       FROM gallery_photos
       WHERE photo_id = '" 
    addslashes($photo_id) . "'
    "
    );
    list(
    $filename) = mysql_fetch_array($result);
    mysql_free_result($result);
    unlink($images_dir '/' $filename);
    unlink($images_dir '/tb_' $filename);
    mysql_query("
       DELETE FROM gallery_photos
       WHERE photo_id='" 
    addslashes($photo_id) . "'
    "
    );
    }
    ?>
    Hopefully this time round

  7. #707
    SitePoint Guru
    Join Date
    Nov 2002
    Location
    Dubai
    Posts
    714
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Spence, the code works! I do not have enough words to thank you. I feel on top of the world.
    I think I now have most of the things in order for me to upload the site using my webhost.
    I can now upload, delete and edit images, add and delete categories, and also have a next & previous link in my full image pages.

    I think the only thing remaining is to have a pagination script if I need to upload a large number of images running to more than one page in a single category. I remember seeing your code in some previous threads and I am ready to work on it with full vigour.

    Thank you so much once again.

  8. #708
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by jppp View Post
    Spence, the code works! I do not have enough words to thank you. I feel on top of the world.
    I think I now have most of the things in order for me to upload the site using my webhost.
    I can now upload, delete and edit images, add and delete categories, and also have a next & previous link in my full image pages.

    I think the only thing remaining is to have a pagination script if I need to upload a large number of images running to more than one page in a single category. I remember seeing your code in some previous threads and I am ready to work on it with full vigour.

    Thank you so much once again.
    I'm glad to have been some help jppp. As for the pagination script I have done an update with that due to a bug I found, but I'll wait until you have sorted out your script first as it's too much to take in one go.

  9. #709
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    Big Thumbs Up and thanks Spence for helping Jppp all this way.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  10. #710
    SitePoint Guru
    Join Date
    Nov 2002
    Location
    Dubai
    Posts
    714
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Your encouraging words have always helped me, Mike. I have a lot of my Sitepoint friends to thank for where I am today. Sitepoint Rocks.

  11. #711
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by spikeZ View Post
    Big Thumbs Up and thanks Spence for helping Jppp all this way.
    Thank you spikez. I was at jppp's stage once and now it's nice to return the help back to others.

  12. #712
    SitePoint Guru
    Join Date
    Nov 2002
    Location
    Dubai
    Posts
    714
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I used a code which I saw in a thread posted by animal777 and made the required changes in my viewgallery.php and I think the
    navigation works the way it should.
    I am giving below the full code which I used for the thumbnail listing in viewgallery.php. I hope I have done the
    modifications in the right way.

    PHP Code:
     // Thumbnail Listing
     
    else if( $cid && empty( $pid ) )
     {
      
    $number_of_thumbs_in_row 4;
    // If current page number, use it 
      // if not, set one! 
      
    if(!isset($_GET['page'])){ 
          
    $page 1
      } else { 
          
    $page $_GET['page']; 
      } 
    // Define the number of results per page 
      
    $max_results 8
     
      
    // Figure out the limit for the query based 
      // on the current page number. 
      
    $from = (($page $max_results) - $max_results); 
      
    $result mysql_query"SELECT photo_id,photo_caption,photo_filename FROM gallery_photos WHERE 
    photo_category='"
    .addslashes($cid)."' LIMIT $from$max_results"); 
      
    $nr mysql_num_rows$result );
      if( empty( 
    $nr ) )
      {
       
    $result_final "\t<tr><td>No Category found</td></tr>\n";
      }
      else
      {
       while( 
    $row mysql_fetch_array$result ) )
       {
        
    $result_array[] = "<a href='viewgallery.php?cid=$cid&pid=".$row[0]."'><img 
    src='"
    .$images_dir."/tb_".$row[2]."' border='0' alt='".$row[1]."' /></a>";
       }
       
    mysql_free_result$result ); 
       
    $result_final "<tr>\n";
    "<a href='viewgallery.php?cid=$cid'>$category_name</a></td>\n</tr>\n";
     
       foreach(
    $result_array as $thumbnail_link)
       {
        if(
    $counter == $number_of_thumbs_in_row)
        { 
         
    $counter 1;
         
    $result_final .= "\n</tr>\n<tr>\n";
        }
        else
        
    $counter++;
        
    $result_final .= "\t<td>".$thumbnail_link."</td>\n";
     
       }
     
       if(
    $counter)
       {
        if(
    $number_of_photos_in_row-$counter)
       
    $result_final .= "\t<td colspan='".($number_of_photos_in_row-$counter)."'>&nbsp;</td>\n";
        
    $result_final .= "</tr>";
     
     
     
     
    // Figure out the total number of results in DB: 
    $total_results mysql_result(mysql_query("SELECT COUNT(*) as Num FROM gallery_photos WHERE photo_category=".addslashes
    ($cid).""),0); 
    // Figure out the total number of pages. Always round up using ceil() 
    $total_pages ceil($total_results $max_results); 
    if (
    $total_pages >1)
    {  
    // build links if more than one page
     
    // Build Page Number Hyperlinks 
    $result_final .=  "<tr><td colspan='".$number_of_thumbs_in_row."' class='tcat'>\nPages&nbsp;(".$total_pages."):&nbsp;"
     
    // Build Previous Link 
    if($page 1){ 
        
    $prev = ($page 1); 
        
    $result_final .=  "\n<a href=\"".$_SERVER['PHP_SELF']."?cid=$cid&page=$prev\" title='Previous Page'>&lt;&lt;</a>"

    for(
    $i 1$i <= $total_pages$i++){ 
        if((
    $page) == $i){ 
            
    $result_final .= "&nbsp;[$i]"
            } else { 
                
    $result_final .=  "\n<a href=\"".$_SERVER['PHP_SELF']."?cid=$cid&page=$i\" title='Page ".$i."'>$i</a>"
        } 

    // Build Next Link 
    if($page $total_pages){ 
        
    $next = ($page 1); 
        
    $result_final .=  "\n<a href=\"".$_SERVER['PHP_SELF']."?cid=$cid&page=$next\" title='Next Page'>&gt;&gt;</a>"

    $result_final .=  "\n</td></tr>"
    }
    else
    {
    $result_final .=  "\n";
    }      
     
     
       }
      }
     } 

  13. #713
    SitePoint Guru
    Join Date
    Nov 2002
    Location
    Dubai
    Posts
    714
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As for the pagination script I have done an update with that due to a bug I found,
    Was a bug found in the above script that I have shown?

  14. #714
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey _

    whats the best way to get a random image at the category listing ?
    thats how the important part looks like atm - i got a static image but theres no change for me to make it random..

    regards simon

  15. #715
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    Hi Simon and welcome to SitePoint

    Which code are you using as a model? the one from the book or the one I posted on the previous page?
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  16. #716
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks

    yeah right

  17. #717
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey none of the files are being uploaded in the db

  18. #718
    felix
    SitePoint Community Guest
    hey thanks for such an extended tutorial. only one problem... when i try to upload the images, it gives me a blank page and nothing has been uploaded into the database. There IS a connection with the database but (my) upload.php just won't do what it should do.

  19. #719
    garrt
    SitePoint Community Guest
    what about creating black thumbnails instead color thumbnails with gd? what can i do then?

  20. #720
    SitePoint Zealot
    Join Date
    Mar 2008
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice tutorial.
    I tested everything is working fine.
    I just want to know what should i do,to save only the thumbnails.
    as i dont want the Original Pictures.
    Someone to show me in the codes where should i change,coz i real dont know.
    Thankx.

  21. #721
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    jus unlink the original photos
    thats it

  22. #722
    SitePoint Zealot
    Join Date
    Mar 2008
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is the upload script,show me where i should unlink the original image.
    please help me,i`m need of this code.


    Code:
    <?php
    	include("config.inc.php");
    
    	// initialization
    	$result_final = "";
    	$counter = 0;
    
    	// List of our known photo types
    	$known_photo_types = array( 
    						'image/pjpeg' => 'jpg',
    						'image/jpeg' => 'jpg',
    						'image/gif' => 'gif',
    						'image/bmp' => 'bmp',
    						'image/x-png' => 'png'
    					);
    	
    	// GD Function List
    	$gd_function_suffix = array( 
    						'image/pjpeg' => 'JPEG',
    						'image/jpeg' => 'JPEG',
    						'image/gif' => 'GIF',
    						'image/bmp' => 'WBMP',
    						'image/x-png' => 'PNG'
    					);
    
    	// Fetch the photo array sent by preupload.php
    	$photos_uploaded = $_FILES['photo_filename'];
    
    	// Fetch the photo caption array
    	$photo_caption = $_POST['photo_caption'];
    
    	while( $counter <= count($photos_uploaded) )
    	{
    		if($photos_uploaded['size'][$counter] > 0)
    		{
    			if(!array_key_exists($photos_uploaded['type'][$counter], $known_photo_types))
    			{
    				$result_final .= "File ".($counter+1)." is not a photo<br />";
    			}
    			else
    			{
    				mysql_query( "INSERT INTO gallery_photos(`photo_filename`, `photo_caption`, `photo_category`) VALUES('0', '".addslashes($photo_caption[$counter])."', '".addslashes($_POST['category'])."')" );
    				$new_id = mysql_insert_id();
    				$filetype = $photos_uploaded['type'][$counter];
    				$extention = $known_photo_types[$filetype];
    				$filename = $new_id.".".$extention;
    
    				mysql_query( "UPDATE gallery_photos SET photo_filename='".addslashes($filename)."' WHERE photo_id='".addslashes($new_id)."'" );
    
    				// Store the orignal file
    				copy($photos_uploaded['tmp_name'][$counter], $images_dir."/".$filename);
    
    				// Let's get the Thumbnail size
    				$size = GetImageSize( $images_dir."/".$filename );
    				if($size[0] > $size[1])
    				{
    					$thumbnail_width = 400;
    					$thumbnail_height = (int)(400 * $size[1] / $size[0]);
    				}
    				else
    				{
    					$thumbnail_width = (int)(400 * $size[0] / $size[1]);
    					$thumbnail_height = 400;
    				}
    			
    				// Build Thumbnail with GD 1.x.x, you can use the other described methods too
    				$function_suffix = $gd_function_suffix[$filetype];
    				$function_to_read = "ImageCreateFrom".$function_suffix;
    				$function_to_write = "Image".$function_suffix;
    
    				// Read the source file
    				$source_handle = $function_to_read ( $images_dir."/".$filename ); 
    				
    				if($source_handle)
    				{
    					// Let's create an blank image for the thumbnail
    				     	$destination_handle = imagecreatetruecolor( $thumbnail_width, $thumbnail_height );
    				
    					// Now we resize it
    			      	ImageCopyResized( $destination_handle, $source_handle, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $size[0], $size[1] );
    				}
    
    				// Let's save the thumbnail
    				$function_to_write( $destination_handle, $images_dir."/tb_".$filename );
    				ImageDestroy($destination_handle);
    				//
    
    				$result_final .= "<img src='".$images_dir. "/tb_".$filename."' /> File ".($counter+1)." Added<br />";
    			}
    		}
    	$counter++;
    	}
    
    	// Print Result
    echo <<<__HTML_END
    
    <html>
    <head>
    	<title>Photos uploaded</title>
    </head>
    <body>
    	$result_final
    </body>
    </html>
    
    __HTML_END;
    ?>
    Last edited by mrcniceguy; Mar 16, 2009 at 15:01. Reason: ..

  23. #723
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by jppp View Post
    I used a code which I saw in a thread posted by animal777 and made the required changes in my viewgallery.php and I think the
    navigation works the way it should.
    I am giving below the full code which I used for the thumbnail listing in viewgallery.php. I hope I have done the
    modifications in the right way.

    PHP Code:
     // Thumbnail Listing
     
    else if( $cid && empty( $pid ) )
     {
      
    $number_of_thumbs_in_row 4;
    // If current page number, use it 
      // if not, set one! 
      
    if(!isset($_GET['page'])){ 
          
    $page 1
      } else { 
          
    $page $_GET['page']; 
      } 
    // Define the number of results per page 
      
    $max_results 8
     
      
    // Figure out the limit for the query based 
      // on the current page number. 
      
    $from = (($page $max_results) - $max_results); 
      
    $result mysql_query"SELECT photo_id,photo_caption,photo_filename FROM gallery_photos WHERE 
    photo_category='"
    .addslashes($cid)."' LIMIT $from$max_results"); 
      
    $nr mysql_num_rows$result );
      if( empty( 
    $nr ) )
      {
       
    $result_final "\t<tr><td>No Category found</td></tr>\n";
      }
      else
      {
       while( 
    $row mysql_fetch_array$result ) )
       {
        
    $result_array[] = "<a href='viewgallery.php?cid=$cid&pid=".$row[0]."'><img 
    src='"
    .$images_dir."/tb_".$row[2]."' border='0' alt='".$row[1]."' /></a>";
       }
       
    mysql_free_result$result ); 
       
    $result_final "<tr>\n";
    "<a href='viewgallery.php?cid=$cid'>$category_name</a></td>\n</tr>\n";
     
       foreach(
    $result_array as $thumbnail_link)
       {
        if(
    $counter == $number_of_thumbs_in_row)
        { 
         
    $counter 1;
         
    $result_final .= "\n</tr>\n<tr>\n";
        }
        else
        
    $counter++;
        
    $result_final .= "\t<td>".$thumbnail_link."</td>\n";
     
       }
     
       if(
    $counter)
       {
        if(
    $number_of_photos_in_row-$counter)
       
    $result_final .= "\t<td colspan='".($number_of_photos_in_row-$counter)."'>&nbsp;</td>\n";
        
    $result_final .= "</tr>";
     
     
     
     
    // Figure out the total number of results in DB: 
    $total_results mysql_result(mysql_query("SELECT COUNT(*) as Num FROM gallery_photos WHERE photo_category=".addslashes
    ($cid).""),0); 
    // Figure out the total number of pages. Always round up using ceil() 
    $total_pages ceil($total_results $max_results); 
    if (
    $total_pages >1)
    {  
    // build links if more than one page
     
    // Build Page Number Hyperlinks 
    $result_final .=  "<tr><td colspan='".$number_of_thumbs_in_row."' class='tcat'>\nPages&nbsp;(".$total_pages."):&nbsp;"
     
    // Build Previous Link 
    if($page 1){ 
        
    $prev = ($page 1); 
        
    $result_final .=  "\n<a href=\"".$_SERVER['PHP_SELF']."?cid=$cid&page=$prev\" title='Previous Page'>&lt;&lt;</a>"

    for(
    $i 1$i <= $total_pages$i++){ 
        if((
    $page) == $i){ 
            
    $result_final .= "&nbsp;[$i]"
            } else { 
                
    $result_final .=  "\n<a href=\"".$_SERVER['PHP_SELF']."?cid=$cid&page=$i\" title='Page ".$i."'>$i</a>"
        } 

    // Build Next Link 
    if($page $total_pages){ 
        
    $next = ($page 1); 
        
    $result_final .=  "\n<a href=\"".$_SERVER['PHP_SELF']."?cid=$cid&page=$next\" title='Next Page'>&gt;&gt;</a>"

    $result_final .=  "\n</td></tr>"
    }
    else
    {
    $result_final .=  "\n";
    }      
     
     
       }
      }
     } 
    Looks good jppp, just keep an eye on it though just incase. For example, the numbering might go all funny and not show correctly. If that does happen post a message in here.

    Sorry I've been away, I just needed to clear my head plus other commitments.

  24. #724
    Mark Bagnall
    SitePoint Community Guest
    I have downlaoded the completed script but changed it so I am uploading images to a different folder but can't get them to upload

    I changed it to say
    $images_dir = "URL/photos";

    Should this still work?

  25. #725
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Is the URL the websites address? Is the directory lower or not in the same directory as the web page?

    If the address is the same then just:

    $images_dir = "photos"; will do unless it's a directory lower/before the directory the webpage is in so then it will need to be:

    $images_dir = "../photos";


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •