Just add echo statments at whatever steps you want to display comment or
detail for; something like:


<html>
<head><title>Some page</title></head>
<body>
<?

echo "Connecting to database: ";

$dbconnection = @mysql_connect("localhost","username","password");

if($dbconnection !== false){

        echo "OK";

}else{

        echo "FAILED<br>";
        echo mysql_error();
        echo "</body></html>";
        exit;
}

echo "<br>Selecting database 'foo': ";

if(@mysql_select_db("foo", $dbconnection)){

        echo "OK";

}else{

        echo "FAILED<br>";
        echo mysql_error($dbconnection);
        echo "</body></html>";
        exit;

}

//Et cetera...

?>
</body>
</html>



If you're doing this within an HTML table it could get tricky because you
would need to close the table structure after an error, but otherwise it's
pretty straightforward.  It can be really helpful for debugging and making
sure a script is working correctly!

-Andy


> -----Original Message-----
> From: Sommai Fongnamthip [mailto:[EMAIL PROTECTED]]
> Subject: display text in screen
>
> Hi,
>       I have easy problem to ask someone.  I wrote PHP to update
> data with many
> step and need to display comment or detail in each step.  But I got all
> comment or detail display after it finished update all step.  How could I
> display each step comment immediately??


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to