Answer Posted / ravi
$db = mysql_connect('localhost','username','password');
mysql_select_db("databasename", $db);
if (!$db)
{
die('Could not connect: ' . mysql_error());
}
$abc=mysql_query("write your query");
| Is This Answer Correct ? | 3 Yes | 9 No |
Post New Answer View All Answers
What is x+ mode in fopen() used for?
How to redirect a url from http to https in .htaccess?
What is a stored procedure in mysql?
What is stdclass in php?
Describe PHP error and logging information?
What is difference between put and post method in http?
How to initiate a session in php?
Explain me what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?
When is a conditional statement ended with an endif?
If we login more than one browser windows at the same time with same user and after that we close one window, then is the session is exist to other windows or not? And if yes then why? If no then why?
How can php and javascript interact?
What are the advantages of stored procedures, triggers, indexes in php?
What is smarty?
What is polymorphism?
What is session cookies php?