Basically i wanna put all this code in a seperate file
Code: <?php
$query = "select product.ProductID, product.ProductName, product.ProductCategory, product.ProductPrice, product.ProductQuantity, product.ProductDescription, image.ImageID, image.ImagePath, image.ImageName, product_image.ImageID, product_image.ProductID
FROM product
JOIN product_image
ON product.ProductID = product_image.ProductID
JOIN image
ON image.ImageID = product_image.ImageID";
//Use this query below
$result = mysql_query($query, $conn)
or die ("Unable to perform query");
while($row= mysql_fetch_array($result))
{
$productname = $row['ProductName'];
$productprice = $row['ProductPrice'];
$imagename = $row["ImageName"];
$imagepath = $row["ImagePath"];
//Get the product id so i can pass it
$productid =$row["ProductID"];
$file = $imagepath.$imagename;
?>
<ol>
<li class="newproducts">
<!-- Make the product name clickable and pass through its id -->
<?php echo '<a href="product_details.php?productid='.$productid.'">' .$productname.'</a><br />';?>
<?php echo '<a href="'.$file.'" target="_blank" rel="lightbox"><img src="'.$file.'" width="100" height="100"/><br />';?>
<?php echo 'Price' . $row ['ProductPrice'].'<br /><br />';?>
</li>
</ol>
<?php
}?>
Then call it on the index page, how can i do this
this code is strange !
Hi i got this code from the web.. It checks for live and dead socksIt is working perfectly on my localhost. but does not work in any webserver ! any ideas ?<?php$filename =
Forms Authentication and Refresh at Login page
Hello,
What's wrong with my code
sobbing for many days, still don't know why please Help. Why my page isn't posted correctly. In a nutshell, I have two pages, 1) is just a form another contains php with answer and if and else
Does deleting the spmlog directory critical?
Hi Everyone,
Need help with cin setw
I made a program here is my code:#include <iostream>#include <cstdlib>#include <iomanip>#include <ctime>using namespace std;int main(){ unsigned seed = 0; int randomNum; int
Trouble checking SESSION cookie
I am trying to use $_SESSION cookies to verify admin privileges .I don't understand why this is not working:/*everything above here is working*/ $session = mysql_fetch_array($session_query); $type =
sendmail code suddenly not working
Hi Guys, I maintain 3 sites (including my own) I use the following code from a french webmaster that gave me permission to use it. He designed & coded one of them. Now the code seems to have
A WBS element with the name XXX already exists in version FREI_VERSION
Hi.
Sending an SMS Message with ASP.NET
Often times it may be a requirement for your web application to send an SMS message. Such examples would be reminders, password resetting, and spam.Q: Can I have some code to send an SMS message?A:
Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ignores any file names that begin with numbers, could anyone please tell my why and show me how to