SuperRoy
10-26-03, 07:08 AM
http://www.sorellejewelrydesigns.com/store.php
There should be a counter at the bottom of the page. Also, when you click on the sections on the left, there should be a listing of items in the MySQL database. It worked on my old server, but won't work on this one. it's on mysql02.powweb.com
What can I be doing wrong?
$Host = "localhost";
$User = "sjd";
$Pass = "xxxxxxxx";
$DBName = "sjd_com";
$TBName = "counters";
$Link = mysql_connect($Host,$User,$Pass);
mysql_select_db($DBName,$Link);
$query = "UPDATE $TBName SET counter = counter + 1 WHERE id='1'";
mysql_query($query,$Link);
$query = "SELECT counter FROM $TBName WHERE id='1'";
$result = mysql_query($query,$Link);
while($Row = mysql_fetch_array($result))
$counter = $Row['counter'];
mysql_close($Link);
echo "<center><font style=\"font-family: Tahoma;font-size: 10px;text-decoration: none;
color: 5A5A5A;\">$counter</font></center>";
By the way, here is how the "counters" table is setup.
Table: Counters
id | counter
1 | 150
Anyone?
There should be a counter at the bottom of the page. Also, when you click on the sections on the left, there should be a listing of items in the MySQL database. It worked on my old server, but won't work on this one. it's on mysql02.powweb.com
What can I be doing wrong?
$Host = "localhost";
$User = "sjd";
$Pass = "xxxxxxxx";
$DBName = "sjd_com";
$TBName = "counters";
$Link = mysql_connect($Host,$User,$Pass);
mysql_select_db($DBName,$Link);
$query = "UPDATE $TBName SET counter = counter + 1 WHERE id='1'";
mysql_query($query,$Link);
$query = "SELECT counter FROM $TBName WHERE id='1'";
$result = mysql_query($query,$Link);
while($Row = mysql_fetch_array($result))
$counter = $Row['counter'];
mysql_close($Link);
echo "<center><font style=\"font-family: Tahoma;font-size: 10px;text-decoration: none;
color: 5A5A5A;\">$counter</font></center>";
By the way, here is how the "counters" table is setup.
Table: Counters
id | counter
1 | 150
Anyone?