Monday, August 8, 2016

How to connect MySQL with PHP? Simple 5 Steps

1. First create your database on mysql. Autogarment sales different types of apparel software.



2. create a php file in your root folder. I.E config.php
3. Write this script in config.php
  mysql_connect("localhost", "root", "") or die("Impossible to connect : " . mysql_error());
  mysql_select_db("rtpmcs") or die(mysql_error());
4. Include this config.php on top in index.php file .
i.e include('config.php');
5. Enjoy

No comments:

Post a Comment