Jump to content
Killersites Forums

Having Trouble Rendering Out My Product Id


Recommended Posts

index.php

first of all with this page been over four times my head hurts!

 

<?php

//error reporting

error_reporting(E_ALL);

ini_set('display_errors', '1');

?>

 

<?php

//run a select query to get my latest six items

//Connect to the MySQL database if they do have a session variable set yp you do not exit the script you allow the script to keep running

include "storescripts/connect_to_mysql.php"; // include the database connection file so you link to your database

$dynamicList = "";

$sql = mysql_query("SELECT * FROM products Order By date_added Desc LIMIT 6");

$productCount = mysql_num_rows($sql);//count the the output ammount

if ($productCount > 0){

while($row = mysql_fetch_array($sql)){

$id = $row["id"];

$price = $row["price"];

$details = $row["details"];

$product_name = $row["product_name"];

$date_added = strftime("%b %d, %Y", strtotime($row["date_added"])); // Notice here how we changed it from _added to _Added

$dynamicList .= ' <table align="center" width="98%" cellpadding="2">

<tr>

<td width="30%" valign="top"><a href="product.php?id=' . $id . '"><img style="border:#666 2px solid" src="inventory_images/' . $id . '.jpg" alt="$product_name" width="41" height="43" border="1"></a></td>

<td width="70%" valign="top">'. $product_name . '<br>

$' . $price . '<br>

 

<a href="product.php?id=' . $id . '">View Product Details</a><br> <br></td>

</tr>

</table>';//--"<h4>Product id =$id</h4> - <h6>The name of the Product is: <br> $product_name</h6>- <h6>The price of this product is: <br><b>* £$price *</h6>  <h6>The product details are as follows: $details</h6>-  <h6>The date this product was added to the system is :<br> $date_added</h6>     <a href='inventory_edit.php? pid=$id'>edit</a> •  •<a href='inventory_list.php?deleteid=$id'>  delete</a><br/>";//

}

}else{

$dynamicList = "We have no products listed in Our store Yet";

 

}

 

mysql_close();

 

?>

<!DOCTYPE HTML>

<html>

<head>

<meta charset="utf-8">

<title>Untitled Document</title>

<link href="my_carousel/includes/shop.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="my_carousel/includes/jquery-1.7.2 (2).js"></script>

 

<script type="text/javascript" src="my_carousel/includes/jquery.roundabout.min.js"></script>

<script type="text/javascript" src="my_carousel/includes/carousel.js"></script><!--[if lt IE 9]>

<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>'>http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

<![endif]-->

<script type="text/javascript">

function MM_swapImgRestore() { //v3.0

var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;

}

function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

 

function MM_findObj(n, d) { //v4.01

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

if(!x && d.getElementById) x=d.getElementById(n); return x;

}

 

function MM_swapImage() { //v3.0

var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

</script>

</head>

 

<body onLoad="MM_preloadImages('style/home-reg.png','style/web-designred2a-final.png','style/web-development-final.png','style/e-coomerceneworange.png','style/pricingtNew-final.png')">

<div id="mainWrapper">

<div class="mainWrapper">

 

<header><div><table align="right" style="margin-right:16px" width="72%" cellpadding="1">

<tr>

<td width="16%" height="41"><a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Index/Home page ','','style/home-reg.png',1)"><img src="style/home-grey-final.png" alt="Web Design, Graphic Design, Logo Design, Web development, E-Commerce, scripting, Apps, Portia Solutions we will design the exact website for your business" name="Index/Home page " width="79" height="29" border="0"></a></td>

<td width="15%"><a href="web-design.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Web Design','','style/web-designred2a-final.png',1)"><img src="style/web-designnew2.png" alt="Web Design here at portia solutions, we will give you exactly what you want to sell your business" name="Web Design" width="79" height="29" border="0"></a></td>

<td width="15%"><a href="web-development.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Web Development','','style/web-development-final.png',1)"><img src="style/web-development-green.png" alt="Portia solutions Web Development, web design, branding, advertising packages" name="Web Development" width="79" height="29" border="0"></a></td>

<td width="15%"><a href="e-commerce.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-Commerce','','style/e-coomerceneworange.png',1)"><img src="style/e-coomercenewgreen-final.png" alt="E-Commerce portia solutions will design you an online shop for five hundred pounds starting fee." name="E-Commerce" width="79" height="29" border="0"></a></td>

<td width="15%"><a href="pricing.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Pricing','','style/pricingtNew-final.png',1)"><img src="style/pricing-final.png" alt="Pricing at portia soltions , we will customise a package to suit your needs" name="Pricing" width="79" height="29" border="0"></a></td>

<td width="24%"><img src="style/phone.png" alt="phone" width="100" height="78" border="0"></td>

</tr>

<tr>

<td> </td>

<td> </td>

<td> </td>

<td> </td>

<td> </td>

<td> </td>

</tr>

<tr>

<td height="195" colspan="6">

<div class="my_carousel">

<div class="carousel_container">

<div id="carousel"></div>

<img src="my_carousel/images/arrow_left_new.png" alt="left" width="25" height="50" class="nextItem">

<img src="my_carousel/images/arrow_right_new.png" alt="right" width="25" height="50" class="prevItem">

</div>

<div class="caption_container">

<div id="captions"></div>

</div>

<img src="my_carousel/images/BALLOONS-psd65115new.png" alt="balloons" width="75" height="65" class="balloons">

<div class="carousel_data">

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/1_page.png" alt="1-page" /> </div>

<div class="caption">

<h2>1 Page</h2>

<p>A 1-page website can be enough to advertise your business and get it noticed or it can improve the interest in your product or business. From £50</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/2ormore_pages.png" alt="2ormorepage" /> </div>

<div class="caption">

<h2>2 or more page</h2>

<p>Two or more page website design that can be as unique as you want it to be. It ca also be be totally interactive.</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/brand.png.png" alt="branding" /> </div>

<div class="caption">

<h2>Branding and Internet marketing</h2>

<p>Branding is extremely important as it can be the difference between your business running month to month or growing and one of the ways that you pull visitors onto your website is through Internet marketing.</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/eCommerce.png" alt="ecommerce" /> </div>

<div class="caption">

<h2>E Commerce</h2>

<p>E commerce or online shopping. avertise your product in all its glory and emphasize all its attributes</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/graphics_templates.png" alt="graphics" /> </div>

<div class="caption">

<h2>Graphic design and logos, templates </h2>

<p>Graphic design and manipulation, with all files and elements, we will design you a bespoke logo, one that your are confident with and suits your company shop etc we will design you flyers from a template if wished.</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/hosting_SEO.png" alt="hosting" /> </div>

<div class="caption">

<h2>Hosting packages and SEO services</h2>

<p>A hosting package that suits everybody, i you wish SEO services can help your website to be easily reached</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/improvement_train.png" alt="improvement" /> </div>

<div class="caption">

<h2>Improvement Plan Continual Training</h2>

<p>Continual learning to achieve your websites maximum goal and improve visitor numbers to your website and hopefully interest inyour product.</p>

</div>

</div>

<!-- end items -->

</div>

</div></td>

<!-- Carousel --></tr>

</table>

 

 

<div align="left">

<div><a href="#"><img src="" alt="Insert Logo Here" width="85" height="85" id="Insert_logo" style="background: #C6D580; display:block;" /></a></div>

</div>

</div>

 

<a href="#"></a>

</header>

<div class="sidebar1">

<nav>

<p><a href="#">graphic Design</a></p>

<p><a href="#">Pay monthly</a></p>

<p><a href="#">pricing</a></p>

<p><a href="#">templates</a></p>

<p><a href="#">**Contact Us**</a></p>

</nav>

<div>

<aside>

<div><section>

<p><img src="style/portia_price (2).gif" width="120" height="291" alt="portia_price"></p>

</section></div>

<p> </p>

<p> </p>

<section>

<p>starting point and modify the properties to produce your own unique look. If you require flyout menus, create your own using a Spry menu, a menu widget from Adobe's Exchange or a variety of other javascript or CSS solutions.</p>

<p>If you would like the navigation along the top, simply move the ul to the top of the page and recreate the styling.</p>

</section>

</aside>

</div>

<!-- end .sidebar1 --></div>

<article class="content">

<h1>Portia Solutions</h1>

<section>

<h2>Bespoke</h2>

<p>Bespoke is an English word meaning made to a buyers specification. (personalised or tailored)

 

Portia will design you a completely unique website that will advertise your business or product precisely.</p>

</section>

<section>

<h2>paraWeb Development</h2>

<p><B>Web development</B> is a broad term for the work involved in developing a <A title="Web site" href="/wiki/Web_site">web site</A> for the Internet (<A title="World Wide Web" href="/wiki/World_Wide_Web">World Wide Web</A>) or an <A title="Intranet" href="/wiki/Intranet">intranet</A> (a private network). This can include <A title="Web design" href="/wiki/Web_design">web design</A>, <A title="Web content development" href="/wiki/Web_content_development">web content development</A>, client liaison, <A title="Client-side scripting" href="/wiki/Client-side_scripting">client-side</A>/<A title="Server-side scripting" href="/wiki/Server-side_scripting">server-side</A> <A title="Programming" href="/wiki/Programming">scripting</A>, <A title="Web server" href="/wiki/Web_server">web server</A> and <A title="Network security" href="/wiki/Network_security">network security</A> configuration, and <A title="E-commerce" href="/wiki/E-commerce">e-commerce</A> development. However, among web professionals, "web development" usually refers to the main non-design aspects of building web sites: writing <A title="Markup language" href="/wiki/Markup_language">markup</A> and <A title="Computer programming" href="/wiki/Computer_programming">coding</A>. Web development can range from developing the simplest static single page of <A title="Plain text" href="/wiki/Plain_text">plain text</A> to the most complex web-based <A title="Internet application" href="/wiki/Internet_application">internet applications</A>, <A title="Electronic business" href="/wiki/Electronic_business">electronic businesses</A>, or <A title="Social network service" href="/wiki/Social_network_service">social network services</A>.</p>

<p>For larger organizations and businesses, web development teams can consist of hundreds of people (<A title="Web developer" href="/wiki/Web_developer">web developers</A>). Smaller organizations may only require a single permanent or contracting <A title="Webmaster" href="/wiki/Webmaster">webmaster</A>, or secondary assignment to related job positions such as a <A title="Graphic designer" href="/wiki/Graphic_designer">graphic designer</A> and/or <A title="Information systems" href="/wiki/Information_systems">information systems</A> technician. Web development may be a collaborative effort between departments rather than the domain of a designated department.</p>

<p> </p>

<p>Numerous technologies and languages used to suit your aesthetics of your business/product.</p>

</section>

<section>

<h2>E-Commerce</h2>

<p><B>Electronic commerce</B>, commonly known as <B>e-commerce</B> or <B>e-comm</B>, is the buying and selling of <A title="Product (business)" >products</A> or <A title="Service (economics)>services</A> over electronic systems such as the <A title="Internet" >Internet</A> and other <A title="Computer network" >computer networks</A>. Electronic commerce draws on such technologies as <A title="Electronic funds transfer">electronic funds transfer</A>, <A title="Supply chain management" >supply chain management</A>, <A title="Internet marketing">Internet marketing</A>, <A title="Online transaction processing" >online transaction processing</A>, <A title="Electronic data interchange">electronic data interchange</A> (EDI), <A title="Inventory management">inventory management</A> systems, and automated data collection systems. Modern electronic commerce typically uses the <A title="World Wide Web" >World Wide Web</A> at least at one point in the transaction's life-cycle, although it may encompass a wider range of technologies such as <A title="E-mail" href="/wiki/E-mail">e-mail</A>, mobile devices and telephones as well.</p>

<UL>

<LI>Electronic commerce is generally considered to be the sales aspect of <A title="E-business" href="/wiki/E-business">e-business</A>. It also consists of the exchange of data to facilitate the financing and payment aspects of business transactions.</LI>

</UL>

<p>Starting at only £500 data driven websites, an increase in sales, large full advertising campaign or customise your advertising. Full Build and Marketing Service.</p>

</section>

<section>

<h2>Html5 and Css3</h2>

<p>HTML5 is a markup language for structuring and presenting content for the World Wide Web, and is a core technology of the Internet originally proposed by Opera Software.[2] It is the fifth revision of the HTML zsstandard. Html5 is still in its early stages yet so we will continue to learn new code-writing technologies to make sure that your website does not fall behind your competitors.</p>

<p align="center"><img src="style/webdevelopment.finished.png" width="250" height="90" alt="html5"></p>

<div align="center">

<table style width="92%" cellpadding="1">

<tr>

<td width="24%" valign="top"><h6>Details</h6></td>

<td width="59%" valign="top"><h6>Newest Items added to

the store

</h6>

<p><?php echo $dynamicList; ?></p>

<!-- <table align="center" width="98%" cellpadding="2">

<tr>

<td width="30%" valign="top"><a href="product.php?"><img style="border:#666 2px solid" src="style/flowers/1pagesmall.jpg" alt="$dynamicTitle" width="41" height="43" border="1"></a></td>

<td width="70%" valign="top">Product Title<br>

Product Price<br>

<a href="product.php?">View Product</a><br> <br></td>

</tr>

</table>-->

<p><br>

<br>

<br>

<br>

<br>

<br>

<br>

</p>

<p><br>

</p></td>

<td width="17%" valign="top"><h6>Price</h6>

<p> </p>

<p> </p></td>

</tr>

</table>

</div>

</section>

</article>

<section>

 

 

 

<!-- end .content -->

<aside class="aside-right">

<h4>Backgrounds</h4>

<section>

<p>By nature, the background color on any block element will only</p>

</section>

<section>

<p>show for the length of the content. If you'd like a dividing line instead of a color, place a border on the side of the .content block (but only if it will always contain more content).</p>

<article>

 

 

 

 

 

 

</article>

 

</section>

</aside>

<footer>

<section>

<div align="center"><a href="How_long.php">:How long will it Take?:</a> </div>

</section>

<section>

<div align="center"><a href="#">:Do we Outsource?:</a></div>

</section>

<div align="center"><a href="#">:How long will it take to get recognized?:

 

</a></div>

<a href="#">

<section>

</section>

</a>

<section>

<p align="center"> </p></section>

<section>

<div align="right">

<table align="left" width="55%%" cellpadding="1">

<tr>

<td> </td>

</tr>

<tr>

<td> </td>

</tr>

<tr>

<td> <address class="copyright">

©Copyrighted by Portia Solutions

</address></td>

</tr>

</table>

 

<img style="margin-right:5px" src="style/portia.png" alt="portia" width="160" height="85"></div>

</section>

</footer>

<!-- end .container --></div>

</body>

</html>

 

then secondly with this page

 

product.php

 

 

 

 

 

<?php

//error reporting

error_reporting(E_ALL);

ini_set('display_errors', '1');

?>

<?php

// Check to see URL Variable is set and that it exists in the database

if (isset($_GET['id'])){

$id = preg_replace('#[^0-9]#i', '', $_GET['id']);

//use this var to check to see if this ID Exists, if yes then get the product

//details, if no then exit this script and give message why.

$sql = mysql_query("SELECT * FROM products WHERE id='$id' LIMIT 1");

$productCount = mysql_num_rows($sql);//count the the output ammount

if ($productCount > 0){

// get all the product details

while($row = mysql_fetch_array($sql)){

$product_name = $row["product_name"];

$price = $row["price"];

$details = $row["details"];

$category = $row["category"];

$subcategory = $row["subcategory"];

$date_added = strftime("%b %d, %Y", strtotime($row["date_added"])); // Notice here how we changed it from _added to _Added

//product_name,price,details,category,subcategory,date_added

}

}else{

echo "That item does not exist.";

exit();

}

}else{

echo "No product in the database with that ID";

exit();

 

 

 

}

 

mysql_close();

 

?>

<!DOCTYPE HTML>

<html>

<head>

<meta charset="utf-8">

<title><?php echo $product_name; ?></title>

<link href="my_carousel/includes/shop.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="my_carousel/includes/jquery-1.7.2 (2).js"></script>

 

<script type="text/javascript" src="my_carousel/includes/jquery.roundabout.min.js"></script>

<script type="text/javascript" src="my_carousel/includes/carousel.js"></script><!--[if lt IE 9]>

<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

<![endif]-->

<script type="text/javascript">

function MM_swapImgRestore() { //v3.0

var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;

}

function MM_preloadImages() { //v3.0

var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

}

 

function MM_findObj(n, d) { //v4.01

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);

if(!x && d.getElementById) x=d.getElementById(n); return x;

}

 

function MM_swapImage() { //v3.0

var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

</script>

</head>

 

<body onLoad="MM_preloadImages('style/home-reg.png','style/web-designred2a-final.png','style/web-development-final.png','style/e-coomerceneworange.png','style/pricingtNew-final.png')">

<div id="mainWrapper">

<div class="mainWrapper">

 

<header><div><table align="right" style="margin-right:16px" width="72%" cellpadding="1">

<tr>

<td width="16%" height="41"><a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Index/Home page ','','style/home-reg.png',1)"><img src="style/home-grey-final.png" alt="Web Design, Graphic Design, Logo Design, Web development, E-Commerce, scripting, Apps, Portia Solutions we will design the exact website for your business" name="Index/Home page " width="79" height="29" border="0"></a></td>

<td width="15%"><a href="web-design.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Web Design','','style/web-designred2a-final.png',1)"><img src="style/web-designnew2.png" alt="Web Design here at portia solutions, we will give you exactly what you want to sell your business" name="Web Design" width="79" height="29" border="0"></a></td>

<td width="15%"><a href="web-development.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Web Development','','style/web-development-final.png',1)"><img src="style/web-development-green.png" alt="Portia solutions Web Development, web design, branding, advertising packages" name="Web Development" width="79" height="29" border="0"></a></td>

<td width="15%"><a href="e-commerce.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('E-Commerce','','style/e-coomerceneworange.png',1)"><img src="style/e-coomercenewgreen-final.png" alt="E-Commerce portia solutions will design you an online shop for five hundred pounds starting fee." name="E-Commerce" width="79" height="29" border="0"></a></td>

<td width="15%"><a href="pricing.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Pricing','','style/pricingtNew-final.png',1)"><img src="style/pricing-final.png" alt="Pricing at portia soltions , we will customise a package to suit your needs" name="Pricing" width="79" height="29" border="0"></a></td>

<td width="24%"><img src="style/phone.png" alt="phone" width="100" height="78" border="0"></td>

</tr>

<tr>

<td> </td>

<td> </td>

<td> </td>

<td> </td>

<td> </td>

<td> </td>

</tr>

<tr>

<td height="195" colspan="6">

<div class="my_carousel">

<div class="carousel_container">

<div id="carousel"></div>

<img src="my_carousel/images/arrow_left_new.png" alt="left" width="25" height="50" class="nextItem">

<img src="my_carousel/images/arrow_right_new.png" alt="right" width="25" height="50" class="prevItem">

</div>

<div class="caption_container">

<div id="captions"></div>

</div>

<img src="my_carousel/images/BALLOONS-psd65115new.png" alt="balloons" width="75" height="65" class="balloons">

<div class="carousel_data">

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/1_page.png" alt="1-page" /> </div>

<div class="caption">

<h2>1 Page</h2>

<p>A 1-page website can be enough to advertise your business and get it noticed or it can improve the interest in your product or business. From £50</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/2ormore_pages.png" alt="2ormorepage" /> </div>

<div class="caption">

<h2>2 or more page</h2>

<p>Two or more page website design that can be as unique as you want it to be. It ca also be be totally interactive.</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/brand.png.png" alt="branding" /> </div>

<div class="caption">

<h2>Branding and Internet marketing</h2>

<p>Branding is extremely important as it can be the difference between your business running month to month or growing and one of the ways that you pull visitors onto your website is through Internet marketing.</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/eCommerce.png" alt="ecommerce" /> </div>

<div class="caption">

<h2>E Commerce</h2>

<p>E commerce or online shopping. avertise your product in all its glory and emphasize all its attributes</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/graphics_templates.png" alt="graphics" /> </div>

<div class="caption">

<h2>Graphic design and logos, templates </h2>

<p>Graphic design and manipulation, with all files and elements, we will design you a bespoke logo, one that your are confident with and suits your company shop etc we will design you flyers from a template if wished.</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/hosting_SEO.png" alt="hosting" /> </div>

<div class="caption">

<h2>Hosting packages and SEO services</h2>

<p>A hosting package that suits everybody, i you wish SEO services can help your website to be easily reached</p>

</div>

</div>

<!-- Item -->

<div class="carousel_item">

<div class="image"> <img src="my_carousel/images/improvement_train.png" alt="improvement" /> </div>

<div class="caption">

<h2>Improvement Plan Continual Training</h2>

<p>Continual learning to achieve your websites maximum goal and improve visitor numbers to your website and hopefully interest inyour product.</p>

</div>

</div>

<!-- end items -->

</div>

</div></td>

<!-- Carousel --></tr>

</table>

 

 

<div align="left">

<div><a href="#"><img src="" alt="Insert Logo Here" width="85" height="85" id="Insert_logo" style="background: #C6D580; display:block;" /></a></div>

</div>

</div>

 

<a href="#"></a>

</header>

<div class="sidebar1">

<nav>

<ul>

<li><a href="#">graphic Design</a></li>

<li><a href="#">Pay monthly</a></li>

<li><a href="#">pricing</a></li>

<li><a href="#">templates</a></li>

<li><a href="#">**Contact Us**</a></li>

</ul>

</nav>

<div>

<aside>

<div><section>

<p><img src="style/portia_price (2).gif" width="120" height="291" alt="portia_price"></p>

</section></div>

<p> </p>

<p> </p>

<section>

<p>starting point and modify the properties to produce your own unique look. If you require flyout menus, create your own using a Spry menu, a menu widget from Adobe's Exchange or a variety of other javascript or CSS solutions.</p>

<p>If you would like the navigation along the top, simply move the ul to the top of the page and recreate the styling.</p>

</section>

</aside>

</div>

<!-- end .sidebar1 --></div>

<article class="content">

<h1>Portia Solutions</h1>

<section>

<h2>Hold</h2>

</section>

<section>

<h2>hold</h2>

</section>

<section>

<h2>Holdagain</h2>

</section>

<section>

<h2>Holdb</h2>

<p align="center"><img src="style/webdevelopment.finished.png" width="250" height="90" alt="html5"></p>

<div align="center">

<table style width="92%" cellpadding="1">

<tr>

<td width="24%" valign="top"><h6>Details</h6></td>

<td width="59%" valign="top"><h6>Newest Items added to

the store

</h6>

 

<table align="center" width="98%" cellpadding="2">

<tr>

<td width="30%" valign="top"><a href="product.php?"><img style="border:#666 2px solid" src="inventory_images/<?php echo $id; ?>.jpg" alt="<?php echo $product_name; ?>" width="41" height="43" border="1"></a></td>

<a href="#"View Full Size</a></td>

<td width="70%" valign="top"><h3><?php echo $Product_name; ?></h3><br>

<p><?php echo $Price; ?><br>

 

<br>

<?php echo "$subcategory $category"; ?><br>

<br>

<?php echo $details; ?>

<br>

</p>

<p>ADD TO CART<br>

</p></td>

 

 

 

<a href="product.php?">View Product</a><br> <br></td>

</tr>

</table>

<p><br>

<br>

<br>

<br>

<br>

<br>

<br>

</p>

<p><br>

</p></td>

<td width="17%" valign="top"><h6>Price</h6>

<p> </p>

<p> </p></td>

</tr>

</table>

</div>

</section>

</article>

<section>

 

 

 

<!-- end .content -->

<aside class="aside-right">

<h4>Backgrounds</h4>

<section>

<p>By nature, the background color on any block element will only</p>

</section>

<section>

<p>show for the length of the content. If you'd like a dividing line instead of a color, place a border on the side of the .content block (but only if it will always contain more content).</p>

<article>

 

 

 

 

 

 

</article>

 

</section>

</aside>

<footer>

<section>

<div align="center"><a href="How_long.php">:How long will it Take?:</a> </div>

</section>

<section>

<div align="center"><a href="#">:Do we Outsource?:</a></div>

</section>

<div align="center"><a href="#">:How long will it take to get recognized?:

 

</a></div>

<a href="#">

<section>

</section>

</a>

<section>

<p align="center"> </p></section>

<section>

<div align="right">

<table align="left" width="55%%" cellpadding="1">

<tr>

<td> </td>

</tr>

<tr>

<td> </td>

</tr>

<tr>

<td> <address class="copyright">

©Copyrighted by Portia Solutions

</address></td>

</tr>

</table>

 

<img style="margin-right:5px" src="style/portia.png" alt="portia" width="160" height="85"></div>

</section>

</footer>

<!-- end .container --></div>

</body>

</html>

 

 

 

then secondly with this page

 

product.php

Link to post
Share on other sites

So when you run the first file, you get "We have no products listed in Our store Yet"?

 

In the second file, here's the PHP code at the start, a bit more organized:

 

?php
// Check to see URL Variable is set and that it exists in the database
if (isset($_GET['id']))
{

$id = preg_replace('#[^0-9]#i', '', $_GET['id']);

//use this var to check to see if this ID Exists, if yes then get the product
//details, if no then exit this script and give message why.
$sql = mysql_query("SELECT * FROM products WHERE id='$id' LIMIT 1");
$productCount = mysql_num_rows($sql);//count the the output ammount 

if ($productCount > 0)
{ 
	// get all the product details
	while($row = mysql_fetch_array($sql))
	{ 
		$product_name = $row["product_name"];
		$price = $row["price"]; 
		$details = $row["details"]; 
		$category = $row["category"]; 
		$subcategory = $row["subcategory"]; 
		$date_added = strftime("%b %d, %Y", strtotime($row["date_added"])); // Notice here how we changed it from _added to _Added 
		//product_name,price,details,category,subcategory,date_added
	}
}
else
{
        echo "That item does not exist.";
        exit();
}
}
else
{
echo "No product in the database with that ID";
exit();
} 

mysql_close();

?>

 

If you are getting the "No product in the database with that ID", according to your code, that means that you don't have an ID set in the url, like "products.php?id=1". You need to have an id set in order to use this page.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...