Question: PHP and SQL (Web Programming) Open the database.php file and change the dbname of the $dsn variable , the $username, and $password to correspond appropriately

PHP and SQL (Web Programming)

Open the database.php file and change the dbname of the $dsn variable, the $username, and $password to correspond appropriately with the information from the first step in these instructions.

$dsn = 'mysql:host=localhost;dbname=my_guitar_shop1'; ????????? HOW DO WE CHANGE THIS? $username = 'fsuclass_ositopeludo'; $password = 'fsuclass_ositopeludo';

try { $db = new PDO($dsn, $username, $password); } catch (PDOException $e) { $error_message = $e->getMessage(); include('database_error.php'); exit(); } ?>

I need help with the "change the dbname of the $dsn variable"

/*************

First Step:

To access the database on the Web host, use the following information:

Username: fsuclass_ and the username you chose. If my username is ositopeludo?, then my phpMyAdmin username is dsuclass_ositopeludo?.

Password: same as above

Database: same as above

********************/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!