Jump to content


Photo

Need help for learning PhP


  • Please log in to reply
10 replies to this topic

#1 oneandonlysunny

oneandonlysunny

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 28 December 2013 - 10:42 PM

Hello All

 

this is my first topic in this forum

 

i need help about learning php

 

i am trying to learn php from 2 years ago

 

at first i did a course of learning php from a american francise company in our country

 

but i couldn't learn properly

 

then i skipped php for 1.5 years & again start a new course of learning php in the training centre

 

still i couldn't learn properly

 

i did try reading php ebooks , .PHP & MySQL(Novice to Ninja)

 

but my main problem is when i see a lots  of code , i feel like i can't do it

 

still i want to be a good coder

 

can u help me with any solution please or suggestion

 

what i should do  ?

 

thanks for your time



#2 ignace

ignace

    Now mod flavored

  • Moderators
  • 6,266 posts
  • LocationBelgium

Posted 29 December 2013 - 05:23 AM

Create simple things. Read from a text file. Read from a database. Store things in sessions. Change that so that everything you write to a session is stored in the database.

Make a form with some input fields and submit it, then add, subtract, divide, or multiply the input and display it on screen.

Get your hands dirty. It's the only way you learn how to program.

Edited by ignace, 29 December 2013 - 05:24 AM.


#3 oneandonlysunny

oneandonlysunny

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 29 December 2013 - 11:15 PM

Create simple things. Read from a text file. Read from a database. Store things in sessions. Change that so that everything you write to a session is stored in the database.

Make a form with some input fields and submit it, then add, subtract, divide, or multiply the input and display it on screen.

Get your hands dirty. It's the only way you learn how to program.

 

Thanks bro

 

i will try



#4 Maq

Maq

    Advanced Member

  • Moderators
  • 9,364 posts
  • LocationPennsylvania, USA

Posted 30 December 2013 - 11:35 AM

As ignace said, start with small things, you don't want to overwhelm yourself. Pick a concept, technique, or technology and learn it. Then you can learn how they work together.

 

For some ideas, here's a list of easy to hard projects:

http://forums.phpfre...s-heres-a-list/


tjmothy

ini_set ("display_errors", "1");
error_reporting(E_ALL);

#5 dalecosp

dalecosp

    Advanced Member

  • Members
  • PipPipPip
  • 307 posts
  • LocationJoplin, MO

Posted 30 December 2013 - 12:37 PM

Reading code is important, though; try not to feel overwhelmed.

Grab a section of code, copy it into your IDE/editor, and add comments as you figure out what each line is doing.

Then grab the next section and do the same.

Once you've got a big section annotated in this way, go back and read over all *your* comments. It can be very enlightening and helpful.
"God doesn't play dice" --- Albert Einstein
"Perl is hardly a paragon of beautiful syntax." --- Weedpacket

#6 enil14someone

enil14someone

    Member

  • Members
  • PipPip
  • 11 posts
  • LocationPhilippines
  • Age:19

Posted 01 January 2014 - 10:57 AM

since my question is kinda related to this, ill post here. if by chance i shouln'dt have, pls tell me. thank you.

 

im currently a novice on php and other web developing languages (i.e. php, html, javascript etc...). Im studying php since I need this for my thesis (my teacher required this ). I've read that before I study php I have to have some knowledge in html and javascript (which i don't have ) so the question is:

 

is there a way (or a website specifically ) where even a complete begginer like me can understand?

 

I'm trying to study html right now (since most of the tutorials I found about php had html codes that I don't get) but im not sure if im can add javascript too ( studying 3 programming languages at the same time would be quite the stress ).

 

any help is appreciated. thank you!



#7 KevinM1

KevinM1

    Snarkimus Prime

  • Moderators
  • 5,243 posts
  • LocationNew Hampshire, USA

Posted 01 January 2014 - 12:48 PM

Well, HTML isn't a programming language.  It doesn't have any brains, as it were.  It's just text markup (indeed, that's why it's called Hypertext Markup Language).  HTML is incredibly simple, with the hardest thing figuring out the difference between inline and block elements.  CSS is a bit more complicated (mostly with the way it handles element positioning), but the basics are simple enough.

 

PHP isn't reliant on JavaScript (or vice versa).  In fact, PHP and JavaScript live in two different environments.  PHP is executed on the server, whereas JS is executed in the browser.  Because of this crucial difference, you'll need to be familiar with the HTTP request cycle, which is basically:

 

Request to server --> Server side processing (PHP, or some other language) --> Response to user (output, which would include HTML, JavaScript, images, etc.)

 

That said, JavaScript has become increasingly important to learn because it's what makes pages interactive.  Think about what Google does.  All of the data is on their servers, but they use JavaScript to request that data and update the screen seamlessly.  So, at the very least, you'll want to become familiar with the basics there as well if you actually want to become a developer.  If you're just doing an assignment, think of JS as extra credit.  It's not necessary in the process of creating dynamic sites, but it can add that extra layer of polish that shows that you're willing to put forth extra effort.

 

Regarding resources, I'm not sure of any website that would meet my standards.  Someone somewhere will no doubt mention w3schools, but that's a bad idea (see the w3fools link in my signature for the reason why).  The vast majority of PHP tutorials available suck.  They're either outdated, or they show exactly the wrong way to do things (like using 'global' everywhere).  The best introductory resource I've found is Larry Ullman's Visual Quickstart Guide (http://www.amazon.co...ds=larry ullman).  Easy to read, lots of pictures showing the exact code in action, and no glaring errors.  Yeah, it's a book, which costs money, but it's the best introductory resource available, IMO.

 

Luckily, there is a good, free online resource for front end (HTML, CSS, JavaScript) stuff.  The Mozilla Developer Network (https://developer.mo.../en-US/docs/Webwill give you just about everything you need there.  It's by far the best resource available for the basics, as it's written/maintained by the people who make the Firefox web browser, which is also the same group that created JavaScript to begin with.  So, you'll be getting the info straight from the source.



#8 boyriot

boyriot

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 14 January 2014 - 01:09 PM

Agree with KevinM1, Larry Ullman's PHP tutorial is the best book i've ever read for beginner. I'm newbie in PHP programming too, I don't have any experience about programming. If you want an interactive website to learn about HTML, JavaScript, CSS, PHP, etc for beginner go here http://www.codecademy.com/



#9 gizmola

gizmola

    Advanced Member

  • Administrators
  • 4,141 posts
  • LocationLos Angeles, CA USA

Posted 14 January 2014 - 01:43 PM

PHP programming is not complicated.  Web development is complicated, and PHP is highly focused on solving web development problems. 

 

As you stated, you need to learn a lot of things:   

 

  • How does the WWW work?
  • How does the internet work?
  • What is HTML?
  • What is CSS?
  • What is javascript?  Why, when where do you need javascript?
  • What is HTTP and what do I need to know about it?
  • What features do browsers offer, and why/when are the used?  (Cookies, HTML5)
  • How do I setup the various servers and modules needed in order to code specific things (unix/linux, command lines, etc.)

All of this before you even can really turn the corner on what PHP does, or get into data persistence (files, relational database and document stores, caches, etc).

 

Based on what you've said, I would highly recommend, that you learn html + css to the point that you can create and style a nice web page.  This includes building forms using all the various form input types.  The good news is that there are so many free resources available not to mention places like codeacademy, all for free, and you don't need anything but a browser and a text editor to study and practice.

 

After that you can either proceed to javascript, or start in on PHP.  Personally, I'd recommend adding javascript, at least to the degree that you can do some basics.  Learning jquery around this time would not be a bad thing either.

 

Once you can create web pages, with HTML, css and javascript, you're ready for PHP.  Trying to dive into PHP without those foundation elements, can certainly be extremely confusing, because you don't have any context for many of the features of PHP.

 

Also, all the browsers have tools now like firebug that let you look into the workings of existing web pages, or the ones you create, so that you can debug javascript, look at the DOM, check out the HTTP requests.  I would have killed for tools like these when I was starting out in this field. 



#10 dalecosp

dalecosp

    Advanced Member

  • Members
  • PipPipPip
  • 307 posts
  • LocationJoplin, MO

Posted 14 January 2014 - 05:13 PM

+1 for Mr. Ullman ... plus, he hangs on the PHP mailing lists, is a very friendly, helpful guy (although very busy), and grew up "around here" (that is, near where I live, or same state, anyway).

His book got me started and ultimately helped provide a new career.


"God doesn't play dice" --- Albert Einstein
"Perl is hardly a paragon of beautiful syntax." --- Weedpacket

#11 snapchat

snapchat

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 15 January 2014 - 01:20 PM

Read a book on OOP concept for php, that helped me a bunch.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com