Answer Posted / tina
1.mysql_connect('ip address/localhost','username for
mysql','password');
i.e
$con=mysql_connect('localhost','root','sdsd');
here,$con is a user defined variable.
2.$quer=CREATE DATABASE sampdb;
mysql_query($quer,$con);
Here,$quer is also user defined variable.
if(mysql_query($quer,$con)
{
echo("DATABASE WAS BEEN CREATED");
}
else
echo("NOT CREATED");
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is a http session?
What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?
What is session in c#?
Why do we use htaccess
What is the method to register a variable into a session?
How can I prevent sql-injection in php?
What is "echo" in php?
What is the function file_get_contents() useful for?
What does the initials of php stand for?
Do you know what is php?
How error handling is being handled by php?
How to strip whitespace (or other characters) from the beginning and end of a string?
What is the different between count() and sizeof() in php?
What is difference between php and html?
What is session cookies php?