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 9206123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:06:33+00:00 2026-06-18T00:06:33+00:00

I currently have a imagecreatefrompng function and it works, but when I use an

  • 0

I currently have a imagecreatefrompng function and it works, but when I use an IF statement on it, then it doesn’t work and shows it cannot load image… here is what I have:

$design = $_GET["design"];

if ($design == "DESIGN_1") { $image = imagecreatefrompng('designs/hill.png'); }
if ($design == "DESIGN_2") { $image = imagecreatefrompng('designs/hill2.png'); }


In the header I have:

http://www.website.com/create.png?design=DESIGN_1

it displays the HILL.PNG



But when I have this following in header:

http://www.website.com/create.png?design=DESIGN_2

it doesn’t display HILL2.PNG but shows the image not found symbol.



PS. Both images are in the designs folder.

  • 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-18T00:06:35+00:00Added an answer on June 18, 2026 at 12:06 am

    Can you view the second .png in a browser if you navigate to it? Could it be a malformed image file? Since the code appears to be fine, and it’s actually trying to display an image… I have to think that there’s a problem with the image itself.

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

Sidebar

Related Questions

I currently have a script ready that resizes a whole image with GD but
Currently have a DataTable, but wish to stream it to the user via a
Currently have a form with a ListView. Users of role A get an image
I have a .php file that's supposed to load an image for display in
Currently have : LOAD DATA LOCAL INFILE '/Users/RkG/Desktop/Microblogs.csv' INTO TABLE blogs This is an
I currently have a sql statement that outputs data into an excel document. However,
I currently have an image upload input that only accepts PNG, JPG/JPEG, GIF images.
We have some fairly old code which uploads, resizes and then saves an image
I have written a script image.php that is quite long, but I've just copied
I currently have the following script: http://jsfiddle.net/oshirowanen/mnXdv/ Which works fine, i.e. if a click

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.