RE: [PHP] Database problem?
| From: | Jay Blanchard | Date: | Mon, 28 Nov 2005 18:42:24 +0000 |
| Subject: | RE: [PHP] Database problem? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-226555@lists.php.net to get a copy of this message | ||
[snip]
http://localhost/index.php?team=F10a
I have this in my page and it doesn't work:
$sql = "select jouk_nimi from x_jun_jouk where jouk_id='$team' ";
$kysely = mysql_query($sql);
$tulos = mysql_fetch_row($kysely);
$jouk_nimi = $tulos[0];
$jouk_nimi -variable will be empty.
This works (replaced the $team with static entry "F10a")
$sql = "select jouk_nimi from x_jun_jouk where jouk_id='F10a' ";
$kysely = mysql_query($sql);
$tulos = mysql_fetch_row($kysely);
$jouk_nimi = $tulos[0];
$jouk_nimi get's right value from database.
[/snip]
register_globals is 'on' on the other server. Try
$sql = "select jouk_nimi from x_jun_jouk where jouk_id=$_GET['team'] ";