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 $$ in php?
Swap two variables value without using third variable in php ?
Can I write php code in html file?
Explain some of the php string functions?
What is the difference between explode() and split() functions?
What are the file upload settings in configuration file?
What are the encryption techniques in php?
What is the function of mysql_real_escape_string in php?
How to remove a file?
How the values are ordered in an array?
Where can I learn php?
What is the content of /etc directory?
What is the difference between abstract class and interface in php?
What is the use of count() function in php?
Which is the dependent variable?