how to connect php with database (MYSQL)
what you simply required :
1:your localhost(Xampp ,wampp etc)
2:text editors(Sublime or notpad etc)
create a database :
just click on your browser and type the localhost/phpmyadmin in url.
click on database
all of your database list will appear
create a database for example college
then enter
after that you must fill all the tables as you want
what will be the code in text editor
just type the following code
<?php
$con= mysqli_connect('localhost','root','','college');
?>
localhost:
localhost is your hosting services.
root :
root is your username.
blank in '':
it will be your password if you have a password for your database you must write at here
college:
college is your database name

No comments: