Web Design
To Download xampp:
------------------
https://www.apachefriends.org/index.html
download xampp.
Start xampp and start Apache and MySql on the Xampp dashboard as u see on the video. .
Download heidisql
-------------------
https://www.heidisql.com/download.php
for IDE. You can use Toad or SQL Workbench instead.
go to commandprompt c:/xampp/mysql (or wherever you have xampp installed)
run from command prompt to set the password for the root whatever you want to set.
mysqladmin.exe -u root password <password>
Start heidisql and fill in the password and say open. This opens the database.
Now create your own database or use an existing one.
Once you have your database set up and table insrted and populated:
Copy all your css, js, php and html files into c:\xampp\htdocs\
You can do
http://localhost to bring up xampp.
Now you can do the http://localhost/test.php to test php.
http://localhost/dbtest.php to test the database.
(Make sure you change the userid and passwd if needed. ).
Now test other phps too before you start making changes for your assignment.
SHOW DATABASES;
USE FLASHCARDS;
CREATE TABLE Cars(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(31) NOT NULL,
model VARCHAR(31) NOT NULL,
url VARCHAR(255),
PRIMARY KEY (id)
);
describe table Cars;
LOAD DATA LOCAL INFILE 'cars.csv'
INTO TABLE Cars FIELDS TERMINATED BY ',';
SELECT * from Cars;
SELECT name from Cars;
--TRUNCATE TABLE Cars; -- Deletes all content (try again)
-- DROP TABLE cars; --
CREATE USER '<username>'@ 'localhost'
IDENTIFIED BY '<password>';
CREATE USER 'flashuser'@ 'localhost'
IDENTIFIED BY 'MyDogHasFleas';
GRANT <permission> ON <database> <table>
TO '<username>'@'localhost';
GRANT select, insert ON FlashCards.*
TO 'flashuser'@'localhost';
GRANT all ON FlashCards.*
TO 'flashuser'@'localhost';