Adding a PHP script

Discussion in 'Programming' started by Richardf, Sep 5, 2006.

  1. #1
    Hi there,

    Could someone recommend a decent tutorial that explained to me how to add a PHP script to a website. I am using Dreamweaver, but I know nothing about scripts, so I kind of was hoping for a really simple tutorial

    The scripts that I am hoping to eventually add are a contact us form and send to a friend form and call me back form

    Thanks
     
    Richardf, Sep 5, 2006 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,826
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Dreamweaver tutorials should include all of this. but start with a simple script called contact.php

    put in the file
    <html>
    <head>
    <title>Contact Us</title>
    </head>
    <body>
    <?php
    echo "hello!";
    ?>
    </body>
    </html>
    Code (markup):
    Get used to viewing the code to see how the script differs from the html. Inside the <?php ?> tags is the stuff that php will process. Everything else is straight html that you should already be used to.

    Check out some good tutorials and don't be afraid to play about a bit before you start with anything you actually plan to use.
     
    sarahk, Sep 5, 2006 IP
  3. smatts9

    smatts9 Active Member

    Messages:
    1,089
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    88
    #3
    smatts9, Sep 5, 2006 IP
  4. Crazy4Bass

    Crazy4Bass Well-Known Member

    Messages:
    174
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    138
    #4
    The Zend Developer Zone has some excellent tutorials and smaple script from easy to complex with decent explanations.
    h**p://devzone.zend.com/public/view
     
    Crazy4Bass, Sep 5, 2006 IP
  5. starke

    starke Active Member

    Messages:
    228
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Yeah, you'll be able to do this in no time....

    I'd search phpfreaks.com, tigzag.com and there are a few others for a simple mail script and the explaination...

    Don't worry... it's not to intensive, and you will be able to do something with the action with the posts and gets of the form...
     
    starke, Sep 5, 2006 IP
  6. sarahk

    sarahk iTamer Staff

    Messages:
    28,826
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #6
    One thing about mail and forms is that there are some nasty exploits and hacks and you need to be careful with the data you recieve.

    phpMailer is good at ensuring your code is safe - plus it sends good emails. I'd recommend taking a look - it's a good learning exercise too!
     
    sarahk, Sep 5, 2006 IP