Answer Posted / vivek mohan singh
$dbhost = "localhost"; // database hostname
$dbuser = "root"; // database username
$dbpassword = ""; // database password
$dbname = ""; // database name
//database connection
$link=mysql_connect($dbhost,$dbuser,$dbpassword) or die ('I
cannot connect to the database because: ' . mysql_error());
mysql_select_db($dbname ,$link);
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
How do you remove duplicates from an array?
How to check curl is enabled or not in PHP
How to add 301 redirects in PHP?
Which library is used in php to do various types of image work?
Explain mixed and callback functions?
What is php and features of php?
What are the functions of string?
How can you declare a constant variable in php?
How to turn on the session support in php?
How to get the value of current session id?
What is the difference between echo print and print_r in php?
What is difference between php and html?
How can we set and destroy the cookie in php?
How to compare two strings with comparison operators in php?
How can we automatically escape incoming data?