Posted by Peter Wilson on 10/02/38 11:18
I am trying to set up PHP MYSQL and Apache2 on a solaris 10 system
it all works apart from a small bit of code in a page that I have code
previously and did work on my windows system.
this bit of code is
<?php if (isset($HTTP_SESSION_VARS['ono_details']))
{
echo $ono_details;
}
else
{
session_register ("ono_details");
$onot = 0;?>
<?php
do
{?>
<?php
$onot = $onot + 1;
mysql_select_db($database_games, $games);
$query_buy = "SELECT ono FROM orders WHERE ono = $onot";
$buy = mysql_query($query_buy, $games) or die(mysql_error());
$row_buy = mysql_fetch_assoc($buy);
$totalRows_buy = mysql_num_rows($buy);
?>
<?php }
while (mysql_num_rows($buy)>0);
?>
<?php
$ono_details = $onot;
echo $ono_details;
}?>
what happens is that this does not generate a number the first time it
is run.
page displays fine but the number is just not generated.
Anyone got any ideas please
Many thanks
Peter
Motto "A smile aday keeps the blues away"
http://www.sci-comm.clara.net/
Navigation:
[Reply to this message]
|