Reply to RE: [PHP] Database problem?

Your name:

Reply:


Posted by Jay Blanchard on 11/28/05 20:42

[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'] ";

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация