SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems accessing database

    I'm not sure if I should put this post here or in the PHP forum so I appologise if this is the wrong place.

    I have used
    PHP Code:
    <?php
    $con 
    mysql_connect("server id","DBO name","password");
    if (!
    $con)
      {
      die(
    'Could not connect: ' mysql_error());
      }

    mysql_select_db("Database name"$con);
    $result mysql_query("SELECT * FROM contact");

    echo 
    "<table border='1'>
    <tr>
    <th>Title</th>
    <th>firstname</th>
    <th>lastname</th>
    <th>address</th>
    <th>town</th>
    <th>city</th>
    <th>postcode</th>
    <th>phone</th>
    <th>mobile</th>
    <th>email</th>
    <th>day</th>
    <th>month</th>
    <th>year</th>
    <th>heard</th>
    <th>comments</th>
    <th>sms</th>
    <th>post</th>
    <th>thirdparty</th>
    </tr>"
    ;
    while(
    $row mysql_fetch_array($result))
      {
      echo 
    "<tr>";
      echo 
    "<td>" $row['Title'] . "</td>";
      echo 
    "<td>" $row['firstname'] . "</td>";
       echo 
    "<td>" $row['lastname'] . "</td>";
      echo 
    "<td>" $row['address'] . "</td>";
       echo 
    "<td>" $row['town'] . "</td>";
      echo 
    "<td>" $row['city'] . "</td>";
       echo 
    "<td>" $row['postcode'] . "</td>";
      echo 
    "<td>" $row['phone'] . "</td>";
       echo 
    "<td>" $row['mobile'] . "</td>";
      echo 
    "<td>" $row['email'] . "</td>";
       echo 
    "<td>" $row['day'] . "</td>";
      echo 
    "<td>" $row['month'] . "</td>";
       echo 
    "<td>" $row['year'] . "</td>";
      echo 
    "<td>" $row['heard'] . "</td>";
       echo 
    "<td>" $row['comments'] . "</td>";
      echo 
    "<td>" $row['sms'] . "</td>";
       echo 
    "<td>" $row['post'] . "</td>";
      echo 
    "<td>" $row['thirdparty'] . "</td>";
      echo 
    "</tr>";
      }
    echo 
    "</table>";
    mysql_close($con);
    ?>
    To access and view the results from the database. I was able to do this once, but now get an error message saying:
    No input file specified. HTTP/1.1 503 Server too busy Connection: close Date: Wed, 22 Aug 2007 10:26:51 GMT Server: Microsoft-IIS/6.0 Content-Type: text/html Server Error, unable to connect to fastcgi server.
    I don't know what this means and what I can do about it

  2. #2
    SitePoint Member
    Join Date
    Aug 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think there is nothing wrong with your php code.
    this is server error.

  3. #3
    SitePoint Zealot
    Join Date
    Feb 2006
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks


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
  •