Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7800969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:48:22+00:00 2026-06-02T00:48:22+00:00

Ok I have seen many posts on this script. Which can be found….. http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/

  • 0

Ok I have seen many posts on this script. Which can be found…..

http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/

However I still can not make it work with what I have got. So here is the problem. First of all I upload the image and save the name to the database. I then pass its ID to the next page to retrieve the image and its path from the database. This is where the script comes in. I then run the image through the script and send you to the success page.

Now the image is not being resized! The code is not erroring (even with error reporting on). It would seem the code it just get ignored completely. The image is still there and displays how it was uploaded but the size just hasnt changed. Im asuming Im using it in the correct way. Here is the code after the image has been uploaded.

$Fetchq = mysql_query("SELECT * FROM images WHERE imageID ='".$_GET['image']."' ") or die('error stuff here');
$fetched = mysql_fetch_array($Fetchq);


$path = "/members/images/members/merseyside/{$fetched['imagename']}";


include('SimpleImage.php');
$image = new SimpleImage();
$image->load('$path');
$image->resize(60,60);   
$image->save('$path');



 $url = "/activity-photos.php?uploaded=true";        
header("Location: $url"); 

Any help would be greatly appreciated as I’ve had enough of banging my head against this code wall

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:48:23+00:00Added an answer on June 2, 2026 at 12:48 am

    $image->save('$path');

    If you use a variable inside single quotes, it treats it as an actual string not the variable value.

    Solution:

    $image->save( $path ); // Remove the quotes

    or

    $image->save( "$path" ); // Replace with double quotes

    EDIT:

    Also, be sure to change $image->load() as well

    ...
    $image = new SimpleImage();
    $image->load( $path ); // Removed quotes
    $image->resize(60,60);   
    $image->save( $path ); // Removed quotes
    ...
    

    You can learn more about string interpolation here:

    http://php.net/manual/en/language.types.string.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen many posts on this subject, but none have been answered, and
I have seen many php scripts in which you can cascade class method to
I have seen many posts about this problem but didn't get an answer. I
I have seen al most all the other posts about this, but I can't
I have seen many posts to this problem but no prescribed solution worked for
I have seen many posting this issue in SO. I have gone through those
I have seen many answers for this type of question but its not related
I have seen many articles about POCO. What is this?
I've seen many posts about the Google Geocoding API, described here: http://code.google.com/apis/maps/documentation/geocoding/ but none
I have seen many posts about using ActivityGroups for when you have nested activities

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.