Gunnar J Posted April 12, 2008 Share Posted April 12, 2008 <?phpif ($_POST['pokemon'] == "articuno" && $_POST['color'] == "red") { open_image ('http://i220.photobucket.com/albums/dd10/gunnar5397/Red-Articuno.png'); echo "http://i220.photobucket.com/albums/dd10/gunnar5397/Red-Articuno.png"; echo " If you would like to support this shop link this image to [url="http://pokeplanet.exofire.net/onestoppokeshop.html""]http://pokeplanet.exofire.net/onestoppokeshop.html"[/url] ; }else { echo "You may only shoose one option ( e.g. Recolor or Fusion ); }?> Parse error: syntax error, unexpected $end in /home/sproder/public_html/osps.php on line 13 Link to comment Share on other sites More sharing options...
boen_robot Posted April 12, 2008 Share Posted April 12, 2008 Could you please show THE WHOLE file? In particular, the part that contains "$end" in it. This is obviosly not all of osps.php. I mean, there aren't even 13 lines to begin with. There are only 12.edit: Hmm... I might have missed a line there Link to comment Share on other sites More sharing options...
jeffman Posted April 12, 2008 Share Posted April 12, 2008 echo "You may only shoose one option ( e.g. Recolor or Fusion );No end quote in this echo.EDIT: Boen, there are exactly 13 lines, so it's in the final line that the interpreter freaks at the unterminated string. Link to comment Share on other sites More sharing options...
Ingolme Posted April 12, 2008 Share Posted April 12, 2008 The problem is on this line:echo "You may only shoose one option ( e.g. Recolor or Fusion );You've forgotten a double quote Link to comment Share on other sites More sharing options...
Gunnar J Posted April 12, 2008 Author Share Posted April 12, 2008 Well now I haveFatal error: Call to undefined function open_image() in /home/sproder/public_html/osps.php on line 4whats wrong with that? Link to comment Share on other sites More sharing options...
jeffman Posted April 12, 2008 Share Posted April 12, 2008 Yup, that's undefined, all right. I cannot find it in the manual. If you have GD built in, you might try imagecreatefrompng(), and then imagepng() if you want to display it. Link to comment Share on other sites More sharing options...
Gunnar J Posted April 12, 2008 Author Share Posted April 12, 2008 <?phpif ($_POST['pokemon'] == "articuno" && $_POST['color'] == "red") { ?><img src="http://i220.photobucket.com/albums/dd10/gunnar5397/Red-Articuno.png"><br><?php echo "http://i220.photobucket.com/albums/dd10/gunnar5397/Red-Articuno.png";?><br><?php echo " If you would like to support this shop link this image to [url="http://pokeplanet.exofire.net/onestoppokeshop.html""]http://pokeplanet.exofire.net/onestoppokeshop.html"[/url] ; }ifelse ($_POST['body'] == "tentacool" && $_POST['colors'] == "caterpie") ?><img src="http://i220.photobucket.com/albums/dd10/gunnar5397/dpmfa072.png"><br><?php { echo "http://i220.photobucket.com/albums/dd10/gunnar5397/dpmfa072.png"; echo "If you would like to support this shop, link the image above to [url="http://pokeplanet.exofire.net/onestoppokeshop.html;"]http://pokeplanet.exofire.net/onestoppokeshop.html;[/url] }else { echo "You may only shoose one option ( e.g. Recolor or Fusion )"; }?> Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/sproder/public_html/osps.php on line 23I dont really see whats wrong with line 23, can someone help me? Link to comment Share on other sites More sharing options...
boen_robot Posted April 12, 2008 Share Posted April 12, 2008 You know. You should really get a good editor... pretty much anyone with a syntax highlighting. It will save you the trouble with simple things like this.You're again missing a quote: echo "If you would like to support this shop, link the image above to http://pokeplanet.exofire.net/onestoppokeshop.html"; <?phpif ($_POST['pokemon'] == "articuno" && $_POST['color'] == "red") { ?><img src="http://i220.photobucket.com/albums/dd10/gunnar5397/Red-Articuno.png"><br><?php echo "http://i220.photobucket.com/albums/dd10/gunnar5397/Red-Articuno.png";?><br><?php echo " If you would like to support this shop link this image to [url="http://pokeplanet.exofire.net/onestoppokeshop.html""]http://pokeplanet.exofire.net/onestoppokeshop.html"[/url] ; }ifelse ($_POST['body'] == "tentacool" && $_POST['colors'] == "caterpie") ?><img src="http://i220.photobucket.com/albums/dd10/gunnar5397/dpmfa072.png"><br><?php { echo "http://i220.photobucket.com/albums/dd10/gunnar5397/dpmfa072.png"; echo "If you would like to support this shop, link the image above to [url="http://pokeplanet.exofire.net/onestoppokeshop.html;"]http://pokeplanet.exofire.net/onestoppokeshop.html;[/url] }else { echo "You may only shoose one option ( e.g. Recolor or Fusion )"; }?> Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/sproder/public_html/osps.php on line 23I dont really see whats wrong with line 23, can someone help me? Link to comment Share on other sites More sharing options...
jeffman Posted April 12, 2008 Share Posted April 12, 2008 Changing the ifelse to elseif would help a lot too. I'm surprised you didn't get an error at that. Link to comment Share on other sites More sharing options...
jeffman Posted April 12, 2008 Share Posted April 12, 2008 This still has more php clauses than you really need, but it seems to work. Your code also had a misplaced curly brace <?php if ($_POST['pokemon'] == "articuno" && $_POST['color'] == "red") { ?> <img src="http://i220.photobucket.com/albums/dd10/gunnar5397/Red-Articuno.png"><br> <?php echo "http://i220.photobucket.com/albums/dd10/gunnar5397/Red-Articuno.png"; ?> <br> <?php echo " If you would like to support this shop link this image to http://pokeplanet.exofire.net/onestoppokeshop.html"; } elseif ($_POST['body'] == "tentacool" && $_POST['colors'] == "caterpie") { ?> <img src="http://i220.photobucket.com/albums/dd10/gunnar5397/dpmfa072.png"><br> <?php echo "http://i220.photobucket.com/albums/dd10/gunnar5397/dpmfa072.png"; echo "If you would like to support this shop, link the image above to http://pokeplanet.exofire.net/onestoppokeshop.html"; }else{ echo "You may only shoose one option ( e.g. Recolor or Fusion )"; } ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.