Any Ideas for a PHP newbie ?

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 1454 Views - Last Post: 08 August 2013 - 10:07 AM Rate Topic: -----

#1 thenoobcoder2196   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-July 13

Any Ideas for a PHP newbie ?

Posted 07 August 2013 - 11:33 PM

First of all i dont know if this is the correct section for this type of questions so mods can move this to the correct section.

Now, I have been learning PHP recently and have learned about Conditionals, Loops, Arrays and Functions. Now I need to put all of these programming concepts in practice, but I cant think of any program that utilizes these concepts, so does anyone have a cool idea for a program that i can make ?


Is This A Good Question/Topic? 1
  • +

Replies To: Any Ideas for a PHP newbie ?

#2 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4244
  • View blog
  • Posts: 13,449
  • Joined: 08-June 10

Re: Any Ideas for a PHP newbie ?

Posted 07 August 2013 - 11:43 PM

there is Martyr2ís Mega Project List to choose from.
Was This Post Helpful? 0
  • +
  • -

#3 thenoobcoder2196   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-July 13

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 02:04 AM

View PostDormilich, on 07 August 2013 - 11:43 PM, said:

there is Martyr2ís Mega Project List to choose from.


Those are some pretty neat ideas but all of them are too advanced for me i.e i cant make most of those programs with mere knowledge of basic programming concepts (conditionals, loops, functions and arrays).
Was This Post Helpful? 0
  • +
  • -

#4 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4244
  • View blog
  • Posts: 13,449
  • Joined: 08-June 10

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 02:11 AM

esp. the early number/text examples shouldnít be too difficult and I deem they sufficiently easy.
Was This Post Helpful? 0
  • +
  • -

#5 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4241
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 04:35 AM

View Postthenoobcoder2196, on 08 August 2013 - 10:04 AM, said:

i cant make most of those programs with mere knowledge of basic programming concepts (conditionals, loops, functions and arrays).

Actually, you can make pretty advanced programs using just that. I've seen some pretty large "professional" projects built using nothing more than those basic elements; without any OOP or any sort of higher design. - Code was crap, but worked nonetheless. Quality comes with experience. - That is, if you care to learn from your experience. Unfortunately not everybody does.

If you want a simple starter project that will give you some experience with real-world PHP development, try writing a simple CMS - like a small blogging platform or a forum. Those will let you experiment with all the basics, and get you started with database interaction.
Was This Post Helpful? 0
  • +
  • -

#6 thenoobcoder2196   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-July 13

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 05:20 AM

Professional projects using the basics ? Now im convinced that i have zero imagination :P
Can you tell me some of those projects ? And about the CMS (i know what it stands for), um i dont think im ready to create one cause i dont even know what a CMS is :P im gonna do some research on CMS's and then i'll try to create one :D

This post has been edited by Dormilich: 08 August 2013 - 05:40 AM

Was This Post Helpful? 0
  • +
  • -

#7 deviantvicar   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 28
  • Joined: 31-July 13

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 05:36 AM

mysql is going to be something you have to learn and is lots of fun to mess with, make a little database and then future PHP projects can use that too :)

I made a my sql script for a basic PHP code, check out mejeef.tk (you have my permission to mess with it anyway you like)

its pretty simple but once I got the basics of PHP I needed data to play with. If your interested I will post the sript to you.

This post has been edited by deviantvicar: 08 August 2013 - 05:46 AM

Was This Post Helpful? 0
  • +
  • -

#8 deviantvicar   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 28
  • Joined: 31-July 13

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 06:00 AM

oh wait I broke the sql thing ://> must fix it...fixed.

This post has been edited by deviantvicar: 08 August 2013 - 06:04 AM

Was This Post Helpful? 0
  • +
  • -

#9 thenoobcoder2196   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-July 13

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 06:02 AM

View Postdeviantvicar, on 08 August 2013 - 05:36 AM, said:

mysql is going to be something you have to learn and is lots of fun to mess with, make a little database and then future PHP projects can use that too :)/>

I made a my sql script for a basic PHP code, check out mejeef.tk (you have my permission to mess with it anyway you like)

its pretty simple but once I got the basics of PHP I needed data to play with. If your interested I will post the sript to you.


yeah i know, PHP and SQL work together. Well I guess I cant create even simple projects in PHP without using SQL, so i'll be learning SQL very soon :)
Was This Post Helpful? 0
  • +
  • -

#10 Dormilich   User is offline

  • 痛覚残留
  • member icon

Reputation: 4244
  • View blog
  • Posts: 13,449
  • Joined: 08-June 10

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 06:04 AM

for a beginner in SQL I can recommend SQLite (should be shipped along with PHP by default). no need to setup a DB server and such (because itís a file-based DB).
Was This Post Helpful? 1
  • +
  • -

#11 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4241
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 06:11 AM

View Postthenoobcoder2196, on 08 August 2013 - 01:20 PM, said:

Can you tell me some of those projects ?

Sorry, those I was talking about are proprietary. Not allowed to share them. There are a lot of systems like these out there though. You could no doubt find some if you look through old open-source PHP projects. (The projects coded this poorly probably never got much off the ground.)

View Postthenoobcoder2196, on 08 August 2013 - 01:20 PM, said:

And about the CMS (i know what it stands for), um i dont think im ready to create one cause i dont even know what a CMS is :P im gonna do some research on CMS's and then i'll try to create one :D

It doesn't have to be complicated. A CMS (Content Management System) is basically any system that allows you to dynamically alter the contents of a website/application. Even something that just lets you post comments on a site would technically qualify as a CMS. (Though most proper CMS do a lot more than that.)

As an example, here is something I have saved in my example projects storage. Very simple, not even a hundred lines of code, but does qualify as a CMS. It lacks all elements like user logins, security and such, but shows some of the basics. Should help you if you are having trouble getting started.

Not also that I use PDO there to connect to a SQLite database, so this code will run without any kind of database server set up, and on any PHP version that supports PDO_SQLITE. (Basically PHP 5.1 and higher.)

But the real beauty of PDO is that this code could easily be moved to any other database - like MySQL or PostgreSQL - by simply editing the database connection. No code changes would be required outside the database connection code. And by using PDO prepared statements, arguably the biggest security threat to newbie code - SQL Injection - is avoided completely.

Spoiler

Was This Post Helpful? 0
  • +
  • -

#12 thenoobcoder2196   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-July 13

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 06:32 AM

Sorry to disappoint you but i honestly don't have any idea what you are talking about except that CMS part.
Whats a PDO ? And im hearing about SQLlite for the first time, all i ever heard of was MySQL and MsSQL.

This post has been edited by Dormilich: 08 August 2013 - 06:43 AM

Was This Post Helpful? 0
  • +
  • -

#13 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4241
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 06:41 AM

OK, going on about PDO is perhaps a bit premature at this point. - Just to sum it up though, since I've brought it up already: PDO is a library of classes that provides a standard way to connect to databases. It's the library used by modern PHP code to interact with most database systems. - You'll want to look into that later! :)

About SQLite. It is just a simple database that works much like MySQL and MSSQL (from a coding point of view), except that it's simpler to set up. It requires no database server software to be set up. It just saves everything to a file. So if you are starting out with databases, it's a very easy option. Most of the things you learn when dealing with SQLite will also be very useful when you do start working with database servers like MySQL and MSSQL.
Was This Post Helpful? 0
  • +
  • -

#14 thenoobcoder2196   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 11-July 13

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 07:26 AM

Hmm, even though SQLite seems easier im gonna go ahead with MySQL cause there are more TUTS on it and i have already downloaded lots of MySQL TUTS :D/>

This post has been edited by Dormilich: 08 August 2013 - 07:27 AM

Was This Post Helpful? 0
  • +
  • -

#15 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4241
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: Any Ideas for a PHP newbie ?

Posted 08 August 2013 - 08:01 AM

OK. Just beware of the old PHP MySQL functions. Anything that looks like this: mysql_connect(...) or mysql_query(...), is old, obsolete, insecure and should no longer be used! Most PHP tutorials out there use these functions, so be careful. - I'm not saying you shouldn't use these tutorials, just be aware that code that uses these functions is obsolete, and when you start working on real PHP code you will want to do it differently.

The PHP docs have a nice page set up to explain the different MySQL APIs, and to help you choose the right one.
- Choosing an API
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2