Connecting user : mysql_connect « MySQL Database « PHP






Connecting user

 
<?php

$domain = "localhost";
$user = "userName";
$password = "password";

$conn = mysql_connect( $domain, $user, $password );

if($conn)
{
 $msg = "Congratulations $user, You connected to MySQL"; 
} 

?>

<html>

 <head>
  <title>Connecting user</title>
 </head>

 <body>
  <h3> 
   <?php echo( $msg ); ?> 
  </h3>
 </body>

</html>
  
  








Related examples in the same category

1.A function to open a connection to mysql
2.Connecting to a MySQL Database
3.Creating databases
4.When connecting to multiple MySQL servers, a link ID must be generated.