SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Jan 2011
    0 Post(s)
    0 Thread(s)

    Problems with connection to mysql database by PHP

    Hi. I'm totally new to this kind of things, but I bought a Kevin Yank Book about PHP/mysql and started to rock.

    I was doing everything on my own, but this stuff is just too hard for a beginner.
    I looked everywhere trying to solve it on my own, but sorry I must ask you.

    I have problem with connection to my sql database.


    Index.php :

    PHP Code:
    if (!
    $output 'Nie można się połłączyć z serwerem bazy danych.';

    if (!
    $output 'Nie można ustanowić kodowania dla połączenia z bazą danych.';

    if (!
    $output 'Nie znaleziono bazy danych ijdb.';

    $output 'Nawiązano połączenie z bazą danych.';


    and output.html.php :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <HTML xmlns="" xml:lang="pl" lang="pl">
      <TITLE>Dane wynikowe PHP</TITLE>
      <meta http-equiv="content-type" content="text/html: charset=utf-8"/>
    <?php echo $output?>

    I think there are no errors in this code, but when I'm launching localhost/connect/index.php it's just nothing on the Firefox and on the IE it looks like this: Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\Index.php on line 2 ..... it's after 2 hours of thinking, first it was just error 500. Apache 2.2.16 is running, PHP 5.2.14 installed and mysql serwer on, checked it with Mysql administator.

    Can someone help me?

    //sorry for my English, I'm Polish but doing my best.
    Last edited by SpacePhoenix; Jan 7, 2011 at 01:28. Reason: placed php tags around the php code (+ edited out password)


Posting Permissions

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