Tell me how can we connect to a MySQL database from a PHP script?
Submitted by: MuhammadTo be able to connect to a MySQL database, we must use mysql_connect() function as follows:
<!--?php $database = mysql_connect("HOST", "USER_NAME", "PASSWORD"); mysql_select_db("DATABASE_NAME",$database); ?-->
Submitted by: Muhammad
<!--?php $database = mysql_connect("HOST", "USER_NAME", "PASSWORD"); mysql_select_db("DATABASE_NAME",$database); ?-->
Submitted by: Muhammad
Read Online Junior Developer PHP Job Interview Questions And Answers
Top Junior Developer PHP Questions
☺ | Tell me how the result set of Mysql be handled in PHP? |
☺ | Tell me whether it is possible to share a single instance of a Memcache between multiple PHP projects? |
☺ | Do you know what does $GLOBALS means? |
☺ | Please explain is it possible to use COM component in PHP? |
☺ | Explain how can PHP and Javascript interact? |
Top Web Developer Categories
☺ | Bootstrap Interview Questions. |
☺ | Front End Web Developer Interview Questions. |
☺ | Typography Interview Questions. |
☺ | Laravel PHP Developer Interview Questions. |
☺ | Junior Developer PHP Interview Questions. |