The videolesson is: Build an Admin-Driven PayPal Store - YouTube.
imported everything correct. Binding ok ser/connection ok.
Malfunction: Product_detail.php
<?php require_once('../Connections/ecrtaserver.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;
}
}
?>
<?php
$colname_WADAProducts = "-1";
if (isset($_GET['ProductID'])) {
$colname_WADAProducts = $_GET['ProductID'];
}
mysql_select_db($database_ecrtaserver, $ecrtaserver);
$query_WADAProducts = sprintf("SELECT * FROM Products WHERE ProductID = %s", GetSQLValueString($colname_WADAProducts, "int"));
$WADAProducts = mysql_query($query_WADAProducts, $ecrtaserver) or die(mysql_error());
$row_WADAProducts = mysql_fetch_assoc($WADAProducts);
$totalRows_WADAProducts = mysql_num_rows($WADAProducts);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Document</title>
<script src="../webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<link href="../webassist/forms/fd_basic_default.css" rel="stylesheet" type="text/css">
<link href="../webassist/forms/dataassist_button.css" rel="stylesheet" type="text/css" />
<style>
/* Details page CSS */
form.DetailsPage {
width:565px;
}
.WADADetailsContainer {
font-size:11px;
width:555px;
}
#WADADetails, .WADANoResults {
padding-top:5px;
}
.WADADetailsLinkArea {
padding-top:2px;
padding-bottom:2px;
}
.WADADetailsImageInfoArea {
margin-top:5px;
margin-bottom:5px;
}
.WADADetailsMainImageArea {
float:left;
}
.WADADetailsMainImage {
float:left;
}
.WADADetailsProductInfo {
margin-left:255px;
height:188px;
padding-top:5px;
padding-right:5px;
padding-bottom:5px;
padding-left:5px;
}
.WADADetailsSubHeading {
font-weight:bold;
}
.WADADetailsSubText {}
.WADADetailsPriceButton {
margin-top:5px;
}
.WADADetailsPrice {
float:left;
}
.WADADetailsButton {
float:left;
margin-left:5px;
}
.WADADetailsShortDesc {
margin-top:5px;
margin-bottom:5px;
}
.WADADetailsLongDesc {
border-top-width:1px;
border-top-style:solid;
border-top-color:#BABDC2;
padding-top:5px;
margin-top:5px;
margin-bottom:5px;
}
</style>
</head>
<body>
<div id="Details_Basic_Default_ProgressWrapper">
<form class="DetailsPage Basic_Default" id="Details_Basic_Default" name="Details_Basic_Default" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
<fieldset class="Basic_Default" id="Details">
<legend class="groupHeader">Details</legend>
<div class="WADADetailsContainer">
<a name="top"></a>
<?php if ($totalRows_WADAProducts > 0) { // Show if recordset not empty ?>
<div id="WADADetails">
<div class="WADAHeader"><h1><?php echo($row_WADAProducts['ProductName']); ?></h1></div>
<div class="WADADetailsImageInfoArea">
<div class="WADADetailsMainImageArea"><img class="WADADetailsMainImage" src="<?php echo($row_WADAProducts['ProductImage']); ?>" alt="<?php echo($row_WADAProducts['ProductName']); ?>" width="180" /></div>
<div class="WADADetailsProductInfo">
<div class="WADADetailsSubHeading"><?php echo($row_WADAProducts['ProductName']); ?></div>
<div class="WADADetailsSubText"><?php echo($row_WADAProducts['ProductCartDesc']); ?></div>
<div class="WADADetailsPriceButton">
<div class="WADADetailsPrice"><?php echo($row_WADAProducts['ProductPrice']); ?></div>
<div class="WADADetailsButton"> <input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="add" value="1" />
<input type="hidden" name="bn" value="webassist.dreamweaver.4_5_0" />
<input type="hidden" name="business" value="henrik_1362340619_biz@in-one.dk" />
<input type="hidden" name="item_name" value="<?php echo $row_WADAProducts['ProductName']; ?>" />
<input type="hidden" name="item_number" value="<?php echo $row_WADAProducts['ProductID']; ?>" />
<input type="hidden" name="amount" value="<?php echo $row_WADAProducts['ProductPrice']; ?>" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="return" value="http://paypallsuccess.php" />
<input type="hidden" name="cancel_return" value="http://paypalcancel.php" />
<input type="hidden" name="receiver_email" value="henrik_1362340619_biz@in-one.dk" />
<input type="hidden" name="mrb" value="R-3WH47588B4505740X" />
<input type="hidden" name="pal" value="ANNSXSLJLYR2A" />
<input type="hidden" name="no_shipping" value="0" />
<input type="hidden" name="no_note" value="0" />
<?php echo $row_WADAProducts['ProductOption']; ?>:<input type="hidden" name="on0" value="<?php echo $row_WADAProducts['ProductOption']; ?>" />
<select name="os0">
<?php
$WA_pp_options = "".$row_WADAProducts['ProductOptionValues'] ."";
if (!is_array($WA_pp_options)) $WA_pp_options = explode(",",$WA_pp_options);
foreach ($WA_pp_options as $WA_pp_option) {
?> <option value="<?php echo($WA_pp_option); ?>"><?php echo($WA_pp_option); ?></option>
<?php } ?>
</select>
<input type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/x-click-but10.gif" border="0" alt="Make payments with PayPal - it's fast, free and secure!" />
</div>
</div>
<div class="WADAClearLeft"></div>
</div>
<div class="WADAClearLeft"></div>
</div>
<div class="WADADetailsShortDesc"><?php echo($row_WADAProducts['ProductShortDesc']); ?></div>
<div class="WADADetailsLongDesc"><?php echo($row_WADAProducts['ProductLongDesc']); ?></div>
</div>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_WADAProducts == 0) { // Show if recordset empty ?>
<div class="WADANoResults">
<div class="WADANoResultsMessage">This product has been removed.</div>
</div>
<?php } // Show if recordset empty ?>
</div>
<span class="buttonFieldGroup" >
<div class="WADADetailsLinkArea">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<?php if ($totalRows_WADAProducts > 0) { // Show if recordset not empty ?>
<?php } // Show if recordset not empty ?>
<td><input type="button" value="Back To Results" class="formButton" id="BackToResults" name="BackToResults" onclick="document.location.href = 'products_results.php<?php echo(isset($_GET["pageNum_WADAProducts"])?"?pageNum_WADAProducts=".intval($_GET["pageNum_WADAProducts"]):""); ?>';" /></td>
</tr>
</table>
</div></span>
</fieldset>
</form></div><div id="Details_Basic_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('Details_Basic_Default', 'Details_Basic_Default_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:Slate']);
</script>
<div id="Details_Basic_Default_ProgressMessage" >
<p style="margin:10px; padding:5px;" ><img src="../webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" /> Please wait</p>
</div>
</div>
</body>
</html>
<?php
mysql_free_result($WADAProducts);
?>