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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started