+ Reply to Thread
Results 1 to 7 of 7

Thread: HTML & PHP Form

  1. #1
    YASANI is offline x10Hosting Member YASANI is an unknown quantity at this point
    Join Date
    Feb 2009
    Posts
    3

    HTML & PHP Form

    Hello everyone;

    I am really new in web design and trying to learn PHP!!

    Any how, I want to creat a from of course action to PHP and will be using Dreamwaver.

    My question is : What is the different between making a from starting as new PHP and as new html page?

    does this make a different? if so what features?

    I do not want in one of them then find the feature I want in the other.

    Any help will be appriciated

    YASANI

  2. #2
    kundamor is offline x10Hosting Member kundamor is an unknown quantity at this point
    Join Date
    Oct 2008
    Posts
    36

    Re: HTML & PHP Form


  3. #3
    DeadBattery's Avatar
    DeadBattery is offline Community Support Team DeadBattery is a name known to allDeadBattery is a name known to all
    Join Date
    Mar 2008
    Location
    localhost
    Posts
    4,019

    Re: HTML & PHP Form

    What exactly are you trying to do?
    Do you want the form to be on an HTML page then have a PHP page process it (action)?


  4. #4
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: HTML & PHP Form

    What I seem to understand is : What are the advantages/disadvantages of using php or html for a form?

    If so, here is the differences:
    When you set up a form on an html page, there is no backend processing. This means that the page is transfered to the client as is: you cannot change it dynamically.
    Whereas, when using php, you can construct the page dynamically, so that it includes details that may change.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  5. #5
    sourfacedcyclop's Avatar
    sourfacedcyclop is offline x10 Sophmore sourfacedcyclop is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    221

    Re: HTML & PHP Form

    I am sorta confused, I can't say I know a lot about php, but i'm pretty sure you can't make a form which sends data with HTML unless you want to use the mailto function or something. Do you mean having the php inside of the initial html form page where the action of the form is repeating the page and if there is input, processing the form?

  6. #6
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: HTML & PHP Form

    for example, if you have a form and want to use it to send an email, the form would look something like this:

    HTML Code:
    <form name="mailForm" action="process.php" method="post">
    
    <textarea name="message" value=""></textarea>
    
    <input type="submit" value="Submit" />
    
    </form>
    this then sends the data from the textarea to process.php:

    PHP Code:

    <?php

    $message 
    $_REQUEST['message'] ;        // takes info sent from the form
    $sent mail('you@domain.com','subject here',$message,'From: Your Site');        // attempts to send message and stores result in variable $sent

    if ( $sent ){        // if message send succeeds
        
    echo '<h1>Message Sent Successfully!</h1>';
    }
    else{        
    // if message send fails
        
    echo '<h1>Message Failed!</h1>';
    }

    ?>
    you can process your data however you want based on what you're trying to do, but thats how forms work.

  7. #7
    YASANI is offline x10Hosting Member YASANI is an unknown quantity at this point
    Join Date
    Feb 2009
    Posts
    3

    Re: HTML & PHP Form

    Dead Battery Exactlly I want to have html page (with form ) but then to be processed PHP, but advantages xav0989 seem that he answered my question, thanks to all

+ Reply to Thread

Similar Threads

  1. PHP contact form styling (line spacing)
    By xxll_martin_llxx in forum Programming Help
    Replies: 3
    Last Post: 07-24-2008, 10:09 AM
  2. PHP Contact Form Help
    By KeybladeSephi in forum Programming Help
    Replies: 5
    Last Post: 04-02-2008, 11:29 PM
  3. Addon Domain PHP Form Error
    By rockee in forum Free Hosting
    Replies: 2
    Last Post: 04-02-2008, 06:53 PM
  4. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  5. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers