我被困在试图使下面的代码工作它似乎我的语法中的某些东西没有正确声明我试图更改变量的名称但仍然不起作用,我的数据库中有一个名为包的表,关于错误可能是什么的任何想法?请 :( :
<?PHP
include('connection.php');
include('validation.php');
include('header.php');
$PID = $_GET['PID'];
$q_getpackage = "SELECT * FROM packages WHERE PID=$PID";
$r_getpackage = mysql_query($q_getpackage,$connection);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="styles.css" type="text/css" rel="stylesheet"/>
<link href='http://fonts.googleapis.com/css?family=Courgette' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Numans' rel='stylesheet' type='text/css'>
<title>Products Information</title>
</head>
<body>
<div class="packages_wraper"><!--Packages Wraper-->
<div class="package_name"><?php echo mysql_result($r_getpackage,0,'name');?></h3>
<div class="details"><?php echo mysql_result($r_getpackage,0,'details');?</div>
<div><?php echo mysql_result($r_getpackage,0,'guide');?> </div>
<div><?php echo mysql_result($r_getpackage,0,'review');?> </div>
<div class="pic"><img src="<?php echo mysql_result($r_getpackage,0,'pic_url');?>"/></div>
</div><!--END Packages Wraper-->
</div>
</body>
</html>
我有一个错误说:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/tk1/domains/valbet.tk/public_html/product_info.php on line 33
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/tk1/domains/valbet.tk/public_html/product_info.php on line 34
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/tk1/domains/valbet.tk/public_html/product_info.php on line 35
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/tk1/domains/valbet.tk/public_html/product_info.php on line 36