Whitter Posted April 26, 2015 Share Posted April 26, 2015 (edited) When you press the `Submit` do not display my signature image.Image: http://i.imgur.com/tSuKsF0.png?1The `signature.php` is the problem. index.html works perfectly. signature.php: <? /* Credits - Nordoz - Original Script - pds2k12 - Editing & fixing the script. */ $username = "UserName"; //Your MySQL Username. $password = "Password"; // Your MySQL Pass. $database = "DataBase Name"; // Your MySQL database. $host = "Host Name"; // Your MySQL host. $player_name = $_GET[ 'player_name' ]; mysql_connect($host, $username, $password); // Connection to the database. on this line @mysql_select_db($database) or die("ERROR: Sorry, We can't connect on your database, please re check if you entered the right information."); /* To protect MySQL injection. */ $player_name = stripslashes($player_name); $player_name = mysql_real_escape_string($player_name); $query = "SELECT * FROM `players` WHERE user = '$player_name'"; $result = mysql_query( $query ); $i = mysql_num_rows( $result ); if ($i == 1) { // Creating of the .png image. header('Content-Type: image/png;'); $im = @imagecreatefrompng('signature.png') or die("ERROR: Cannot select the correct image. Please contact the webmaster."); //Creating the colour. $text_color = imagecolorallocate($im, 0, 0, 0);//color black //Creating the font.s $font = 'font.ttf'; $GetPlayerName = mysql_result($result, 0, "user"); // Gets the username of the player and put it in the variable $Playername. $GetPlayerMoney = mysql_result($result, 0, "Money"); // Gets the money of the player and put it in the variable $Money. $GetPlayerScore = mysql_result($result, 0, "Score"); // Gets the score of the player and put it in the variable $Score. $print_username = "Username: $GetPlayerName"; $print_score = "Score: $GetPlayerMoney"; $print_money = "Money: $GetPlayerScore"; imagettftext($im, 9, 0, 20, 30, $text_color, $font, $print_username); //Prints the username of the specific player. imagettftext($im, 9, 0, 20, 40, $text_color, $font, $print_score); //Prints the money of the specific player. imagettftext($im, 9, 0, 20, 50, $text_color, $font, $print_money); //Prints the score of the specific player. imagepng($im); imagedestroy($im); } else echo('ERROR: Sorry, We can not find your account in our database.'); mysql_close(); ?> Edited April 26, 2015 by Whitter Quote Link to comment https://forums.phpfreaks.com/topic/295879-signaturephp-problem/ Share on other sites More sharing options...
ginerjm Posted April 26, 2015 Share Posted April 26, 2015 Uhhh - What exactly is 'the' problem? Quote Link to comment https://forums.phpfreaks.com/topic/295879-signaturephp-problem/#findComment-1509990 Share on other sites More sharing options...
Solution Ch0cu3r Posted April 26, 2015 Solution Share Posted April 26, 2015 Try using full php tags <?php ?> and not short tags <? ?> Also either check your severs error logs or enable error reporting. Quote Link to comment https://forums.phpfreaks.com/topic/295879-signaturephp-problem/#findComment-1509992 Share on other sites More sharing options...
Whitter Posted April 26, 2015 Author Share Posted April 26, 2015 (edited) When I click on the "Submit" not in my signature displays showing "name, score your money." When I click on the "Submit" page becomes white. (http://i.imgur.com/tSuKsF0.png?1) How to enable error reporting? Edited April 26, 2015 by Whitter Quote Link to comment https://forums.phpfreaks.com/topic/295879-signaturephp-problem/#findComment-1509993 Share on other sites More sharing options...
ginerjm Posted April 26, 2015 Share Posted April 26, 2015 Sorry - your English is not very clear. "when I click on submit not in my signature" - what does that mean? If you read my last post you would have noticed my signature - that is how to turn on error reporting. Quote Link to comment https://forums.phpfreaks.com/topic/295879-signaturephp-problem/#findComment-1509994 Share on other sites More sharing options...
Whitter Posted April 26, 2015 Author Share Posted April 26, 2015 When you click "Submit" do not display my signature codes. It makes white image. Click on this link and select "Userbar". So I have to myself, that image and code sites but when I click, the image is white. http://bluepanel.bugged.ro/profile/Tibi Quote Link to comment https://forums.phpfreaks.com/topic/295879-signaturephp-problem/#findComment-1509997 Share on other sites More sharing options...
ginerjm Posted April 26, 2015 Share Posted April 26, 2015 Sorry - no idea what you are talking about. Quote Link to comment https://forums.phpfreaks.com/topic/295879-signaturephp-problem/#findComment-1510012 Share on other sites More sharing options...
Whitter Posted April 26, 2015 Author Share Posted April 26, 2015 Try using full php tags <?php ?> and not short tags <? ?> Also either check your severs error logs or enable error reporting. Thank you!!! Quote Link to comment https://forums.phpfreaks.com/topic/295879-signaturephp-problem/#findComment-1510018 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.