Új hozzászólás Aktív témák
-
abteam2008
tag
válasz
Sk8erPeter #6482 üzenetére
Már valamennyit haladtam. Először is van egy xbox_games.php-m:
<?php require_once('Connections/consolegames.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}mysql_select_db($database_consolegames, $consolegames);
$query_xboxgames = "SELECT gameId, gameTitle, gameGraphic, gameDesc FROM xbox ORDER BY gameTitle ASC";
$xboxgames = mysql_query($query_xboxgames, $consolegames) or die(mysql_error());
$row_xboxgames = mysql_fetch_assoc($xboxgames);
$totalRows_xboxgames = mysql_num_rows($xboxgames);
?>Body tagben pedig:
<?php do { ?>
<a href="xbox_games_details.php?id=<?php echo $row_xboxgames['gameId']; ?>" target= "_BLANK"> <img src="_images/<?php echo $row_xboxgames['gameGraphic']; ?>" width="195" height="262" />
<?php } while ($row_xboxgames = mysql_fetch_assoc($xboxgames)); ?>Ezzel kilistázza a játékborítókat, amelyekre kattintani is lehet (egy ilyen link jön létre kattintásra: http://localhost/consolegames/xbox_games_details.php?id=2)
Na most már "csak" az xbox_games_details.php-hoz kérnék segítséget. Úgy gondolom, hogy ezzel kellene bekérni az id-t:
<?PHP
$id = $_GET['id'];Tehát bekérném a gameId-ből az id-t, és az id alapján írná ki az oldalra a játék címét (gameTitle), borítóját (gameGraphic) és rövid leírását (gameDesc).
Eddig jutottam magamtól, innentől nem tudom tovább..
Új hozzászólás Aktív témák
- Házi barkács, gányolás, tákolás, megdöbbentő gépek!
- TCL LCD és LED TV-k
- iPhone topik
- Honor Magic7 Pro - kifinomult, költséges képalkotás
- Kettő együtt: Radeon RX 9070 és 9070 XT tesztje
- Philips LCD és LED TV-k
- sziku69: Fűzzük össze a szavakat :)
- Drón topik
- BestBuy topik
- Kerékpárosok, bringások ide!
- További aktív témák...
- Részletre elviheted akár 365 napra Bankmentes , azonnal elérhető Dell GAMER laptop G15 5530 360Hz
- Apple iPhone SE 2020, Kártyafüggetlen, 1 Év Garanciával
- GYÖNYÖRŰ iPhone 14 Pro Max 128GB Space Black -1 ÉV GARANCIA - Kártyafüggetlen, MS2998, 100% Akksi
- Telefon felvásárlás!! iPhone 16/iPhone 16 Plus/iPhone 16 Pro/iPhone 16 Pro Max
- LG 48B4 - 48" OLED - 4K 120Hz 1ms - NVIDIA G-Sync - FreeSync Premium - HDMI 2.1 - PS5 és Xbox Ready
Állásajánlatok
Cég: CAMERA-PRO Hungary Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest