Results 1 to 2 of 2

Thread: mysql+php doens't work

  1. #1

    mysql+php doens't work

    I installed mysql and a webserver lighttpd, and php-myadmin.
    But I'm have some trouble making it work together.
    The webserver runs, and I can access it from a browser, and the sql-server runs ok too.

    php script "test.php"
    $con = mysql_connect("localhost","root","password");
    if (!$con)
    die('Could not connect: ' . mysql_error());
    mysql_select_db("testdb", $con);
    mysql_query("INSERT INTO testtable ( id,data ) values ('100','funnystuff')");

    and when I use this command: php test.php, it inserts the values,
    but if I run it from a browser, it doesn't work ? just an empty page

    anyone have any idea whats wrong ?
    thanks in advance

  2. #2
    Quote Originally Posted by Willie2_z View Post
    anyone have any idea whats wrong ?
    Take a look at lighttpd's log messages.

Similar Threads

  1. PHP, MySQL, PHPMyAdmin, Serendipity
    By newbiefan in forum German Discussion - Deutsch (DE)
    Replies: 11
    Last Post: 11-06-2011, 16:17
  2. Apache, Mysql & PHP
    By emailpr in forum WL-700g Q&A
    Replies: 7
    Last Post: 01-03-2008, 00:10
  3. not sticky: mysql
    By wpte in forum WL-500gP Q&A
    Replies: 8
    Last Post: 24-01-2008, 16:32

Posting Permissions

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