Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 2,990,403 members, 7,281,633 topics. Date: Sunday, 29 January 2023 at 12:57 PM

Take Your Web Development Skill/Career To The Next Level By Creating A Web App - Programming (4) - Nairaland

Nairaland Forum / Science/Technology / Programming / Take Your Web Development Skill/Career To The Next Level By Creating A Web App (8679 Views)

The Decision Point To Switch Career To Tech And The Second Thought / Learn To Program By Creating Working Applications - FREE / How Many Clients Have You Gotten From Your Web Development Ad On Nairaland? (2) (3) (4)

(1) (2) (3) (4) (Reply) (Go Down)

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 6:24pm On Sep 18, 2017
Now let us use the browser to tell it what page to load.
We will go ahead by adding a question mark after the url. (We will start with this for now)
We will use a GET array

//Page Setup
$q = "SELECT * FROM pages WHERE id = $_GET[page]";
$r = mysqli_query($conn, $q);
$page = mysqli_fetch_assoc($r);


Now, go to your browser and do this and whatch the page change content

Mine is cms2.3

localhost/cms2.3/?page=1
OR
localhost/cms2.3/?page=2

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by Doughboysss: 7:02pm On Sep 18, 2017
updated

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 7:34pm On Sep 18, 2017
Doughboysss:
updated

Wow, so how do you feel so far?
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by Doughboysss: 5:37am On Sep 19, 2017
kreativemind:


Wow, so how do you feel so far?

Wonderful. So good to learn new stuff
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 1:29pm On Sep 19, 2017
Doughboysss:


Wonderful. So good to learn new stuff


That is very good. We will take it a step further. Well done
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 4:13pm On Sep 20, 2017
Can we proceed guys?
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 5:20pm On Sep 20, 2017
Now try to load your default address of your page and you will see error message. This means that though if a user log on to the landing page of your site. It will load but with error message at the top. Check the attached image

localhost/cms2.3/

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 5:32pm On Sep 20, 2017
How do we resolve this and remove the error message. We need to create an if statement

if (isset($_GET['page'])) {

$pageid = $_GET['page'];


} else {

$pageid = 1;
}


#Page Setup

$q = "SELECT * FROM pages WHERE id = $pageid;
$r = mysqli_query($conn,$q);
$page = mysqli_fetch_assoc($r);

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by MCzubby247(m): 5:59pm On Sep 20, 2017
kreativemind:
Now try to load your default address of your page and you will see error message. This means that though if a user log on to the landing page of your site. It will load but with error message at the top. Check the attached image

localhost/cms2.3/
we are following Sir, maybe a times we might come late but we are here sir,
the bootcamp I told you about, just told me that the have job fair meaning that after the training the can help u secure jobs, how easy is it to secure job as a programmer in Lagos or Abuja sir?
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 6:23pm On Sep 20, 2017
MCzubby247:

we are following Sir, maybe a times we might come late but we are here sir,
the bootcamp I told you about, just told me that the have job fair meaning that after the training the can help u secure jobs, how easy is it to secure job as a programmer in Lagos or Abuja sir?

Well, i hope they really help you to secure job like they said. But the job market for programmers in lagos or Abuja is fair but i will advice you not to focus on them and research more on the company before you apply.
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by Doughboysss: 9:54am On Sep 21, 2017
Updated

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by skptricks: 12:59am On Oct 11, 2017
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by Nobody: 11:23am On Oct 11, 2017
skptricks:


You can also have a free PHP Tutorial at www.skptricks.com. Complete and brief examples are explained about PHP and MySQL. it is really helpful.

thanks
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 5:59pm On Oct 17, 2017
Good evening guys. Is been a while. How are we doing and hope we are making progress in the tutorial so far?
Sorry, i have been busy lately and that was the reason why there have not been any tutorial of late.
I will try to create time for you guys, even if it is few minute a day or four days a week. I will make sure i post the tutorial so that we can finish the on time and move to the next one.

Thanks for your understanding. See you tomorrow for the next tutorial on PHP.



Now for those that want to read tutorials on PHP on many tutorial website. Please go ahead, they will help you to set up the foundation that you need and you can now come back here to take what you have learn to the next level. Here, we focus on the practical application of what you have learn by creating applications. So having the basic understanding from all those website will really help you here and i will try to help anyway i can. Moreover we have a lot of gurus on nairaland who will be willing to help and make the web development journey easy for you.
Thanks
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by Collins4u1(m): 5:36pm On Oct 18, 2017
nice to hear from you.
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 8:05pm On Oct 18, 2017
Collins4u1:
nice to hear from you.


Thanks. We will start now and thanks for your patience
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 8:19pm On Oct 18, 2017
Now let us focus on using the URL to load content into our browser
To do that, go to your index.php and edit your nav tag i.e

<li class="active"><a href="index.php?page=1">Home</a></li>
<li><a href="index.php?page=2">About Us</a></li>

Now, when people click on each tab, it will load the content for each tab from the database.
Moreover, there are few things that we still need to do but for now, we will focus on the active class on the tab and make it dynamic.
This means that when users click "home", then the home tab becomes active, and when they click about, the about tab becomes active

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 8:30pm On Oct 18, 2017
You may also decide to remove index.php and starts with "?", like this

<li class="active"><a href="?page=1">Home</a></li>
<li><a href="?page=2">About Us</a></li>
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 8:31pm On Oct 18, 2017
Now to make the active class dynamic, we need to do few things.

1 Like

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by yuka(m): 10:49pm On Oct 18, 2017
great tutorial I have really learnt alot.. Tho my PC is faulty.. I was able use my phone since I have php server on it
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by amulet: 11:17am On Oct 19, 2017
following nice thread
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by Nobody: 1:02pm On Oct 19, 2017
yuka:
great tutorial I have really learnt alot.. Tho my PC is faulty.. I was able use my phone since I have php server on it

U must be a computer genius
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 1:23pm On Oct 19, 2017
now we need to manipulate the <li> tag using if statement, like this

<li<?php if($pageid ==1) {echo ' class="active"'; } ?>><a href="index.php?page=1">Home</a></li>
<li<?php if($pageid ==2) {echo ' class="active"'; } ?>><a href="index.php?page=2">About Us</a></li>

Check your browser to see the effect of the active class on the home and about page

Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by Collins4u1(m): 7:34pm On Jan 02, 2018
Kreativemind

Happy new year sire. Can you surprise us this new year?
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by skptricks: 5:11am On Apr 11, 2018
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 6:37pm On Jan 21, 2019
Collins4u1:
Kreativemind


Happy new year sire.
Can you surprise us this new year?

Compliment. There is a plan for that right now. Really sorry for the late response. I am creating a new thread for that and you can follow up on that through the step. Good to hear from you and i hope you have building applications right now.
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by Collins4u1(m): 7:13pm On Jan 21, 2019
kreativemind:


Compliment. There is a plan for that right now. Really sorry for the late response. I am creating a new thread for that and you can follow up on that through the step. Good to hear from you and i hope you have building applications right now.



please mention me when the thread is up.
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kreativemind: 7:35pm On Jan 21, 2019
Collins4u1:




please mention me when the thread is up.

The thread is up now. Here is the link
https://www.nairaland.com/4974588/web-design-web-development-mobile
Re: Take Your Web Development Skill/Career To The Next Level By Creating A Web App by kaykay100(f): 7:17pm On Apr 07, 2019
kreativemind:
Now, let us create a variable for the database and store the connection in that variable i.e

$conn is our variable name for the database

$conn = mysqli_connect('localhost', 'username', 'password', 'databasename');

username : this is the username of the database that you want to use
password of the username that you want to use
database name is the name of the database that you have created

Next : We need to create the database. You can use the mysql cmd to create the database or you can use the Phpmyadmin of the wampserver or xampserver that you have to create the database as well as the username and password.

2. Open Phpmyadmin
3. Click Databases
4. Enter the name of the database and click create. My database name is CMS2.3


Next is to create user name and password. The default username for wamp server is "root" but we will create another one.

1. Click the database that you create Mine is cms2.3 and locate "Privileges" and click it.
2. Click "Add User"
3. Enter the name of the database,
ii. Choose "Any Host"
iii. Enter the password

4. Check All
5. Scroll Down and click "Go"

Then go to your database connection inside setup.php and enter all the information for username, password and database name.

We will write the script to handle database error in the next tutorial.

Well done guys

I am stuck here.I have no idea what to do

(1) (2) (3) (4) (Reply)

Php/mysql Pin And Serial Number Generation Script / Why Is Programming Difficult? / How Do You Get A CEH / Pentesting Job In Nigeria?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2023 Oluwaseun Osewa. All rights reserved. See How To Advertise. 123
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.