Closed Thread
Results 1 to 9 of 9

Thread: Help with PHP

  1. #1
    Member owo is an unknown quantity at this point
    Join Date
    May 2002
    Posts
    53

    Help with PHP

    Hi i need some help how would i go about if i had a form and when called say file.php?send it would post that info to a place?

  2. #2
    VIP conkermaniac is on a distinguished road conkermaniac's Avatar
    Join Date
    Dec 2001
    Location
    China--soon to be Cambridge MA
    Posts
    5,794
    Hi owo,

    I'm not quite sure what you mean. But if you had a form called form.php:

    Code:
    <html>
    <head><title>Form</title></head>
    <body>
    <form action="submit.php" method="post">
    <input type="text" name="firstname"><br><br>
    <input type="radio" name="mycolor" value="blue"><br>
    <input type="radio" name="mycolor" value="red"><br>
    <input type="radio" name="mycolor" value="green"><br><br>
    <textarea name="weirdcomments"></textarea><br><br>
    <input type="submit">
    </form>
    </body></html>
    Then on a separate page (submit.php), these are the variables that have been transferred from form.php: $firstname, $mycolor, and $weirdcomments. Does that make sense?
    a.aimoo.com - Get your forum reviewed here!
    desilva.biz - Great webmaster tips and tricks!
    webmaster-talk.com - Discussion forum for all webmasters

  3. #3
    Member owo is an unknown quantity at this point
    Join Date
    May 2002
    Posts
    53

    yes

    yes thats what i have but how do i send it to a html page ?

  4. #4
    FWS Addict kabatak will become famous soon enough kabatak's Avatar
    Join Date
    Jul 2002
    Posts
    898
    you can't, your page must be in php also

  5. #5
    Member owo is an unknown quantity at this point
    Join Date
    May 2002
    Posts
    53
    ok what would it be in php?

  6. #6
    FWS Addict kabatak will become famous soon enough kabatak's Avatar
    Join Date
    Jul 2002
    Posts
    898
    just do what conkermaniac said... but if you don't know it exactly, use print(); to display the form results like
    PHP Code:
    // submit.php
    print("$firstname <br>"); 
    print(
    "$mycolor <br>");
    print(
    "$weirdcomments"); 
    but the prefered way is this
    PHP Code:
    // register globals is off
    print("$_POST[firstname] <br>");
    print(
    "$_POST[mycolor] <br>");
    print(
    "$_POST[weirdcomments] <br>"); 
    Last edited by kabatak; April 9th, 2003 at 12:33.

  7. #7
    Member owo is an unknown quantity at this point
    Join Date
    May 2002
    Posts
    53
    no thats not what i want say i submit it to submit.php i want submit.php to forward the infomation posted to another php page

  8. #8
    FWS Addict kabatak will become famous soon enough kabatak's Avatar
    Join Date
    Jul 2002
    Posts
    898
    thats basically the point, you make another page with those code.

  9. #9
    Member owo is an unknown quantity at this point
    Join Date
    May 2002
    Posts
    53

    thx

    oh ok thx

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts