1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

[PHP TUTS] Basic to Pro PHP Tutorials

Discussion in 'PHP' started by Beginn3R, Jun 28, 2009.

  1. #1
    Hi, im new on this site and this is my first PHP Tutorial :D
    I have expirence with php in 5 years now so im quite good :p
    Ok but as you can see my forum name is Beginn3R and i use it almost everywhere.
    Ok enough if that, let the tutorials begin.
    First i will explain some basic commands in php.
    <?
    # This will print a text that you wrote betwheen the " " #
    echo "Hello world";
    ?>
    PHP:
    <?
    # This will print a text that you wrote betwheen the " " #
    print "Hello world";
    ?>
    PHP:
    That is some basic text writing/printing command.
    With print i dont mean like print it out of printer.
    Print in php language means that it write a text into the site.
    PHP is not like html that you just need to write something to see it.
    If you just write something in php you will get errors.
    Here is a basic php script that can be handy.
    First of all open notepad and write:
    Hi what is your name?<br>
    <form action="name.php" method="post">
    <input type="text" name="name" value="">
    </form>
    PHP:
    Save that as index.php or hi.php, you decide.
    Now make a new document or just: File > New
    Now write:
    <?
    $name = $_POST["name"]; ' This will get the value from the textbox named name
    ?>
    <font face="verdana" size="1"> Hi <? echo "$name"; ' This will get the data from the string name and print it ?>, My name is blabla</font>
    PHP:
    Now save it as name.php and you got you script done :D

    Keep updated. i will keep this post updated with more tutorials that is easy and hard!

    Beginn3R aka. Ismail :D
     
    Beginn3R, Jun 28, 2009 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Some nice beginner advice.
    Remember for comments in your PHP code you can just do:
    #This is a comment
    you don't have to add another hash like
    #This is a comment#

    Also don't forget the second file in the last tutorial must be saved as name.php
     
    wd_2k6, Jun 28, 2009 IP
  3. Beginn3R

    Beginn3R Peon

    Messages:
    120
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I know but it is cool like that :p
     
    Beginn3R, Jun 28, 2009 IP
  4. dannywwww

    dannywwww Well-Known Member

    Messages:
    804
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    110
    #4
    No offense, but people can just visit W3schools for the basic stuff.
     
    dannywwww, Jun 28, 2009 IP
  5. RadioBounce

    RadioBounce Banned

    Messages:
    4,171
    Likes Received:
    16
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Yes, people can visit W3schools and it is a very valuble resource but sometimes it can get a bit wordy and it makes it kind of hard to understand so sometimes it's better when other people explain it. Thanks!
     
    RadioBounce, Jun 28, 2009 IP
  6. HivelocityDD

    HivelocityDD Peon

    Messages:
    179
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    To add to the comment in php

    You can use

    // single line commenting

    /*
    multiple line commenting

    */

    Also Thanks for taking an effort and sharing your knowledge to others :)
     
    HivelocityDD, Jun 28, 2009 IP
  7. Beginn3R

    Beginn3R Peon

    Messages:
    120
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I know lol :p
    I just wanna do like this, ill soon update the post with more tutorials xD
     
    Beginn3R, Jul 11, 2009 IP
  8. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #8
    What kind of advanced tutorials are you going to provide ?
     
    Bohra, Jul 11, 2009 IP
  9. Dirty-Rockstar

    Dirty-Rockstar Guest

    Messages:
    252
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Dirty-Rockstar, Jul 12, 2009 IP
  10. The-host

    The-host Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Maybe make some tutorial for common script like a secure usersystem or so, that'll sure be a hit if it's right.
     
    The-host, Jul 12, 2009 IP
  11. Beginn3R

    Beginn3R Peon

    Messages:
    120
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    That will be my next tutorials.
    A Usersystem that is secured alot ;)
    MD5 encryption for pass and more :)
     
    Beginn3R, Jul 13, 2009 IP
  12. Staris

    Staris Peon

    Messages:
    75
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Thanks man! Could you help with Php > Paypal?

    Need PHP to charge someone $x.
     
    Staris, Jul 13, 2009 IP
  13. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #13
    open a blog with tutorials
     
    crivion, Jul 14, 2009 IP
  14. vnttn

    vnttn Guest

    Messages:
    358
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Thanks! I'm waiting for you.

    You can write down on your blog and show it to all!
     
    vnttn, Jul 14, 2009 IP
  15. Beginn3R

    Beginn3R Peon

    Messages:
    120
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    MD5 & SHA1 Encryption will be added today :)
    I can add it now, but i cant edit my posts :S
     
    Beginn3R, Jul 21, 2009 IP
  16. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #16
    theres lots of tutorial sites and books, the forum is probably not the bets place to post mass random tutorial code all at once.. lol
     
    ezprint2008, Jul 21, 2009 IP