SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot ablueman's Avatar
    Join Date
    Jun 2005
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Delaying outputs and directing them.

    Hi.

    Im building a webpage for myself. and Ive just about got the basic image drawn up. (Critique if you want, I dont mind)

    I have the 'DB connected' output from db.inc.php coming up in a monitor top left of the page. (more for fun than any real purpose).

    2 things I need to know.

    1) Is there any way I can delay the output a little so it comes up

    testing connection..
    (wait 2 secs)
    ablueman.db
    (wait 2 secs)
    connection success
    (wait 2 secs)
    forum.db
    (wait 2 secs)
    connection success

    Is the only way to do it making a countdown and calling it on each output or something or is there an easier way.

    2) If the connection fails the error kicks the tables well out of wack cus of the size of it. Is there any way I can output this to the main table.

    ie. In the mnitor it would say connection failed. and in the main window would come up the error.

    Thanks in advance for any help you can give.

  2. #2
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sleep(2);

    In between all of them will delay each for 2 seconds before displaying.

  3. #3
    SitePoint Zealot ablueman's Avatar
    Join Date
    Jun 2005
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by johnzer
    sleep(2);

    In between all of them will delay each for 2 seconds before displaying.
    Thanks I will try that..

    What about the directing the output to another table question?

    [EDIT] heh tried the sleep thing and it works, just a little too well. because its processing server end, before the page loads, its holding the whole page up. I wll have to make the page load first then connect to the DB.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •