answersLogoWhite

0


Best Answer

Yes as long as you change the variable of them

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you connect to two MySQL databases on one PHP page?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you connect MySQL to HTML with Microsoft Office Frontpage?

You can't. Frontpage is just an editor, and you can't connect mySQL to HTML. You can do it with PHP, though.


Can you connnect databases to HTML pages?

Yes; you will need to use PHP or ASP to connect to your database and display its content in an HTML page.


What is offered by MySQL Connect?

Connection to MySQL Using PHP Script To open a database connection, PHP provides the mysqli construct or the mysqli connect() function. On success, this method returns a MySQL link identification; on failure, it returns FALSE. To learn more about data science please visit- Learnbay.co


How to you connect in mysql database?

Use the following code to connect to your mysql database from the php file. variables are hostname, db_username, db_password - see the code below for the exact connection example. <?php mysql_connect("localhost", "admin", "1admin") or die(mysql_error()); echo "Connected to MySQL<br />"; ?>


What can you do with this phpmyadmin info?

phpMyAdmin is an application written in the PHP language that provides a web-based interface for the administration of MySQL databases.


What has the author Brad Bulger written?

Brad Bulger has written: 'MySQL/PHP database applications' -- subject(s): 004.6/82 (Computer program language), MySQL (Electronic resource), PHP (Computer program language), Web databases


How do you create a database using PHP?

The following are the fundamental procedures for creating a MySQL database with PHP: As demonstrated in this article, connect to the MySQL server from your PHP script. If the connection is successful, construct a database using SQL and save it in a string variable. Carry out the query. To learn more about data science please visit- Learnbay.co


How do you make a comments page on dreamweaver?

You'd need PHP and mySQL knowledge for this. Search Google for "Free PHP Comment Scripts".


What is a PHP script?

php is a "dynamic" computer programming or more correctly scripting language designed to add functionality to web pages and interact with databases. It is popular as it is essentially a no cost option when associated with a MySQL database and a Linux operating system. The addition of a web server service Apache completes the no cost / lo cost line-up known as LAMP Linux, Apache, MySQL and PHP A php script is a section of php code that achives a specific aim or collection of functions e.g. to save names taken from a web page form and store them in a MySQL database. Sunsequently retireve those names and display them in a table on a web page... PHP was devised by Rasmus Lerdorf The letters php stand for Hypertext Pre Processor


Why is PHP used?

PHP is used to create dynamic websites, this is a step up from HTML as it allows you to do much more than creating static websites. Using a language such as PHP also gives you access to using databases with your website such as MySQL.


How do you run a MySQL query from PHP file?

Here is a simple script that you can do to run a MySQL query after you have set a database up. <?php // Database Settings $db['hostname'] = "localhost"; $db['username'] = "<db username>"; $db['password'] = "<db password>"; $db['database'] = "<db name>"; // Connect to MySQL $connect = mysql_connect($db['hostname'], $db['username'], $db['password']); // Select Database mysql_select_db($db['database'], $connect); // Do MySQL Query mysql_query("INSERT INTO table_name SET field_name = '1234567890'"); // Close MySQL mysql_close($connect); ?> Obviously you will need to use your own MySQL settings and database details, but this gives you a general overview of how you can do it.


Why to use use MYSQL with PHP and not anyother database?

You can connect any DB via PHP if you have database specific database extensions defined. LAMPP stack refer to 'Linux Apache Mysql PHP Perl'. Hence this stack is famous for php development as it include all the needed components for web development. Mysql is preferred mostly because it's extension is added by default in XAMPP or WAMPP stack.