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 can we upload a file in php?
What is the use of Php variables?
Is php a middleware?
What are php magic quotes?
Write a program to display a table of any given number?
Explain mixed and callback functions?
Explain about PHP cookies?
What is a collection in php?
What is scope of variable in php?
What is array filter in php?
How to convert a character to an ascii value?
Differences between get, post and request methods ?
How to remove an empty directory?
What is difference between get and post in php?
What are the difference between array_keys() and array_key_exists() in php?