Building a Forum using
Laragon(windows) PHP MySQL phpMyAdmin
Rough draft notes:
-Google Laragon, install it
-under ->menu ->tools ->path there are fast ways to add/remove/manage path. So Add Laragon to Path
-go to tools -> quick add for adding phpMyAdmin and others quickly.
-install with PHP, MySQL
-install at Root level, (right on C:// drive)
-Laragon auto-configs really well and fast. It is Blazing fast for server-startup! (WAMP Server *50)(Instant)
-You can use Win Terminal, Cmd, Cmdr, Powershell
-to access mySQL console - mysql -u <username> -p hit enter then enter your pass
-create another user so your not using Root all the time
*show SQL code
-grant all privileges to the new user
GRANT ALL PRIVILEGES on database_name.* to new_username etc;
.* (important) - means all tables from db.
***Notes on building Forums with PHP**
goals and must have functionality:
-have the option/ mand to login person
-main page
-create posts
-displays posts
-reply to posts: (actually no, not at this point)
Step1--
initialize database -- create, use, create tables, 1:post, 2:register, 3:test
multiple rows (with datatypes, )
Step2--
set up forum and connect to mysql
-write simple html form register_page.php
-put cookie at top -- "_server," were we connect to db.
-check that multiple users with same name or email cant co-exist!
Step3--
build out the registration system and check register table in db that data is being stored
Step4--Make the login page:
-check that multiple users with same name or email cant co-exist!
first build the html form, login.php,
then add the request_method = 'POST' php script at top.
a href between register and login page.
Step4-- Setting everything up:
make files, forum.php, create_post.php, show_content.php
write to a txt file a dated sql commands list library for backups of what you've done: like git/ managing branches
*pages needed*
login.php
register.php
registration.php
forum.php
create_post.php
show_content.php
Step4-x
-once you have made php files and added the SESSSION_START(), cookie check at the top, check that the session is not_null by going to create_post and show_content pages and they should redirect to login.php