Search This Blog

connect with database in php with mysql

connection.inc.php :

<?php
$host='localhost';
$user_name='rootgf';
$password='';
@$con = mysql_connect("$host","$user_name","$password");
if ($con)
 {echo '<br>host coonected<br>';}
else
  {
  die('Could not connect ');
  }
?>

connection.php :

<?php

require 'connection.inc.php';



mysql_close($con);
?>

run  " connection.php"
output :
host coonected



array
arrays display
associative arrays in php
multi dimensional arrays in php
for each statements with arrays in php
add one arry to another array or append
array reduce with array_splice() in php
array to string in php
change array size using array_pad() in php
delete array elements with unset() in php
check array index or key with user inputs in php
checking if an element is in array or not using in php

Share Links

Related Posts Plugin for WordPress, Blogger...