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

<head><title>Some page</title></head>

echo "Connecting to database: ";

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

if($dbconnection !== false){

        echo "OK";


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

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

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

        echo "OK";


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


//Et cetera...


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!


> -----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