Results 1 to 3 of 3

Thread: page wont show

  1. #1
    Join Date
    Jan 2003
    Posts
    15

    Unanswered: page wont show

    well i got php working fine, thanks to all who helped my at my below post.

    anyways my NEW problem is I made a page that is supposed to allow e to enter a username and password, which i have in a mySQL database, (testdb) in a table called users. now for some reason when I go to test the site using apache, nothing loads. nothing at all. if I remove this code it loads fine. (but of course it doesn't do anything worthwhile) can anyone see what is wrong?

    <! DOCTYPE HTML PUBLIC
    "-//W3C//DTD HTML 4.0 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <?
    //database
    $host = "localhost";
    $name = "";
    $pass = "";
    $dbname = "testdb";
    $link = mysql_connect($host, $user, $password)
    or die("could not conenct");
    mysql_select_db("testdb")
    or exit ("couldn't get into database");
    $query = "insert into sitestats values('hit')";
    mysql_query($query, $link)
    ?>

    thanks,

    Trevor

  2. #2
    Join Date
    Jan 2003
    Posts
    15
    i think it might have something to do with permissions, but i dont know how to fix it. right now the only user with access to 'testdb' is root.

  3. #3
    Join Date
    Sep 2002
    Location
    Kyiv, Ukraine
    Posts
    77

    Re: page wont show

    Try checking out variable names in mysql_connect function and the ones that you define (in mysql_connect you use $user and you define $user, in mysql_connect you use $password and define $pass). Everything is ok with them?

    Does it gives away any error code or something?
    Yours faithfully,
    Yaroslav Zaremba

Posting Permissions

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