Help! Need your php advice

  • Krazy
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 02, 2008
  • Posts: 10
  • Loc: Untied Kingdom
  • Status: Offline

Post March 1st, 2008, 2:17 pm

Hey guys!
I am learning how to code php and mysql.
I have spent nearly £100 on 2 books, the first I didn't like, and this second one isn't proving much use to me.
The first book I bought, was php and mysql for dummies, and the latest one I bought is
PHP 6 and mySQL 5

well, sitting here, with a book in front of my face, just isn't proving much use for me.
Do you guys have any other ideas of ways out of this, and for me to still learning how to code properly, without having sit here with paper in front of my face 24/7??
No matter how determined I am to achieve from this book, it backfires on me!!
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 1st, 2008, 2:17 pm

  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7134
  • Loc: Ozzuland
  • Status: Offline

Post March 1st, 2008, 2:24 pm

:) Glad I'm not the only one to be like that. How I learned to code is by actually starting on a project. I made a registration script with help of my friends.

The only thing I knew how to code when I started is the tags on how to start PHP and end them "<?php...?>".

I didn't have any books actually. I used web sites that provided free information and help. Ozzu.com was 90% the resource and reference that I have used.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • spork
  • HB
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 5488
  • Loc: Rochester, NY
  • Status: Offline

Post March 1st, 2008, 2:24 pm

I always learn things the easiest by just grabbing a text editor and doing examples. Then I play around with them to see what other kinds of things I can do.

There are lots and lots of tutorials and example code for PHP and MySQL on the Internet, especially here on Ozzu. Search around a bit and just start coding. Start with the basics and work your way up.

Remember, Rome wasn't built in a day, and you won't instantly know everything overnight.
How to Maintain Simple, Static Pages in a CakePHP Application
EEEEEEEEE! It's here!!
  • Krazy
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 02, 2008
  • Posts: 10
  • Loc: Untied Kingdom
  • Status: Offline

Post March 1st, 2008, 2:29 pm

Bogey wrote:
:) Glad I'm not the only one to be like that. How I learned to code is by actually starting on a project. I made a registration script with help of my friends.

The only thing I knew how to code when I started is the tags on how to start PHP and end them "<?php...?>".

I didn't have any books actually. I used web sites that provided free information and help. Ozzu.com was 90% the resource and reference that I have used.


Yeah cool, although, I don't really have the help of my friends none of them want to really code php and mysql, and I feel like I'm on my own, until I just got given the link to this site actually. I feel I have had no help anywhere else really, so yeah, hopefully this site will be helpful to me somehow.

spork wrote:
I always learn things the easiest by just grabbing a text editor and doing examples. Then I play around with them to see what other kinds of things I can do.

There are lots and lots of tutorials and example code for PHP and MySQL on the Internet, especially here on Ozzu. Search around a bit and just start coding. Start with the basics and work your way up.

Remember, Rome wasn't built in a day, and you won't instantly know everything overnight.


I understand what you mean, I have been going at this proper for around 2 months now,and I seem to getting nowhere.
I think the code will help me out, if I had premade code to mess around with, and say like, well that bit does that there etc, I think that'd help.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7134
  • Loc: Ozzuland
  • Status: Offline

Post March 1st, 2008, 2:34 pm

Krazy wrote:
Bogey wrote:
:) Glad I'm not the only one to be like that. How I learned to code is by actually starting on a project. I made a registration script with help of my friends.

The only thing I knew how to code when I started is the tags on how to start PHP and end them "<?php...?>".

I didn't have any books actually. I used web sites that provided free information and help. Ozzu.com was 90% the resource and reference that I have used.


Yeah cool, although, I don't really have the help of my friends none of them want to really code php and mysql, and I feel like I'm on my own, until I just got given the link to this site actually. I feel I have had no help anywhere else really, so yeah, hopefully this site will be helpful to me somehow.


By "friends" I meant people on OZZU. :) I don't have any friends who knows PHP or MySQL.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • Krazy
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 02, 2008
  • Posts: 10
  • Loc: Untied Kingdom
  • Status: Offline

Post March 1st, 2008, 2:36 pm

Bogey wrote:
Krazy wrote:
Bogey wrote:
:) Glad I'm not the only one to be like that. How I learned to code is by actually starting on a project. I made a registration script with help of my friends.

The only thing I knew how to code when I started is the tags on how to start PHP and end them "<?php...?>".

I didn't have any books actually. I used web sites that provided free information and help. Ozzu.com was 90% the resource and reference that I have used.


Yeah cool, although, I don't really have the help of my friends none of them want to really code php and mysql, and I feel like I'm on my own, until I just got given the link to this site actually. I feel I have had no help anywhere else really, so yeah, hopefully this site will be helpful to me somehow.


By "friends" I meant people on OZZU. :) I don't have any friends who knows PHP or MySQL.


ah, okay!
--------

Yeah I have also looked around for pro's to help me, like people who have created professional websites for people and stuff, but they charge to much.. I'll just have to see what sort of response I get from OZZU and see where it takes me.
Although I'd love like a tutor/teacher sort of thing!
  • SpooF
  • Ice Cream
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 2826
  • Loc: Richland, WA
  • Status: Offline

Post March 1st, 2008, 2:43 pm

Well soon there should be some tutorials coming in that can help you. However, while those are being produce, feel free to ask anything you like. Ozzu has a great community always willing to help! :handsup:
College Taught Me - And we're not talking about the classes!
@travisperson
  • Krazy
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 02, 2008
  • Posts: 10
  • Loc: Untied Kingdom
  • Status: Offline

Post March 1st, 2008, 2:50 pm

SpooF wrote:
Well soon there should be some tutorials coming in that can help you. However, while those are being produce, feel free to ask anything you like. Ozzu has a great community always willing to help! :handsup:


I think you'd all get sick of me if I asked everything I wanted to ask.
The massive question that the whole purpose of me coming here was, I was to learn to code properly!
  • SpooF
  • Ice Cream
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 2826
  • Loc: Richland, WA
  • Status: Offline

Post March 1st, 2008, 3:10 pm

There really isn't a prober way to code PHP. There are things that you should do and things you shouldn't but mostly its just a preference. Such thing include how to request a variables pasted between pages via a form. I don't like to use the registered super global $_REQUEST for accessing the variable data between pages. I find it more professional to use the super global that the form is using.

Another thing I like to do is use short hand coding for some things. Example...

PHP Code: [ Download ] [ Select ]
if($var == "val") {
   $return = "true";
} else {
   $return = "false";
}
 
$return = ($var == "val" ? "true" : "false");
  1. if($var == "val") {
  2.    $return = "true";
  3. } else {
  4.    $return = "false";
  5. }
  6.  
  7. $return = ($var == "val" ? "true" : "false");


Both give me the same results while one takes less time to code, and less lines.

Theres not much I can really tell you about how to code properly. You really have to do it by trial and error. Prober code is just well formatted/organized, secure, and fast. I don't know if there is much else.

There are some pointers I can give you.

  • Release Resource
  • Use Templates
  • Keep HTMl and PHP seperate (Template Engine)
  • Recognizable Variable Names
  • Comment your source

I'm sure there are more but cant think of them right now.
College Taught Me - And we're not talking about the classes!
@travisperson
  • Krazy
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 02, 2008
  • Posts: 10
  • Loc: Untied Kingdom
  • Status: Offline

Post March 1st, 2008, 3:13 pm

SpooF wrote:
There really isn't a prober way to code PHP. There are things that you should do and things you shouldn't but mostly its just a preference. Such thing include how to request a variables pasted between pages via a form. I don't like to use the registered super global $_REQUEST for accessing the variable data between pages. I find it more professional to use the super global that the form is using.

Another thing I like to do is use short hand coding for some things. Example...

PHP Code: [ Download ] [ Select ]
if($var == "val") {
   $return = "true";
} else {
   $return = "false";
}
 
$return = ($var == "val" ? "true" : "false");
  1. if($var == "val") {
  2.    $return = "true";
  3. } else {
  4.    $return = "false";
  5. }
  6.  
  7. $return = ($var == "val" ? "true" : "false");


Both give me the same results while one takes less time to code, and less lines.

Theres not much I can really tell you about how to code properly. You really have to do it by trial and error. Prober code is just well formatted/organized, secure, and fast. I don't know if there is much else.

There are some pointers I can give you.

  • Release Resource
  • Use Templates
  • Keep HTMl and PHP seperate (Template Engine)
  • Recognizable Variable Names
  • Comment your source

I'm sure there are more but cant think of them right now.


Thanks for that! :)
  • spork
  • HB
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 5488
  • Loc: Rochester, NY
  • Status: Offline

Post March 1st, 2008, 5:03 pm

Learn what object-oriented programming is and become efficient at it.
How to Maintain Simple, Static Pages in a CakePHP Application
EEEEEEEEE! It's here!!
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7134
  • Loc: Ozzuland
  • Status: Offline

Post March 1st, 2008, 5:45 pm

Krazy wrote:
SpooF wrote:
Well soon there should be some tutorials coming in that can help you. However, while those are being produce, feel free to ask anything you like. Ozzu has a great community always willing to help! :handsup:


I think you'd all get sick of me if I asked everything I wanted to ask.
The massive question that the whole purpose of me coming here was, I was to learn to code properly!


Nope. We won't get sick of your massive questions. In fact, we are waiting for them. :lol: Nobody got sick of my massive questions. Or maybe they did but didn't mention it :lol:. No really, you can post your massive questions here just nothing abnormal :shock: :lol: lol
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • kitcorsa
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Mar 05, 2007
  • Posts: 122
  • Status: Offline

Post March 4th, 2008, 2:50 am

the other way is to find a OS script that does something like you want and see how it works then you understand, thats the way i taught myself.

look on http://www.hotscripts.com also loads of tutorials on there.

Post Information

  • Total Posts in this topic: 13 posts
  • Users browsing this forum: Bozebo and 402 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.