0

Hey, i'm new to PHP coding and my knowledge of php is increasing. I have a problem though.

Im currently making a flash game site and I want to make urls like "Domain.com/Play.php?gid=34823"

And when guests or users are on that page (with ID "34823"), I want it to show some information about that certain game info with that certain ID. How do I do that?

My play.php code(its not done yet!)

<?php
require_once('global_setting.php');
require('mysql.php')
mysql_select_db("my_db", $con)

// Define the information of that game
$gametitle = ???
$gamedescription = ???
$gamerating = ???
$gamereview = ???
$gameid = ???
?>
4
Contributors
8
Replies
9
Views
7 Years
Discussion Span
Last Post by Will Gresham
0
<?php
require_once('global_setting.php');
require('mysql.php')
mysql_select_db("my_db", $con)

// Define the information of that game
$gametitle = $_GET['gametitle'];
$gamedescription = $_GET['gamedescription'];
$gamerating = $_GET['gamerating '];
$gamereview = $_GET['gamereview'];
$gameid = $_GET['gameid'];
?>

what that is is when you subbmit a form with the GET option it does that so that you can get the data from the url

0

The problem is that the script is not picking up a certain from that ID. When I go to "domain.com/ViewGame?gid=34283", it doesn't pick up the gaming info from that ID in the mySQL.

Help anyone?

<?php
require('mysql.php');
mysql_select_db("ruko_fp", $con);

// Define the variables
$gid = $_GET['gid'];
$gametitle = $_GET['gametitle'];
$gamedescription = $_GET['gamedescription'];
$gamerating = $_GET['gamerating'];
$gamereview = $_GET['gamereview'];
$gameid = $_GET['gid'];
?>

TEST:

<h3><? $gametitle ?></h3>

Heres what is displayed on a certain ID:

TEST:

<game title supposed to be here>

Edited by Ruko: n/a

0

The problem is that the script is not picking up a certain from that ID. When I go to "domain.com/ViewGame?gid=34283", it doesn't pick up the gaming info from that ID in the mySQL.

Help anyone?

<?php
require('mysql.php');
mysql_select_db("ruko_fp", $con);

// Define the variables
$gid = $_GET['gid'];
$gametitle = $_GET['gametitle'];
$gamedescription = $_GET['gamedescription'];
$gamerating = $_GET['gamerating'];
$gamereview = $_GET['gamereview'];
$gameid = $_GET['gid'];
?>

TEST:

<h3><? $gametitle ?></h3>

Heres what is displayed on a certain ID:

TEST:

<game title supposed to be here>

put like this
<?=$gametitle;?>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.