0

How to connect the php with mysql

I wrote a program on sublime text and i wanna run it on wampserver. For that how can connect with its database. I wrote a program on register login form

21st Nov 2016, 3:00 AM
Ahammed Shafaz B
3 Answers
+ 3
MySQL is deprecated in PHP5 and removed from PHP7. Please use mysqli
21st Nov 2016, 12:02 PM
Aditya kumar pandey
Aditya kumar pandey - avatar
0
<?php $con=mysql_connect("localhost","user_name","password") or die("Could not connect "+mysql_error()); $d=mydql_select_db("database_name",$con); mysql_query("query..."); ?>
21st Nov 2016, 4:09 AM
Dhadhi Suresh
Dhadhi Suresh - avatar
0
try this one <?php $connection = mysqli_connect('localhost', 'username', 'password', 'database'); mysqli_query($connection, 'CREATE TEMPORARY TABLE `table`'); ?>
21st Nov 2016, 12:11 PM
Dhadhi Suresh
Dhadhi Suresh - avatar