Jump to content

quick question


the-botman

Recommended Posts

Hey Guys ...

 

need help again hehe

whats wrong with this statment

$im = imagecreatefrompng("'. $_SESSION['image'] .'.png");

or is this one right

$image = $_SESSION['image'].jpg;
$im = imagecreatefrompng("$image");

i just cant get this part right , this is how i save the session

  $_SESSION['image'] = $_GET['image'];

Link to comment
https://forums.phpfreaks.com/topic/183899-quick-question/
Share on other sites

I would personally use the second if you are debugging why it's not working correctly (if it isn't) since you just need to echo $image. Note that if you are making a string of just a variable you don't need the double quotes, ie

$im = imagecreatefrompng("$image");

should be

$im = imagecreatefrompng($image);

Link to comment
https://forums.phpfreaks.com/topic/183899-quick-question/#findComment-970797
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.