- Impact
- 20
EDIT: Problem number 1,2 and 4 are solved.
I thank alegend for number 1 and dgaussin for number 4. Number 2 I just now managed to solve myself. I am heading for number 3 right now, if I don't make it dgaussin will help me.
NEW EDIT: Number 3 is now also finished thanks to dgaussin. The thread is closed.
Hi,
I am very new in PHP/MySQL and I am starting to learn with the means of trial and error
I have bought one of these arcade sites about two weeks ago that was for sale here and have improved the site since then (ArcadeShack.com).
I solved many things myself but now I have 4 problems or improvements I want to make.
For anyone helping me to solve problem #1 I will give 10NP$ and problem #2 23NP$. For problem #3 and #4 I will give a non-reciprocal recommended link for one month on the site.
To explain a little bit, the site is using GameScript (hope somone is familiar with it) and for mine non-PHP-technical understanding I can say that the script is using a system file in which everything is defined and then a template file that calls some code depending on the action of the visitor.
Now to the problems:
Problem #1:
When clicked to play a game the category name and then the game name is supposed to be viewed but the category name is only "Other Games" on all the games.
This is the from the system file:
I noticed that this line from the above code always gets executed as if I change 'Other Games' I will see the change on all the games.
Problem #2:
I want to add the following line in the template file:
Then I have to create the "gHscorepoints", "gHscoreURL" "gHscorename" to the MySQL database but I don't know how to do that. And if I get it into the MySQL database would it work or do I have to add something to the above code from the system file? If I could know the PHP needed for a form like an highscoreadminform that feeds the data to the MySQL you get a link as well to the site.
Problem #3:
I have currently the following URLs for my games:
http://www.arcadeshack.com/index.php?act=play&id=324
What are the exact code lines needed in the .htaccess or in some httpd.conf to change the URLs to:
http://www.arcadeshack.com/play/heli-attack-3.html
Is it possible? If yes, please make it simple for me.
Problem #4:
To have the game name of the URL of that game I tried the following:
<title>Arcade Shack - Free Online Flash Games & Movies! <?php echo $game['gName'] ?></title>
But it didn't work. Is it possible? And in that case what are the correct way to do it?
Thank you so much for the help on this and if you want more exchange for the help I can see what I can do.
I thank alegend for number 1 and dgaussin for number 4. Number 2 I just now managed to solve myself. I am heading for number 3 right now, if I don't make it dgaussin will help me.
NEW EDIT: Number 3 is now also finished thanks to dgaussin. The thread is closed.
Hi,
I am very new in PHP/MySQL and I am starting to learn with the means of trial and error
I have bought one of these arcade sites about two weeks ago that was for sale here and have improved the site since then (ArcadeShack.com).
I solved many things myself but now I have 4 problems or improvements I want to make.
For anyone helping me to solve problem #1 I will give 10NP$ and problem #2 23NP$. For problem #3 and #4 I will give a non-reciprocal recommended link for one month on the site.
To explain a little bit, the site is using GameScript (hope somone is familiar with it) and for mine non-PHP-technical understanding I can say that the script is using a system file in which everything is defined and then a template file that calls some code depending on the action of the visitor.
Now to the problems:
Problem #1:
When clicked to play a game the category name and then the game name is supposed to be viewed but the category name is only "Other Games" on all the games.
This is the from the system file:
PHP:
function loadPlay($gid,$cId){
if($cId == 0){
$load = "SELECT g.gId,g.gSwfFile,g.gName,g.gInCategory,g.gDescription,g.gWidth,g.gHeight FROM
games as g WHERE g.gId='".$gid."'";
} else {
$load = "SELECT g.gId,g.gSwfFile,g.gName,g.gInCategory,g.gDescription,g.gWidth,g.gHeight,c.cName FROM
games as g, categories as c WHERE g.gId='".$gid."' AND g.gInCategory = c.cId";
}
if($data = @mysql_query($load)){
$data = @mysql_fetch_assoc($data);
if($cId == 0){
$data['cName'] = 'Other Games';
}
return $data;
} else {
return false;
}
}
I noticed that this line from the above code always gets executed as if I change 'Other Games' I will see the change on all the games.
PHP:
if($cId == 0){
$data['cName'] = 'Other Games';
I want to add the following line in the template file:
PHP:
<strong>Highscore: </strong> The highscore for {$game[\'gName\']} is {$game[\'gHscorepoints\']} by <A HREF=\"{$game[\'gHscoreURL\']}\">{$game[\'gHscorename\']}</A><br /><br />
Problem #3:
I have currently the following URLs for my games:
http://www.arcadeshack.com/index.php?act=play&id=324
What are the exact code lines needed in the .htaccess or in some httpd.conf to change the URLs to:
http://www.arcadeshack.com/play/heli-attack-3.html
Is it possible? If yes, please make it simple for me.
Problem #4:
To have the game name of the URL of that game I tried the following:
<title>Arcade Shack - Free Online Flash Games & Movies! <?php echo $game['gName'] ?></title>
But it didn't work. Is it possible? And in that case what are the correct way to do it?
Thank you so much for the help on this and if you want more exchange for the help I can see what I can do.
Last edited:




