Modifications to get working on my system:
When downloading original USB server bookstore file to a MAC,
Drop the 'root' folder files into htdocs
folder in MAMP
(Change Line 2 in accessBooks.php)
MAMP
$connect = mysqli_connect('localhost', 'root', 'root', 'bookstore');
USB Webserver
$connect = mysqli_connect('localhost', 'root', 'usbw', 'bookstore');
(Line 142 in accessBooks.php)
original:
return json_encode($books);
changed to:
return json_encode(utf8ize($books));
IMPORT localhost.sql
(database data) to mamp sever
- Go to http://localhost:/phpmyadmin (http://localhost:8888/phpmyadmin)
- Click on mysql on left
- Click import from the top row of links on the main page.
- select file from your computer to upload.