*

Recent

Author Topic: Games Uploading but can't be played  (Read 5654 times)

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Games Uploading but can't be played
« on: December 14, 2011, 02:30:56 PM »
Hey guys

When I put games in my website through the 'Enabled Code' it shows that the game has been uploaded. I Activate the game. But when i go to play, it shows nothing and I can't play it. Anyone has any idea whats wrong with it?

Azed

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Games Uploading but can't be played
« Reply #1 on: December 15, 2011, 03:35:46 PM »
All games using enabled code don't work? or just one?
Could I have a link to one of these games?
Thanks

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Games Uploading but can't be played
« Reply #2 on: December 16, 2011, 06:23:32 PM »
Well all games I put in through Enabled Code don't work. Just added this game and activated it http://www.loosegame.com/index.php?action=play&ID=8057 - It doesn't work

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Games Uploading but can't be played
« Reply #3 on: December 16, 2011, 09:24:29 PM »
oh, right.. you'll need to edit addgames.php and any $_POST you see wrap it with mysql_real_escape_string(); instead of clean();

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Games Uploading but can't be played
« Reply #4 on: December 17, 2011, 07:57:01 AM »
Okay i changed all the Clean(); to mysql_real_escape_string that was in Addgame.php like this below:

Code: [Select]
$category = mysql_real_escape_string($_POST['category']);
$tags = mysql_real_escape_string($_POST['tags']);
$highscoreable = mysql_real_escape_string($_POST['highscoreable']);
$gameadder = mysql_real_escape_string($usrdata['userid']);

However now when i go to play the game, the game area shows my 'Page cannot be found' page instead of playing the game. http://www.loosegame.com/index.php?action=play&ID=8058

Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Games Uploading but can't be played
« Reply #5 on: December 21, 2011, 05:26:06 PM »
You can't slash out the quotes..
Just make it like this:

Code: [Select]
<iframe src="http://www.miniclip.com/games/alien-attack/en/webgame.php" frameborder="0" style="border:none;" width="544" height="391" scrolling="no"></iframe>

if you automatically makes slash marks then use stripslashes() around the game code var inside play.php

Azedbutt

  • Newbie
  • *
  • Posts: 38
  • Force: +0/-0
    • Loose Game
Re: Games Uploading but can't be played
« Reply #6 on: December 22, 2011, 01:19:48 PM »
You can't slash out the quotes..
Just make it like this:

Code: [Select]
<iframe src="http://www.miniclip.com/games/alien-attack/en/webgame.php" frameborder="0" style="border:none;" width="544" height="391" scrolling="no"></iframe>

if you automatically makes slash marks then use stripslashes() around the game code var inside play.php

Thanks - Working now.


Adam LaCombe

  • Sr. Member
  • ****
  • Posts: 433
  • Force: +17/-0
    • My Blog
Re: Games Uploading but can't be played
« Reply #7 on: December 23, 2011, 02:47:07 AM »
no problem  :)