what is: form action="/"?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zhidian Du

    what is: form action="/"?

    I am using java to write to url, http://fatigo.bioinfo.cnio.es/ , but
    I found the form is :

    <form method="post" action="/" enctype="multip art/form-data"
    name="fatigo">


    I have no idea why the action is not a URL, can you explain it why.

    Thanks.
  • Michael Wilcox

    #2
    Re: what is: form action=&quot;/&quot;?

    Zhidian Du wrote:[color=blue]
    > <form method="post" action="/" enctype="multip art/form-data"
    > name="fatigo">[/color]
    [color=blue]
    > I have no idea why the action is not a URL, can you explain it why.[/color]

    The slash in the action attribute means the form will send the data to
    the root page, probably the home page.
    --
    Michael Wilcox, http://mikewilcox.t35.com/

    Comment

    • Brian

      #3
      Re: what is: form action=&quot;/&quot;?

      Zhidian Du wrote:[color=blue]
      > I am using java to write to url, http://fatigo.bioinfo.cnio.es/ , but
      > I found the form is :
      >
      > <form method="post" action="/" enctype="multip art/form-data"
      > name="fatigo">
      >
      > I have no idea why the action is not a URL,[/color]

      It is a url -- a relative url that points to the root of the server
      where the form is access from. Is that where the form script is?

      --
      Brian (remove ".invalid" to email me)

      Comment

      • Mark Tranchant

        #4
        Re: what is: form action=&quot;/&quot;?

        Zhidian Du wrote:[color=blue]
        > I am using java to write to url, http://fatigo.bioinfo.cnio.es/ , but
        > I found the form is :
        >
        > <form method="post" action="/" enctype="multip art/form-data"
        > name="fatigo">
        >
        >
        > I have no idea why the action is not a URL, can you explain it why.[/color]

        The action is a URL: it is the URL whatever the server is configured to
        serve at the root of the current webspace. It could be "index.php" for
        example.

        It's the same mechanism that allows you to type:



        instead of



        --
        Mark.

        Comment

        Working...