Here's a copy of a file that will do what you want once you fill in the requirements. Adjust the text as you like. Add css where needed. Then you will need to call it from wherever in the site you want with an include.
<?php
// Connect to the database server
$dbcnx = @mysql_connect("###.###.###.###",
"$$$$$$$", "%%%%%%%%%");
if (!$dbcnx) {
echo( "<P>Unable to connect to the @@@@@@" .
"database server at this time.</P>" );
exit();
}
// Select the @@@@@@@ database
if (! @mysql_select_db("^^^^^^^") ) {
echo( "<P>Unable to locate the @@@@@@@ " .
"database at this time.</P>" );
exit();
}
?><P> Here is where you put the text you want associated with the call out. FOR INFO--The ###.###.###.### is the host of your database(could be localhost, an IP address, etc). The $$$$$$ is the database username. The %%%%%%%% is the database password. The @@@@@@ is the site name. The ^^^^^^^^ is the name of your database</P><BLOCKQUOTE>
<?php
// Request the quantity of the product
$result = mysql_query(
"SELECT products_quantity FROM products WHERE products_id=1");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>");
exit();
}
// Display the quantity in a paragraph
while ( $row = mysql_fetch_array($result) ) {
echo(
"<P>Better Hurry\! We only have <strong>" . $row["products_quantity"] . " left\!</strong></P>");
}
?>
Sorry for the delay. 10G irons in the fire.
And... I'm sure there will be other suggestions.:D
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com