 |
|
|
|
01-07-2009, 07:42 AM
|
Re: New to php, please help.
|
Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
|
java applets are are better option for chat rooms than any server side language.
Other than that PHP (and any other server side code) is perfectly capable of the rest
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|
|
|
|
01-07-2009, 07:48 AM
|
Re: New to php, please help.
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Quote:
|
but i will not list everything i would just like to make sure that php and mysql can do all the things i have listed above before i spend all my free time learning php to find out later that i picked the wrong programming language.
|
Of course they can, but for a start, those are rather ambitious targets.
The first thing to do, when you want to build anything, is to dissect it.
Split each action in each page in logical pieces, and try to look for similar pieces.
Similar pieces = functions. You write it once, you use it at several places.
For me, drawing those pieces helps much. It helps to keep focused on your task and to know what exactly needs to be done.
I personally use the simple program "dia" to do this: http://dia-installer.de/index_en.html
Simply draw something like this:
It's simplified, of course, but you get the idea. I creaetd this schema in 5 minutes...
The key is to split one scary big thing in many little pieces that are way less scary, and to assemble them later.
A bit like lego games. A couple of bricks is nothing special, but you can build robots with them, and they are rather impressive.
Once you have schematized most of your application, the second step is to think about the database.
It's a key part of your application, and a bad designed schema can make you pull your hairs out later, when you realize that one thing you wanted is made very difficult because of the schema.
For example, for the users, I'd say that you need at least the fields
*username
*password
You might want to add the email too, and why not a "enabled" field to switch on/off users without deleting them?
You say you want a profile, then you will need to put every information you want to have in the profile into another table, let's call it profile...
You would need a link between the users and the profile.
Best practices in db recommends to not use a varchar field as the link, for performances reasons, so you would need to put in integer field "id" in the user table, and one in the profile table too.
When you create an user, you create a row in the profile table too, and put the user id number in the profile table too.
Resulting:
Code:
create table users(
id integer not null,
username varchar(100) not null,
password varchar(255) not null,
enabled int not null default 1,
primary key (id)
);
--obviously, we don't want to peoples using the same username, so we put a db constraint on it
create unique index ui_username on users(username);
create table profiles(
userid integer not null, --in a full blown relational database, I'd make this field an foreign key, meaning that this field references another one, in another table
profileTitle varchar(100),
birthDate datetime,
--... and so on with all the datas you want to put on the profile
);
This should already give you an insight.
I once made a really long post about the steps to follow, but it's somewhere in my 2'200 posts history, and I have no idea where nor when...
__________________
Only a biker knows why a dog sticks his head out the window.
|
|
|
|
01-07-2009, 08:14 AM
|
Re: New to php, please help.
|
Posts: 100
Name: Jason
Location: Seattle, WA
|
Another route is to use a program like Drupal or Joomla, which is open source software you can use freely and install modules into for functionality. You would still need to learn php to modify templates, but you will get your site up quicker. The majority of websites I put up are drupal, joomla, or wordpress.
I think you would be suprised at the number of modules you can find that can give you the functionality you need. Here's some links:
http://drupal.org
http://drupalmodules.com
http://joomla.org
http://wordpress.org
|
|
|
|
01-09-2009, 08:14 AM
|
Re: New to php, please help.
|
Posts: 10,285
Name: Knight13
Location: Cleveland, Ohio
|
Wow i guess i have a long way to go before i learn what i need to, but since i have been reading and watching a couple videos on php i have learned a good bit, but i still need tons of practise, and thanks everybody for the help that you have given me so far.
|
|
|
|
01-10-2009, 10:32 PM
|
Re: New to php, please help.
|
Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
|
Well, certainly don't expect to learn everything you need to know overnight  I've been programming for about 8 years and I've been doing PHP for about a year and a half, and I've still got a lot to learn.
The thing to take away from this is that you shouldn't beat yourself up about not knowing everything about a subject quickly. One of the things that makes computer related subjects so exciting is that there's always something new to learn.
|
|
|
|
01-21-2009, 12:11 AM
|
Re: New to php, please help.
|
Posts: 10,285
Name: Knight13
Location: Cleveland, Ohio
|
Ok guys i am back with a few more questions, it has been about 10 days since my last post and i have learned a whole lot about php and how it works, but i have nothing to practice php with, meaning projects or exercises to do to help me drill this stuff into my head. So my question is can anybody tell me and website that has exercises that i can do to help me learn to use php better, i have looked but i can not find any good ones
|
|
|
|
01-21-2009, 03:47 AM
|
Re: New to php, please help.
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Why don't you simply try to do something yourself ?
I remember that the first thing I did to learn PHP, was a rollodex like site.
Save a card, update a card, delete a card, browse and search.
Start simple, and try to extend it.
What seems to be a trendy exercise is to create a simple blog engine. Or at least I've seen it in several quick-start from python web frameworks.
Nothing too complicated, with xml-rpc and ping, but like the rollodex simply create/update/delete/view/search functions.
__________________
Only a biker knows why a dog sticks his head out the window.
|
|
|
|
01-21-2009, 03:53 AM
|
Re: New to php, please help.
|
Posts: 5
|
I am using the following page for all my php codes:
http://www.php.net/
It really works for me, but you know, the best page for someone is the one that you can understand how to impliment your code.
thanks
__________________
Please login or register to view this content. Registration is FREE for webmasters and bloggers.
|
|
|
|
01-21-2009, 04:27 AM
|
Re: New to php, please help.
|
Posts: 10,285
Name: Knight13
Location: Cleveland, Ohio
|
I reread my post and maybe i said it wrong, i want to practice scripts not really do a project right now, maybe in a month or two i will try something kinda big right now i just need little things that will help me remember the php coding. I am the type of person that needs to do things over and over to remember it and it is getting boring writing the same little code snippets i have learned over and over again...
|
|
|
|
01-21-2009, 07:14 AM
|
Re: New to php, please help.
|
Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
|
Quote:
Originally Posted by Knight13
Ok guys i am back with a few more questions, it has been about 10 days since my last post and i have learned a whole lot about php and how it works,
|
Sounds like a confessional
What I used to do (and still do  ) was to take problems in forums that others are having and see if I can fix them.
from my bookmarks
http://www.hudzilla.org/phpbook/
And there is of course http://www.w3schools.com/php/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|
|
|
|
01-21-2009, 08:08 PM
|
Re: New to php, please help.
|
Posts: 10,285
Name: Knight13
Location: Cleveland, Ohio
|
Yea after i wrote it i thought it sounded like a confessional to but i could not rewrite it lol. I will try what you said chrishirst and try to fix others problems, then later on i will go to a bigger project like tripy suggested. Thanks guys...
|
|
|
|
01-22-2009, 12:19 AM
|
Re: New to php, please help.
|
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
|
Another good site with great learning tutorials for PHP is www.htmlgoodies.com
After understanding php and programming syntax, that help me understand and learn javascript better.
And this site is a good resource to ask questions to help you learn more.
Good luck 
__________________
<mgraphic /> - I don't have a solution but I admire the problem.
|
|
|
|
01-25-2009, 02:16 PM
|
Re: New to php, please help.
|
Posts: 1
Name: Martin
|
Why don't you look at some of the websites that use PHP, as most have forums with requests or wish lists, of things, and a lot of users asking for help.
You kill two birds with one stone that way, and learn PHP, and also learn what it can be used for, and how it is being used.
A lot of them are made for people that know nothing about PHP, so you may be able to explain things a little better than others that have been doing it for ever, as often for some the knowlege of the code can become a stumbling block in explanation, as they forget what it was like to know nothing.
I'm coming at this from the opposite direction you are, as I also learn by doing but although I try to just learn what I need It tends to work out learning a lot more.
So for me I started using a PHP based shopping cart, and found that when I was looking to make changes, that the modules available were made by someone for their own problems. So were not perfect.
I knew I would eventually come against something a mod would not solve, and I did with a shipping problem. So now I am reading through other peoples mods and seeing what each section does, as most people write handy little notes on each section telling you what it does.
Just thought it may help you, as slowly, I am picking up what I require, as I dart between pages, checking out what sections of code actually do, and how they communicate with the main cart script.
|
|
|
|
01-25-2009, 07:07 PM
|
Re: New to php, please help.
|
Posts: 28
Name: Youness
|
Quote:
Originally Posted by Knight13
1, I want people to log into my site to become members.
2, I would like a simple chat room that only members can use..
3, I would like it to be where members will get their own profile that they can edit.
4, I would like to build a simple forum that only members can use.
|
I recommend osDate, it is an open source which means free, under the gnu license. it has all features you want and much more. http://www.tufat.com/
__________________
Cheap Professorial Web Hosting Service Please login or register to view this content. Registration is FREE
Affordable and Relaible Reseller!Please login or register to view this content. Registration is FREE
Last edited by iamspace; 01-25-2009 at 07:10 PM..
|
|
|
|
01-26-2009, 09:08 AM
|
Re: New to php, please help.
|
Posts: 7
Location: Kalisz, Poland
|
How about some good website or courses? maybe channels on youtube? or something like that?
|
|
|
|
02-05-2009, 06:13 AM
|
Re: New to php, please help.
|
Posts: 10,285
Name: Knight13
Location: Cleveland, Ohio
|
Hey guys just wanted to give an update, I found some really good video tutorials online that has helped a lot but they are really old about 4 years old so sometimes i have to search around to find things out.
I have been building little nothing programs to help me learn php i got a free website to put the things up i make so maybe you guys can look at it and tell me what you think, all i have on their now is a calculator i made but i will add more stuff as i keep learning it.
Also i have a question i want to build a quiz, and i am tring to figure out how to use the $_GET method to get a score for the answers, like their will be 10 multiple choice questions and for every question they get right i want the script to add 10 points and for each wrong answer they get i want the script to add zero points and when they hit the submit button i want the script to show them their score, i have been trying to think of a way to do this for a day now and i can't seem to figure it out, do you guys have any suggestions? Thanks...
|
|
|
|
02-06-2009, 01:52 PM
|
Re: New to php, please help.
|
Posts: 93
Location: Canada
|
Okay I just started a thread asking the same thing...I guess I should have kept reading...
Thank you so much for the references. Should help me understand Php better.
|
|
|
|
|
« Reply to New to php, please help.
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|