Have A Couple Of Questions Related To PHP?

Starting Out With PHP And Have A Couple Of Questions Regarding It...

Page 1 of 1

7 Replies - 1319 Views - Last Post: 14 February 2010 - 12:01 PM Rate Topic: -----

#1 TheFlamingCode   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-February 10

Have A Couple Of Questions Related To PHP?

Posted 13 February 2010 - 11:14 AM

Um Hi Guys, I'm just starting to learn PHP and I am finding it to be pretty easy for me just beginning, but have come across a few questions regarding some things... Here They Are:

  • I have been learning from Zend Developer Zone at this link. and have a question regarding the way one piece of the code is layed out... Here's the code:
    <html>
    <head></head>
    <body>
    
    <?php
    // retrieve form data
    $age = $_POST['age'];
    // check entered value and branch
    if ($age >= 21) {
         echo 'Come on in, we have alcohol and music awaiting you!';
    }
    if ($age < 21) {
         echo "You're too young for this club, come back when you're a little older";
    }
    ?>
    
    </body>
    </html> 
    
    

    Do you see the part where it says $_POST... Well, I am wondering when I go to use that same post/get method, do I also have to capitalize it like that, or can it be uncapitalized?

  • My second question is this: Out of the Editors/IDE's That I list, which one would you recommend I use (I Swear if someone Says NotePad I'm Going To Pop A Blood Vessel):
    • Komodo Edit (Currently My Favorite Editor For Everything Not PHP)
    • Aptana Studio With PHP Capabiltiy (Probably Not This One)
    • PHP Edit (Full)
    • PHP Designer 2007 Personal Edition
    • Eclipse PHP Development Tools (PDT)
    • NotePad++ (Don't Really Use Much But I Could Give It A Try)

    So What do you think out of those 6?

Thank You Very Much For Your Time...

Is This A Good Question/Topic? 0
  • +

Replies To: Have A Couple Of Questions Related To PHP?

#2 ghqwerty   User is offline

  • if($spareTime > 0){ $this->writeCode(); }
  • member icon

Reputation: 43
  • View blog
  • Posts: 903
  • Joined: 08-August 08

Re: Have A Couple Of Questions Related To PHP?

Posted 13 February 2010 - 12:10 PM

yes, post and get must be capitalized like $_POST and $_GET

and i personally use NotePad++ and really like it, nice and simple to use.
in editionto this i also use filezilla for my ftp program incase you were wondering ...

regards
Matty
Was This Post Helpful? 3
  • +
  • -

#3 DeathStory   User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 43
  • Joined: 13-November 09

Re: Have A Couple Of Questions Related To PHP?

Posted 13 February 2010 - 01:05 PM

Well my webhost has its own text editor that i use but when i dont use that i use "Notepad++" just because of it's simplicity. I havent used eclipse for php but i used it when i was trying to learn java and it worked pretty well.
Was This Post Helpful? 0
  • +
  • -

#4 Guest_westforduk*


Reputation:

Re: Have A Couple Of Questions Related To PHP?

Posted 13 February 2010 - 01:21 PM

PHP Designer is very nice, but I would go for Komodo edit which is a good all rounder.
Was This Post Helpful? 0

#5 westforduk   User is offline

  • D.I.C Head

Reputation: 24
  • View blog
  • Posts: 140
  • Joined: 16-August 07

Re: Have A Couple Of Questions Related To PHP?

Posted 13 February 2010 - 01:22 PM

Last reply was mine, but I am special and forgot to sign in :)
Was This Post Helpful? 0
  • +
  • -

#6 TheFlamingCode   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-February 10

Re: Have A Couple Of Questions Related To PHP?

Posted 13 February 2010 - 01:28 PM

View Postghqwerty, on 13 February 2010 - 11:10 AM, said:

yes, post and get must be capitalized like $_POST and $_GET

and i personally use NotePad++ and really like it, nice and simple to use.
in editionto this i also use filezilla for my ftp program incase you were wondering ...

regards
Matty

Thank you Matty as this is just what I wanted to know. Also, I too use FileZilla for my FTP program as I do not see a point in buying something like WS_FTP Pro when I can get pretty much what I need right in FileZilla which is free!

Now with your post DeathStory:

View PostDeathStory, on 13 February 2010 - 12:05 PM, said:

Well my webhost has its own text editor that i use but when i dont use that i use "Notepad++" just because of it's simplicity. I havent used eclipse for php but i used it when i was trying to learn java and it worked pretty well.

I agree with the fact of a simple text editor as I do not like simplicity in a text editor, but I do disagree with using your WebHost's Editor as I despise it with all my guts!

Again thank you both for your responces...
Was This Post Helpful? 0
  • +
  • -

#7 westforduk   User is offline

  • D.I.C Head

Reputation: 24
  • View blog
  • Posts: 140
  • Joined: 16-August 07

Re: Have A Couple Of Questions Related To PHP?

Posted 14 February 2010 - 07:38 AM

View PostDeathStory, on 13 February 2010 - 12:05 PM, said:

Well my webhost has its own text editor that i use but when i dont use that i use "Notepad++" just because of it's simplicity. I havent used eclipse for php but i used it when i was trying to learn java and it worked pretty well.


I agree with Flaming, the text editors on webhosts are horrible, but sometimes have to be used if there is no other option. Another option is maybe an online PHP IDE such as http://phpanywhere.net/ which you might find useful if working from a number of places, or a limited install rights on a system.
Was This Post Helpful? 0
  • +
  • -

#8 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3837
  • View blog
  • Posts: 13,997
  • Joined: 08-August 08

Re: Have A Couple Of Questions Related To PHP?

Posted 14 February 2010 - 12:01 PM

Since you're learning php I'll make a couple of suggestions.

1.) Avoid doing this:
<html>
<head></head>
<body>

<?php


At some point you're going to want to use the header() function and it will choke if anything is output to the browser before it.

2.) Learn OOP. Procedural code quickly gets to be too large to manage in any language. Throw in a bunch of html and if you don't have structure to your code you'll be lost in no time.

This post has been edited by CTphpnwb: 14 February 2010 - 12:04 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1