+ 6

How to connect the database with php

17th Jul 2016, 3:23 AM
Meenakshi
9 Answers
+ 9
well its simple you can use wamp or xamp sever to run php and use php myadmin to connect the database..
20th Jul 2016, 10:57 AM
Shubham Purohit
Shubham Purohit - avatar
+ 8
$conn=mysql_connect("localhost","root",""); mysql_select_db("<database name>",$conn); $query=""; mysql_query("$query","$conn");
17th Jul 2016, 1:41 PM
noushad mohammed
noushad mohammed - avatar
+ 2
to connect to MySQL database we have following commands search for each of them on Google to learn there usage $conn=mysql_connect("localhost","root",""); mysql_select_db("<database name>",$conn); mysql_query("<database query>");
17th Jul 2016, 1:15 PM
parthsarathi ajmani
parthsarathi ajmani - avatar
+ 1
yes with the help of MYSQL
18th Jul 2016, 8:28 AM
Amit
Amit - avatar
+ 1
I recommend using PDO to interface with MySQL.
19th Jul 2016, 4:05 AM
Demotis Silvermoon
Demotis Silvermoon - avatar
+ 1
using MySQL
22nd Jul 2016, 6:34 PM
Amrutha
0
Argh. Wenn I am reading mysql. Dont use it. It have been removed in PHP 7. Please use mysqli. And escape variables, they are going to be written in the database. And use statements to run sql query. Or sql injection is possible.
17th Jul 2016, 2:33 PM
Tom Stahlberg
Tom Stahlberg - avatar
0
Which framework !!!
3rd Jan 2017, 3:23 AM
Vishnu Mv
Vishnu Mv - avatar
0
use Mysqli its new or good
31st Aug 2017, 5:03 PM
Shubham Purohit
Shubham Purohit - avatar