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
How do I run php?
How to include variables in double-quoted strings?
What is self in php?
How to open standard output as a file handle?
Tell me can the value of a constant change during the script's execution?
What is singleton design pattern in php?
How to run a php script?
What is php data type?
What is the use of post in php?
What are the php variables?
How to create a public static method in PHP?
How to set cookies in PHP?
What does the function get_magic_quotes_gpc() means?
What is the use of curl()?
Is PHP an open source software?