SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: Forms

  1. #1
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Forms

    I am part of the 'grey power' brigade and having a go at teaching myself. At the moment I feel I'm not doing to bad, cruising along nicely. I have now hit a bit that's irritating me.

    <form method="post" action="php script">

    I'm aware that "post" can also be "get" and the php script is, or can be, written into a html page, located with server and can direct in several ways including a direct email reply.

    If the method is "get" and action=" " or doesn't indicate an email reply how do I recieve any replies, I'm assuming that it is an automatic system, does it arrive as an email or something else? or does it even arrive at all.

    I wouldn't mind some sort of flowchart if anyone knows of one. Kev

  2. #2
    SitePoint Zealot
    Join Date
    Sep 2008
    Location
    HidePoint
    Posts
    195
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What exactly do u want.?? u want the the forum to send you an email ?

  3. #3
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wouldn't mind some sort of flowchart if anyone knows of one.
    That depends on the recieving script:

    - When submitted the method GET sends the inputs as a string in the url or the POST "attaches" the data to that variabel.
    - The recieving script takes the GET or POST and process the data. E.g. opens a page with search result (use GET) send an email or store the submitting (use POST).
    Happy ADD/ADHD with Asperger's

  4. #4
    SitePoint Member
    Join Date
    May 2007
    Location
    Europe
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use some free forms like emailmeform or or cforms, it work very well

  5. #5
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    erik.j

    Thank you for replying, I'm gradually getting there.
    Would you please carry on and clear up one or two points that I'm not to clear on.
    <form method="get" action=" ">
    Can I use action=" " note the use of empty quotes, I have placed a space between the quotes for clarity.
    I would like to know if this would be enough to get feedback from the form via the server to my computer and how would this feedback arrive, would I find it in my email or some other way, or would I need to go to the server and request the feedback.

    cheers....kevin

  6. #6
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Without action nothing will happen, the submitting need to be sent to a script of some type that can use the sendmail on your server. Ask your host for information how to use their formmail script. Example of such script.

    Hope this is the info you need.
    Happy ADD/ADHD with Asperger's

  7. #7
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The method attribute specifies which HTTP method will be used for passing the form information to the receiving application. With method="get" you'll use an HTTP GET request where the form parameters are sent as part of the URI. With method="post" you'll use an HTTP POST request where the form parameters are sent in the request body.

    The action attribute specifies the URI to which the information is sent (by GET or POST). It cannot be empty. Normally it's the URI of a server-side script or program that does something useful with the information, like storing it in a database or sending it as an email.

    Some browsers also accept a mailto: URI and will then open the user's default email application, putting the key/value pairs of the parameters in the message body. This isn't very useful, especially for users with webmail accounts.

    If you want the form information sent as an email, you should have a server-side script that sends the email. There are some security considerations that need to be taken into account for such a script, to prevent it from being abused by spammers.

    The action attribute is required, and the behaviour is undefined for anything other than an HTTP URI. So action="" is not a good idea.
    Birnam wood is come to Dunsinane

  8. #8
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've just re-read my original question, I have to admit my grammer isn't that clear, plus I also need to go back to the drawing board. The reason for asking the question was that I assumed that getting form data returned to the site owner or vendor was an automatic function and that an 'action script' was only required to change the parameters/style etc. of the returning information. Thinking of it as an automatic function totally confused the issue for me. Thanks for everyones help.

  9. #9
    SitePoint Enthusiast
    Join Date
    Oct 2008
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He thinks that he can send something to a page without any coding.

    It is not an automated system

    You need to use a php script to handle the item. Also, you cant do just:


    <form method="post" action="php script">.

    You have to do

    <form method="post" action="phpscript.php">

    If you wanted to learn how to really function i suggest that you grab a book about php and mysql so that you can do the script you wanted to do


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
  •