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
Tell me how to execute an sql query? How to fetch its result?
How do I find environment variables?
What is global array in php?
Which parts of php are case sensitive?
What is difference between md5 and SHA256?
How to copy a file?
How do I get csrf token?
What is the use of the function htmlentities?
Tell me what does $_env means?
What is the use of addslashes in php?
Is variable name casesensitive in php?
Can we override static method in php?
What is the super method?
What is difference between required and require_once in php?
Which methods should be used for sending an email using the variables $to, $subject, and $body?