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 is php addslashes?
What is a php certification?
How break and continue while loop in php?
Is php front end?
What is http php?
Does php need a closing tag?
What is final keyword in php?
Why php is sometimes called as embedded scripting language?
What is difference between mysqli and mysql?
What is use of in_array() function in php?
What are PHP Magic Methods/Functions. List them.
What is return value in php?
What is urlencode and urldecode in php?
What is composer phar?
I am writing an application in php that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with php?