Jump to content
MakeWebGames

Simple Website Building Blockls


Dayo

Recommended Posts

Since i saw some one make there own framework to try and learn PHPO i decided to make a small and simple framework for users who want to learn php but wouldent know where to start, plus rather then just throwing code at them i have added comments to near enough everything explaining what it is doing ;)

So far i have just coded the template, login, config file, global file plus i just started the register but that should be finished tonight/tomorow as all i have to do is add the comments i will shortly be adding up a demo for people to see but a more advanced version of the demo can be found here.

As i said this is only the simple building blocks of a website your not going to be able to sell if for $1,000,000 any time soon but is a great aid to learning :D

[align=center]Download Link[/align]

Link to comment
Share on other sites

Version 1.0.0 Released!

Features

  • Login
  • Register
  • Logged in page
  • Logout
  • Basic file structure
  • Well commented (great for learning)
  • Simple installer
  • Unlimited uses ... can be a game, portfolio, client area ... anything ;)

To install

  1. Download and extract files
  2. Upload Files
  3. Run install/index.php
  4. And your done!

Demo

If you find any errors please post here so i can release a patch

Link to comment
Share on other sites

Register: when you miss something it shows the issue and you have to use the back link or button to fix it. Why not show the error on the same page WITHOUT losing any of the value?

Code:

Way too much left tabs specially in login.php

blocks like (found in index.php)

if (isset($_SESSION['login_id'])) { header("Location:loggedin.php"); exit;}

 

would be much better written like:

if (isset($_SESSION['login_id']))
{
header("Location:loggedin.php");
exit;
}

 

News should be taken from the DB or from an external file... not directly in the index in my opinion

Style: why some times you mix the HTML with the <?php tags and why some others you have one big <php block with huge echo (on multiple lines) for a single variable there?

Also you really do have some issues with the tabs in your script. You should clean that up.

Finally I would not use uppercase variables myself but this is a question of taste.

Link to comment
Share on other sites

Yea I'll add that when I get home :)

Shhh just saw your edit

1) I agree my tabing could be alot better I'll try and sort that out

2) the news was just a llace holder/example text

3) as for the <?php within HTML I only did that while coding the style on DW and forgot to wrap the HTML in the echo I'll fix this when I get back too

Link to comment
Share on other sites

The code;

mysql_* is somewhat outdated now.

Well I agree mysqli should now be used were possible I still believe mysql_ is very viable to use/practice with if you’re going to be using anything open source as most still use mysql rather than mysqli. It’s not really outdated in terms of support either so for something like this it’s more than adequate.

Btw – nice post Dayo. :)

EDIT - gave it a little test, and got an error. will take a better look in the morning (right now I looked at a file quickly + installed)

You seems to include “template/...” but have called the file “templates” this gives us an error. Easy fix: take the “s” out the file name. ;)

Also you could give a small example of the filters by using filter_validate_email in the register page.

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...