-4

Getting error on line 4. why? i am trying to connect to mysql database and see either it connected or not. i am not getting any result.

jcon.php

 <?php 
    require 'config.php';
    $con=mysqli_connect(HOST,DBUSER,DBPASS,DB);
    if(mysqli_connect_errno($con)){
        echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
    else{ echo "mysql connected succesfully";}
    ?>

config.php

<?php
define( "HOST","localhost");
define ("DB","share");
deifne ("DBUSER";"root");
define ("DBPASS"; "" );
?>
supto
  • 7
  • 3
  • 2
    If you're starting your question with "Getting an error" you might aswell post the error itself. – ccKep May 03 '13 at 23:30
  • What does the error say? – Chris May 03 '13 at 23:31
  • Possible duplicate of: [How to get useful error messages in PHP?](http://stackoverflow.com/q/845021/367456) – hakre May 03 '13 at 23:31
  • 1
    Defining constants needs a `,` separator between name and value, instead of `;` – Royal Bg May 03 '13 at 23:32
  • 2
    looks like you've got this problem once a week and need to ask the question again and again or what? http://stackoverflow.com/questions/16286651/connection-to-mysql-using-mysqli-command-is-not-working – hakre May 03 '13 at 23:33
  • `` i am seeing an error at line 10 – supto May 04 '13 at 00:27

1 Answers1

5

deifne ("DBUSER";"root"); seems to be problematic

123123123
  • 66
  • 1