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
What's the output of the ucwords function in this example?
Why do we show php code in browser?
Is php faster than nodejs?
What are the main error types in php?
What is whitespace in php?
What is var_dump function in php?
How to repeat a string to a specific number of times in php?
What does the scope of variables means?
How do you destroy a session?
What is the difference between print() and echo()?
Is runtime polymorphism overriding?
What is inheritance in php? How many types of inheritance supports php?
Does php 7 support mysql?
Explain me what are the 3 scope levels available in php and how would you define them?
How to check an element is exists in array or not in php?