php-windows Digest 15 Aug 2002 01:18:15 -0000 Issue 1289

Topics (messages 15252 through 15270):

Re: errors while uploading my php site ...... ! ! ! !
        15252 by: Brian 'Bex' Huff

Re: PHP & "POST"
        15253 by: Samura1
        15254 by: Svensson, B.A.T. (HKG)
        15255 by: brother
        15256 by: Samura1
        15257 by: Samura1
        15258 by: Svensson, B.A.T. (HKG)
        15259 by: Scott Carr
        15260 by: Samura1
        15261 by: dash php
        15262 by: Daniel Masson
        15263 by: Svensson, B.A.T. (HKG)
        15264 by: Svensson, B.A.T. (HKG)
        15266 by: Luis Ferro

Re: php cookie / session problem
        15265 by: Arijit Chaudhuri
        15267 by: Scott Carr

Power Function In PHP 4.2.2
        15268 by: Andrew V. Romero

AllowPathInfoForScriptMappings in IIS5 (was Re: [PHP] URL path question)
        15269 by: Seairth Jacobs

Problem using  COM, specifically the FileScriptingObject
        15270 by: Kyle

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---

The only reason why you'd be getting those session and header error 
messages is if you output some html (even a few blank lines) on your PHP 
page before the cookie functions are called.

It looks like you have a wrapper PHP page called 'styl.php', in which 
you reference an include 'lgn3.php', where you set some header stuff. 
This is probably not working becuse 'styl.php' is setting some 
stylesheets, or outputting some html before it references 'lgn3.php'. 
If that is the case, it just wont work.

I'd consider pulling out all your header/session/cookie crap out of 
'lgn3.php', and into a seperate page, and then including it at the 
ABSOLUTE top of 'styl.php'.

Check out the documentation on the 'header' function for more info...

-- 

Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424


--- End Message ---
--- Begin Message ---
First, I don't know how to use POST, is it just changing the value GET in
the form to POST?
Secondly, because I don't know where does it send to, I don't know where to
get it, and I don't know how to get it even I know... so.......
Anyone can show me an example coding for POST and how to get the data from
POST pls....

"B.A.T. Svensson" <[EMAIL PROTECTED]>
???????:000001c24381$9ebbb8a0$[EMAIL PROTECTED]
> Have you tried this URL yet:
http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
> (www.w3.org might want to be your first choice when your are looking for
specifications
> details about HTML and HTTP transfers.)
>
> Also remember that GET is restricted to ASCII transfers, and if you
happens
> to have binary data you should uses POST.
>
> But more precisly what are your problems:
>
> 1) can't post the data
> 2) can't get the values from posted data
> 3) something else
>
> ??
>
> Cheers,
> Anders
>
> > -----Original Message-----
> > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 14, 2002 12:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] PHP & "POST"
> >
> >
> > Hey guys,
> > I want to know how to retrieve data from POST (form) ...
> >
> > What I want to do is...
> >
> > I've got a textarea for ppl to enter large amount of text (essay), and I
let
> > ppl submit it (using POST), then insert these data into mySQL.
> >
> > I get it working if I use GET (I only know how to use GET, dunno about
POST)
> > with small amount of words (say 1600 characters), but when there are
more
> > than 2000 characters, the submit button doesn't work. And I found that
it is
> > becoz GET does not allow too large amount of text appear in the URL...
> >
> > So anyone can teach me how to get data from POST? I read some web sites
but
> > still have no idea how to do it ... I think I need an example...
> >
> > Please help
> >


--- End Message ---
--- Begin Message ---
Well lest go trough the basic steps then (but I still recomend you to visist the 
www.w3.org
and realy spend some time trying to understand the specifications - it will save you 
lots
of headache in the future...):

First you start with the FORM tag:

  <form method=POST action=start.asp>

Here we see two attributes METHOD and ACTION.

METHOD should be POST in our case, and the ACTION is a pointer to a page that should
be handling the FORM request. In this case that page is called START.ASP, in your
case it should probably be with the file extension .PHP.


What we then need is some interactive input fields:

          <select name=Tissue>
            <option value=0>Unspecified</option>
            <option value=1>Brain</option>
            <option value=2>Eye</option>
            <option value=3>Liver</option>
            <option value=4>Heart</option>
            <option value=5>Muscel</option>
            <option value=5>Splein</option>
          </select>

We choice to display a drop down menu with some various items found
in the OPTION-tag. The SELECT as to be refereed with a NAME so we can
refer to it once the START.ASP page is loaded. The name of the variable
that START.ASP will be able to figure out which option we select will
hence be "Tissue".

Finally we need a button to be able to submit the selected data:

          <input type=submit value='Go now' name=Submit>

And then we ends the form: 

  </FORM>

Once we press the "Go Now" button, the form data will be posted to the 
webserver, but the handlig page (START.ASP) need a script to extract
the data. This is done like this is VBScript:

   Tissue = Request.Form("Tissue")


In PHP I think a reference to a posted variable is done something like this:

       $HTTP_POST_VARS['Tissue'];

Knowing this it should be a quite simple to continue with whatever you need to do.

Check this link for more details about POSTing: 

http://www.php.net/manual/en/language.variables.external.php#language.variables.external.form

If you want to uplaod a file instead, you might want to check this out:

http://www.php.net/manual/en/features.file-upload.php


Cheers,
Anders

> -----Original Message-----
> From: Samura1 [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 5:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] PHP & "POST"
> 
> 
> First, I don't know how to use POST, is it just changing the value GET in
> the form to POST?
> Secondly, because I don't know where does it send to, I don't know where to
> get it, and I don't know how to get it even I know... so.......
> Anyone can show me an example coding for POST and how to get the data from
> POST pls....
> 
> "B.A.T. Svensson" <[EMAIL PROTECTED]>
> ???????:000001c24381$9ebbb8a0$[EMAIL PROTECTED]
> > Have you tried this URL yet:
> http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
> > (www.w3.org might want to be your first choice when your are looking for
> specifications
> > details about HTML and HTTP transfers.)
> >
> > Also remember that GET is restricted to ASCII transfers, and if you
> happens
> > to have binary data you should uses POST.
> >
> > But more precisly what are your problems:
> >
> > 1) can't post the data
> > 2) can't get the values from posted data
> > 3) something else
> >
> > ??
> >
> > Cheers,
> > Anders
> >
> > > -----Original Message-----
> > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, August 14, 2002 12:32 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-WIN] PHP & "POST"
> > >
> > >
> > > Hey guys,
> > > I want to know how to retrieve data from POST (form) ...
> > >
> > > What I want to do is...
> > >
> > > I've got a textarea for ppl to enter large amount of text (essay), and I
> let
> > > ppl submit it (using POST), then insert these data into mySQL.
> > >
> > > I get it working if I use GET (I only know how to use GET, dunno about
> POST)
> > > with small amount of words (say 1600 characters), but when there are
> more
> > > than 2000 characters, the submit button doesn't work. And I found that
> it is
> > > becoz GET does not allow too large amount of text appear in the URL...
> > >
> > > So anyone can teach me how to get data from POST? I read some web sites
> but
> > > still have no idea how to do it ... I think I need an example...
> > >
> > > Please help
> > >
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]] 
> 
> Once we press the "Go Now" button, the form data will be 
> posted to the 
> webserver, but the handlig page (START.ASP) need a script to extract
> the data. This is done like this is VBScript:
> 
>    Tissue = Request.Form("Tissue")
> 
> 
> In PHP I think a reference to a posted variable is done 
> something like this:
> 
>        $HTTP_POST_VARS['Tissue'];

http://www.php.net/manual/en/reserved.variables.php

$_POST['Tissue'];



---manual entry---
HTTP GET variables: $_GET
Note: Introduced in 4.1.0. In earlier versions, use $HTTP_GET_VARS. 

An associative array of variables passed to the current script via the HTTP
GET method. Automatically global in any scope. 

This is a 'superglobal', or automatic global, variable. This simply means
that it is available in all scopes throughout a script. You don't need to do
a global $_GET; to access it within functions or methods, as you do with
$HTTP_GET_VARS. 

$HTTP_GET_VARS contains the same initial information, but is not an
autoglobal. (Note that HTTP_GET_VARS and $_GET are different variables and
that PHP handles them as such) 

If the register_globals directive is set, then these variables will also be
made available in the global scope of the script; i.e., separate from the
$_GET and $HTTP_GET_VARS arrays. For related information, see the security
chapter titled Using Register Globals. These individual globals are not
autoglobals. 





HTTP POST variables: $_POST
Note: Introduced in 4.1.0. In earlier versions, use $HTTP_POST_VARS. 

An associative array of variables passed to the current script via the HTTP
POST method. Automatically global in any scope. 

This is a 'superglobal', or automatic global, variable. This simply means
that it is available in all scopes throughout a script. You don't need to do
a global $_POST; to access it within functions or methods, as you do with
$HTTP_POST_VARS. 

$HTTP_POST_VARS contains the same initial information, but is not an
autoglobal. (Note that HTTP_POST_VARS and $_POST are different variables and
that PHP handles them as such) 

If the register_globals directive is set, then these variables will also be
made available in the global scope of the script; i.e., separate from the
$_POST and $HTTP_POST_VARS arrays. For related information, see the security
chapter titled Using Register Globals. These individual globals are not
autoglobals. 



/brother
--- End Message ---
--- Begin Message ---
Hey man, your post is very helpful ...

But actually, I just found out the solution on the web...
You know what, most web sites are just telling you what does it do (submit
to the server, header...$#&Q*^$@#) , but doesn't give u an example...

Until I just found an example on the web, make my mind much clearer...

And your example is exactly what I need before...

Thanks anyway..



"B.A.T. Svensson" <[EMAIL PROTECTED]>
???????:000601c243a6$fb3b12e0$[EMAIL PROTECTED]
> Well lest go trough the basic steps then (but I still recomend you to
visist the www.w3.org
> and realy spend some time trying to understand the specifications - it
will save you lots
> of headache in the future...):
>
> First you start with the FORM tag:
>
>   <form method=POST action=start.asp>
>
> Here we see two attributes METHOD and ACTION.
>
> METHOD should be POST in our case, and the ACTION is a pointer to a page
that should
> be handling the FORM request. In this case that page is called START.ASP,
in your
> case it should probably be with the file extension .PHP.
>
>
> What we then need is some interactive input fields:
>
>           <select name=Tissue>
>             <option value=0>Unspecified</option>
>             <option value=1>Brain</option>
>             <option value=2>Eye</option>
>             <option value=3>Liver</option>
>             <option value=4>Heart</option>
>             <option value=5>Muscel</option>
>             <option value=5>Splein</option>
>           </select>
>
> We choice to display a drop down menu with some various items found
> in the OPTION-tag. The SELECT as to be refereed with a NAME so we can
> refer to it once the START.ASP page is loaded. The name of the variable
> that START.ASP will be able to figure out which option we select will
> hence be "Tissue".
>
> Finally we need a button to be able to submit the selected data:
>
>           <input type=submit value='Go now' name=Submit>
>
> And then we ends the form:
>
>   </FORM>
>
> Once we press the "Go Now" button, the form data will be posted to the
> webserver, but the handlig page (START.ASP) need a script to extract
> the data. This is done like this is VBScript:
>
>    Tissue = Request.Form("Tissue")
>
>
> In PHP I think a reference to a posted variable is done something like
this:
>
>        $HTTP_POST_VARS['Tissue'];
>
> Knowing this it should be a quite simple to continue with whatever you
need to do.
>
> Check this link for more details about POSTing:
>
>
http://www.php.net/manual/en/language.variables.external.php#language.variab
les.external.form
>
> If you want to uplaod a file instead, you might want to check this out:
>
> http://www.php.net/manual/en/features.file-upload.php
>
>
> Cheers,
> Anders
>
> > -----Original Message-----
> > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 14, 2002 5:01 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] PHP & "POST"
> >
> >
> > First, I don't know how to use POST, is it just changing the value GET
in
> > the form to POST?
> > Secondly, because I don't know where does it send to, I don't know where
to
> > get it, and I don't know how to get it even I know... so.......
> > Anyone can show me an example coding for POST and how to get the data
from
> > POST pls....
> >
> > "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > ???????:000001c24381$9ebbb8a0$[EMAIL PROTECTED]
> > > Have you tried this URL yet:
> > http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
> > > (www.w3.org might want to be your first choice when your are looking
for
> > specifications
> > > details about HTML and HTTP transfers.)
> > >
> > > Also remember that GET is restricted to ASCII transfers, and if you
> > happens
> > > to have binary data you should uses POST.
> > >
> > > But more precisly what are your problems:
> > >
> > > 1) can't post the data
> > > 2) can't get the values from posted data
> > > 3) something else
> > >
> > > ??
> > >
> > > Cheers,
> > > Anders
> > >
> > > > -----Original Message-----
> > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, August 14, 2002 12:32 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP-WIN] PHP & "POST"
> > > >
> > > >
> > > > Hey guys,
> > > > I want to know how to retrieve data from POST (form) ...
> > > >
> > > > What I want to do is...
> > > >
> > > > I've got a textarea for ppl to enter large amount of text (essay),
and I
> > let
> > > > ppl submit it (using POST), then insert these data into mySQL.
> > > >
> > > > I get it working if I use GET (I only know how to use GET, dunno
about
> > POST)
> > > > with small amount of words (say 1600 characters), but when there are
> > more
> > > > than 2000 characters, the submit button doesn't work. And I found
that
> > it is
> > > > becoz GET does not allow too large amount of text appear in the
URL...
> > > >
> > > > So anyone can teach me how to get data from POST? I read some web
sites
> > but
> > > > still have no idea how to do it ... I think I need an example...
> > > >
> > > > Please help
> > > >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >


--- End Message ---
--- Begin Message ---
One more thing,
I found that POST is better than GET as user won't see the variables ....
But there must be a disadvantage of POST, otherwise, no one use GET...
do you know what are the disadvantages of POST?

Thank you.

p.s and I'm looking for a very good website which talk about when you should
use this or when you shouldn't use this on PHP (including reasons) ... if u
know, pls let me know... as I'm a DIY learner, just trying everything out
but dunno it's a good way to do or not...


"Samura1" <[EMAIL PROTECTED]> 撰寫於郵件新聞
:[EMAIL PROTECTED]
> Hey man, your post is very helpful ...
>
> But actually, I just found out the solution on the web...
> You know what, most web sites are just telling you what does it do (submit
> to the server, header...$#&Q*^$@#) , but doesn't give u an example...
>
> Until I just found an example on the web, make my mind much clearer...
>
> And your example is exactly what I need before...
>
> Thanks anyway..
>
>
>
> "B.A.T. Svensson" <[EMAIL PROTECTED]>
> ???????:000601c243a6$fb3b12e0$[EMAIL PROTECTED]
> > Well lest go trough the basic steps then (but I still recomend you to
> visist the www.w3.org
> > and realy spend some time trying to understand the specifications - it
> will save you lots
> > of headache in the future...):
> >
> > First you start with the FORM tag:
> >
> >   <form method=POST action=start.asp>
> >
> > Here we see two attributes METHOD and ACTION.
> >
> > METHOD should be POST in our case, and the ACTION is a pointer to a page
> that should
> > be handling the FORM request. In this case that page is called
START.ASP,
> in your
> > case it should probably be with the file extension .PHP.
> >
> >
> > What we then need is some interactive input fields:
> >
> >           <select name=Tissue>
> >             <option value=0>Unspecified</option>
> >             <option value=1>Brain</option>
> >             <option value=2>Eye</option>
> >             <option value=3>Liver</option>
> >             <option value=4>Heart</option>
> >             <option value=5>Muscel</option>
> >             <option value=5>Splein</option>
> >           </select>
> >
> > We choice to display a drop down menu with some various items found
> > in the OPTION-tag. The SELECT as to be refereed with a NAME so we can
> > refer to it once the START.ASP page is loaded. The name of the variable
> > that START.ASP will be able to figure out which option we select will
> > hence be "Tissue".
> >
> > Finally we need a button to be able to submit the selected data:
> >
> >           <input type=submit value='Go now' name=Submit>
> >
> > And then we ends the form:
> >
> >   </FORM>
> >
> > Once we press the "Go Now" button, the form data will be posted to the
> > webserver, but the handlig page (START.ASP) need a script to extract
> > the data. This is done like this is VBScript:
> >
> >    Tissue = Request.Form("Tissue")
> >
> >
> > In PHP I think a reference to a posted variable is done something like
> this:
> >
> >        $HTTP_POST_VARS['Tissue'];
> >
> > Knowing this it should be a quite simple to continue with whatever you
> need to do.
> >
> > Check this link for more details about POSTing:
> >
> >
>
http://www.php.net/manual/en/language.variables.external.php#language.variab
> les.external.form
> >
> > If you want to uplaod a file instead, you might want to check this out:
> >
> > http://www.php.net/manual/en/features.file-upload.php
> >
> >
> > Cheers,
> > Anders
> >
> > > -----Original Message-----
> > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, August 14, 2002 5:01 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [PHP-WIN] PHP & "POST"
> > >
> > >
> > > First, I don't know how to use POST, is it just changing the value GET
> in
> > > the form to POST?
> > > Secondly, because I don't know where does it send to, I don't know
where
> to
> > > get it, and I don't know how to get it even I know... so.......
> > > Anyone can show me an example coding for POST and how to get the data
> from
> > > POST pls....
> > >
> > > "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > > ???????:000001c24381$9ebbb8a0$[EMAIL PROTECTED]
> > > > Have you tried this URL yet:
> > > http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
> > > > (www.w3.org might want to be your first choice when your are looking
> for
> > > specifications
> > > > details about HTML and HTTP transfers.)
> > > >
> > > > Also remember that GET is restricted to ASCII transfers, and if you
> > > happens
> > > > to have binary data you should uses POST.
> > > >
> > > > But more precisly what are your problems:
> > > >
> > > > 1) can't post the data
> > > > 2) can't get the values from posted data
> > > > 3) something else
> > > >
> > > > ??
> > > >
> > > > Cheers,
> > > > Anders
> > > >
> > > > > -----Original Message-----
> > > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Wednesday, August 14, 2002 12:32 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: [PHP-WIN] PHP & "POST"
> > > > >
> > > > >
> > > > > Hey guys,
> > > > > I want to know how to retrieve data from POST (form) ...
> > > > >
> > > > > What I want to do is...
> > > > >
> > > > > I've got a textarea for ppl to enter large amount of text (essay),
> and I
> > > let
> > > > > ppl submit it (using POST), then insert these data into mySQL.
> > > > >
> > > > > I get it working if I use GET (I only know how to use GET, dunno
> about
> > > POST)
> > > > > with small amount of words (say 1600 characters), but when there
are
> > > more
> > > > > than 2000 characters, the submit button doesn't work. And I found
> that
> > > it is
> > > > > becoz GET does not allow too large amount of text appear in the
> URL...
> > > > >
> > > > > So anyone can teach me how to get data from POST? I read some web
> sites
> > > but
> > > > > still have no idea how to do it ... I think I need an example...
> > > > >
> > > > > Please help
> > > > >
> > >
> > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
>
>


--- End Message ---
--- Begin Message ---
I still think you should invest some time in study the Hyper Text
Transfer Protocol (HTTP) and the Hyper Text Markup Language (HTML)
at www.w3.org, they explain everything you need to know in order to
make an implementation correct: anything else found at the web, or
elsewhere, is derived from those specifications. If you understand
how to read those specifications, you will for about 99,125% never,
ever, need any other sources of help when it comes to the creepy
details.



Cheers,

        /Anders

> -----Original Message-----
> From: Samura1 [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 6:03 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] PHP & "POST"
> 
> 
> Hey man, your post is very helpful ...
> 
> But actually, I just found out the solution on the web...
> You know what, most web sites are just telling you what does it do (submit
> to the server, header...$#&Q*^$@#) , but doesn't give u an example...
> 
> Until I just found an example on the web, make my mind much clearer...
> 
> And your example is exactly what I need before...
> 
> Thanks anyway..
--- End Message ---
--- Begin Message ---
Therein lies the difference.  With POST, you cannot see the variables that are
being passed, because they are passed as a header directly to the server.  With
GET, you see the variables, because they are part of the URL that is passed to
the Server.  

The other difference is in that URL's tend to have a limit on how long they can
be, a post does not.  So if you are planning on using a bunch of Form Variables
you need to use post.  ( OF Course I think the URL limit is somewhere around
32000.  ;-)  )

I use POST if I don't want to worry about directly calling the page through a
link, or if I am passing sensitive information.  (It's not a good idea to hide a
password with * if you are going to just send the form with a GET.)  If I would
want to call the page differently via a Link, I use GET.  

Say you want to call a page in multiple ways via an ActionID.  The ActionID
would be best used as a GET variable, because you could call it from a FORM or a
Direct Link very easily.  (EXAMPLE:  "form.php?ActionID=1")

-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting Samura1 <[EMAIL PROTECTED]>:

> One more thing,
> I found that POST is better than GET as user won't see the variables ....
> But there must be a disadvantage of POST, otherwise, no one use GET...
> do you know what are the disadvantages of POST?
> 
> Thank you.
> 
> p.s and I'm looking for a very good website which talk about when you should
> use this or when you shouldn't use this on PHP (including reasons) ... if u
> know, pls let me know... as I'm a DIY learner, just trying everything out
> but dunno it's a good way to do or not...
> 
> 
> "Samura1" <[EMAIL PROTECTED]> 撰寫於郵件新聞
> :[EMAIL PROTECTED]
> > Hey man, your post is very helpful ...
> >
> > But actually, I just found out the solution on the web...
> > You know what, most web sites are just telling you what does it do (submit
> > to the server, header...$#&Q*^$@#) , but doesn't give u an example...
> >
> > Until I just found an example on the web, make my mind much clearer...
> >
> > And your example is exactly what I need before...
> >
> > Thanks anyway..
> >
> >
> >
> > "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > ???????:000601c243a6$fb3b12e0$[EMAIL PROTECTED]
> > > Well lest go trough the basic steps then (but I still recomend you to
> > visist the www.w3.org
> > > and realy spend some time trying to understand the specifications - it
> > will save you lots
> > > of headache in the future...):
> > >
> > > First you start with the FORM tag:
> > >
> > >   <form method=POST action=start.asp>
> > >
> > > Here we see two attributes METHOD and ACTION.
> > >
> > > METHOD should be POST in our case, and the ACTION is a pointer to a page
> > that should
> > > be handling the FORM request. In this case that page is called
> START.ASP,
> > in your
> > > case it should probably be with the file extension .PHP.
> > >
> > >
> > > What we then need is some interactive input fields:
> > >
> > >           <select name=Tissue>
> > >             <option value=0>Unspecified</option>
> > >             <option value=1>Brain</option>
> > >             <option value=2>Eye</option>
> > >             <option value=3>Liver</option>
> > >             <option value=4>Heart</option>
> > >             <option value=5>Muscel</option>
> > >             <option value=5>Splein</option>
> > >           </select>
> > >
> > > We choice to display a drop down menu with some various items found
> > > in the OPTION-tag. The SELECT as to be refereed with a NAME so we can
> > > refer to it once the START.ASP page is loaded. The name of the variable
> > > that START.ASP will be able to figure out which option we select will
> > > hence be "Tissue".
> > >
> > > Finally we need a button to be able to submit the selected data:
> > >
> > >           <input type=submit value='Go now' name=Submit>
> > >
> > > And then we ends the form:
> > >
> > >   </FORM>
> > >
> > > Once we press the "Go Now" button, the form data will be posted to the
> > > webserver, but the handlig page (START.ASP) need a script to extract
> > > the data. This is done like this is VBScript:
> > >
> > >    Tissue = Request.Form("Tissue")
> > >
> > >
> > > In PHP I think a reference to a posted variable is done something like
> > this:
> > >
> > >        $HTTP_POST_VARS['Tissue'];
> > >
> > > Knowing this it should be a quite simple to continue with whatever you
> > need to do.
> > >
> > > Check this link for more details about POSTing:
> > >
> > >
> >
> http://www.php.net/manual/en/language.variables.external.php#language.variab
> > les.external.form
> > >
> > > If you want to uplaod a file instead, you might want to check this out:
> > >
> > > http://www.php.net/manual/en/features.file-upload.php
> > >
> > >
> > > Cheers,
> > > Anders
> > >
> > > > -----Original Message-----
> > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, August 14, 2002 5:01 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP-WIN] PHP & "POST"
> > > >
> > > >
> > > > First, I don't know how to use POST, is it just changing the value GET
> > in
> > > > the form to POST?
> > > > Secondly, because I don't know where does it send to, I don't know
> where
> > to
> > > > get it, and I don't know how to get it even I know... so.......
> > > > Anyone can show me an example coding for POST and how to get the data
> > from
> > > > POST pls....
> > > >
> > > > "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > > > ???????:000001c24381$9ebbb8a0$[EMAIL PROTECTED]
> > > > > Have you tried this URL yet:
> > > > http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
> > > > > (www.w3.org might want to be your first choice when your are looking
> > for
> > > > specifications
> > > > > details about HTML and HTTP transfers.)
> > > > >
> > > > > Also remember that GET is restricted to ASCII transfers, and if you
> > > > happens
> > > > > to have binary data you should uses POST.
> > > > >
> > > > > But more precisly what are your problems:
> > > > >
> > > > > 1) can't post the data
> > > > > 2) can't get the values from posted data
> > > > > 3) something else
> > > > >
> > > > > ??
> > > > >
> > > > > Cheers,
> > > > > Anders
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Wednesday, August 14, 2002 12:32 PM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: [PHP-WIN] PHP & "POST"
> > > > > >
> > > > > >
> > > > > > Hey guys,
> > > > > > I want to know how to retrieve data from POST (form) ...
> > > > > >
> > > > > > What I want to do is...
> > > > > >
> > > > > > I've got a textarea for ppl to enter large amount of text (essay),
> > and I
> > > > let
> > > > > > ppl submit it (using POST), then insert these data into mySQL.
> > > > > >
> > > > > > I get it working if I use GET (I only know how to use GET, dunno
> > about
> > > > POST)
> > > > > > with small amount of words (say 1600 characters), but when there
> are
> > > > more
> > > > > > than 2000 characters, the submit button doesn't work. And I found
> > that
> > > > it is
> > > > > > becoz GET does not allow too large amount of text appear in the
> > URL...
> > > > > >
> > > > > > So anyone can teach me how to get data from POST? I read some web
> > sites
> > > > but
> > > > > > still have no idea how to do it ... I think I need an example...
> > > > > >
> > > > > > Please help
> > > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> >
> >
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
I did read the spec and I can understand how to use that... (also read a lot
of docs)
but the problem I've got before was:
I don't know how to get the data, if I don't know how to get the data, I
wouldn't have a clue whether the way I use POST is correct or not...
w3.org does provide a very clear format and description on WHAT YOU CAN USE,
but there are not many examples...
but now, everything fixed, and I learnt one more function.
Thanks anyway.

"B.A.T. Svensson" <[EMAIL PROTECTED]>
???????:000701c243ad$5fa81790$[EMAIL PROTECTED]
> I still think you should invest some time in study the Hyper Text
> Transfer Protocol (HTTP) and the Hyper Text Markup Language (HTML)
> at www.w3.org, they explain everything you need to know in order to
> make an implementation correct: anything else found at the web, or
> elsewhere, is derived from those specifications. If you understand
> how to read those specifications, you will for about 99,125% never,
> ever, need any other sources of help when it comes to the creepy
> details.
>
>
>
> Cheers,
>
> /Anders
>
> > -----Original Message-----
> > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 14, 2002 6:03 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-WIN] PHP & "POST"
> >
> >
> > Hey man, your post is very helpful ...
> >
> > But actually, I just found out the solution on the web...
> > You know what, most web sites are just telling you what does it do
(submit
> > to the server, header...$#&Q*^$@#) , but doesn't give u an example...
> >
> > Until I just found an example on the web, make my mind much clearer...
> >
> > And your example is exactly what I need before...
> >
> > Thanks anyway..


--- End Message ---
--- Begin Message ---
Another reason for GET is the ease of emailing someone else a link, as if I
need you to go here:

http://www.site.example.com/scripts/getinfo.php?youneedthisinfo=12345

the person on the other side doesn't have to put in 12345 for
youneedthisinfo :)

-Dash

-----Original Message-----
From: Scott Carr [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 14, 2002 9:18 AM
To: PHP Windows
Subject: Re: [PHP-WIN] PHP & "POST"


Therein lies the difference.  With POST, you cannot see the variables that
are
being passed, because they are passed as a header directly to the server.
With
GET, you see the variables, because they are part of the URL that is passed
to
the Server.  

The other difference is in that URL's tend to have a limit on how long they
can
be, a post does not.  So if you are planning on using a bunch of Form
Variables
you need to use post.  ( OF Course I think the URL limit is somewhere around
32000.  ;-)  )

I use POST if I don't want to worry about directly calling the page through
a
link, or if I am passing sensitive information.  (It's not a good idea to
hide a
password with * if you are going to just send the form with a GET.)  If I
would
want to call the page differently via a Link, I use GET.  

Say you want to call a page in multiple ways via an ActionID.  The ActionID
would be best used as a GET variable, because you could call it from a FORM
or a
Direct Link very easily.  (EXAMPLE:  "form.php?ActionID=1")

-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting Samura1 <[EMAIL PROTECTED]>:

> One more thing,
> I found that POST is better than GET as user won't see the variables ....
> But there must be a disadvantage of POST, otherwise, no one use GET...
> do you know what are the disadvantages of POST?
> 
> Thank you.
> 
> p.s and I'm looking for a very good website which talk about when you
should
> use this or when you shouldn't use this on PHP (including reasons) ... if
u
> know, pls let me know... as I'm a DIY learner, just trying everything out
> but dunno it's a good way to do or not...
> 
> 
> "Samura1" <[EMAIL PROTECTED]> 撰寫於郵件新聞
> :[EMAIL PROTECTED]
> > Hey man, your post is very helpful ...
> >
> > But actually, I just found out the solution on the web...
> > You know what, most web sites are just telling you what does it do
(submit
> > to the server, header...$#&Q*^$@#) , but doesn't give u an example...
> >
> > Until I just found an example on the web, make my mind much clearer...
> >
> > And your example is exactly what I need before...
> >
> > Thanks anyway..
> >
> >
> >
> > "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > ???????:000601c243a6$fb3b12e0$[EMAIL PROTECTED]
> > > Well lest go trough the basic steps then (but I still recomend you to
> > visist the www.w3.org
> > > and realy spend some time trying to understand the specifications - it
> > will save you lots
> > > of headache in the future...):
> > >
> > > First you start with the FORM tag:
> > >
> > >   <form method=POST action=start.asp>
> > >
> > > Here we see two attributes METHOD and ACTION.
> > >
> > > METHOD should be POST in our case, and the ACTION is a pointer to a
page
> > that should
> > > be handling the FORM request. In this case that page is called
> START.ASP,
> > in your
> > > case it should probably be with the file extension .PHP.
> > >
> > >
> > > What we then need is some interactive input fields:
> > >
> > >           <select name=Tissue>
> > >             <option value=0>Unspecified</option>
> > >             <option value=1>Brain</option>
> > >             <option value=2>Eye</option>
> > >             <option value=3>Liver</option>
> > >             <option value=4>Heart</option>
> > >             <option value=5>Muscel</option>
> > >             <option value=5>Splein</option>
> > >           </select>
> > >
> > > We choice to display a drop down menu with some various items found
> > > in the OPTION-tag. The SELECT as to be refereed with a NAME so we can
> > > refer to it once the START.ASP page is loaded. The name of the
variable
> > > that START.ASP will be able to figure out which option we select will
> > > hence be "Tissue".
> > >
> > > Finally we need a button to be able to submit the selected data:
> > >
> > >           <input type=submit value='Go now' name=Submit>
> > >
> > > And then we ends the form:
> > >
> > >   </FORM>
> > >
> > > Once we press the "Go Now" button, the form data will be posted to the
> > > webserver, but the handlig page (START.ASP) need a script to extract
> > > the data. This is done like this is VBScript:
> > >
> > >    Tissue = Request.Form("Tissue")
> > >
> > >
> > > In PHP I think a reference to a posted variable is done something like
> > this:
> > >
> > >        $HTTP_POST_VARS['Tissue'];
> > >
> > > Knowing this it should be a quite simple to continue with whatever you
> > need to do.
> > >
> > > Check this link for more details about POSTing:
> > >
> > >
> >
>
http://www.php.net/manual/en/language.variables.external.php#language.variab
> > les.external.form
> > >
> > > If you want to uplaod a file instead, you might want to check this
out:
> > >
> > > http://www.php.net/manual/en/features.file-upload.php
> > >
> > >
> > > Cheers,
> > > Anders
> > >
> > > > -----Original Message-----
> > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, August 14, 2002 5:01 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP-WIN] PHP & "POST"
> > > >
> > > >
> > > > First, I don't know how to use POST, is it just changing the value
GET
> > in
> > > > the form to POST?
> > > > Secondly, because I don't know where does it send to, I don't know
> where
> > to
> > > > get it, and I don't know how to get it even I know... so.......
> > > > Anyone can show me an example coding for POST and how to get the
data
> > from
> > > > POST pls....
> > > >
> > > > "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > > > ???????:000001c24381$9ebbb8a0$[EMAIL PROTECTED]
> > > > > Have you tried this URL yet:
> > > > http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
> > > > > (www.w3.org might want to be your first choice when your are
looking
> > for
> > > > specifications
> > > > > details about HTML and HTTP transfers.)
> > > > >
> > > > > Also remember that GET is restricted to ASCII transfers, and if
you
> > > > happens
> > > > > to have binary data you should uses POST.
> > > > >
> > > > > But more precisly what are your problems:
> > > > >
> > > > > 1) can't post the data
> > > > > 2) can't get the values from posted data
> > > > > 3) something else
> > > > >
> > > > > ??
> > > > >
> > > > > Cheers,
> > > > > Anders
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Wednesday, August 14, 2002 12:32 PM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: [PHP-WIN] PHP & "POST"
> > > > > >
> > > > > >
> > > > > > Hey guys,
> > > > > > I want to know how to retrieve data from POST (form) ...
> > > > > >
> > > > > > What I want to do is...
> > > > > >
> > > > > > I've got a textarea for ppl to enter large amount of text
(essay),
> > and I
> > > > let
> > > > > > ppl submit it (using POST), then insert these data into mySQL.
> > > > > >
> > > > > > I get it working if I use GET (I only know how to use GET, dunno
> > about
> > > > POST)
> > > > > > with small amount of words (say 1600 characters), but when there
> are
> > > > more
> > > > > > than 2000 characters, the submit button doesn't work. And I
found
> > that
> > > > it is
> > > > > > becoz GET does not allow too large amount of text appear in the
> > URL...
> > > > > >
> > > > > > So anyone can teach me how to get data from POST? I read some
web
> > sites
> > > > but
> > > > > > still have no idea how to do it ... I think I need an example...
> > > > > >
> > > > > > Please help
> > > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> >
> >
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---

Scoot said it all !! .. Just one more little thing , .. When posting a
form using POST you do a response page lets say form.php, if you want to
reload the page the browser will ask you to send the data again so
form.php can handle the data again,  you dont have this problem with GET
because, as scott said, the parameters are part of the url. Still POST
is the best for forms and this problem is not that big.


Therein lies the difference.  With POST, you cannot see the variables
that are being passed, because they are passed as a header directly to
the server.  With GET, you see the variables, because they are part of
the URL that is passed to the Server.  

The other difference is in that URL's tend to have a limit on how long
they can be, a post does not.  So if you are planning on using a bunch
of Form Variables you need to use post.  ( OF Course I think the URL
limit is somewhere around 32000.  ;-)  )

I use POST if I don't want to worry about directly calling the page
through a link, or if I am passing sensitive information.  (It's not a
good idea to hide a password with * if you are going to just send the
form with a GET.)  If I would want to call the page differently via a
Link, I use GET.  

Say you want to call a page in multiple ways via an ActionID.  The
ActionID would be best used as a GET variable, because you could call it
from a FORM or a Direct Link very easily.  (EXAMPLE:
"form.php?ActionID=1")

-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting Samura1 <[EMAIL PROTECTED]>:

> One more thing,
> I found that POST is better than GET as user won't see the variables 
> .... But there must be a disadvantage of POST, otherwise, no one use 
> GET... do you know what are the disadvantages of POST?
> 
> Thank you.
> 
> p.s and I'm looking for a very good website which talk about when you 
> should use this or when you shouldn't use this on PHP (including 
> reasons) ... if u know, pls let me know... as I'm a DIY learner, just 
> trying everything out but dunno it's a good way to do or not...
> 
> 
> "Samura1" <[EMAIL PROTECTED]> 撰寫於郵件新聞 
> :[EMAIL PROTECTED]
> > Hey man, your post is very helpful ...
> >
> > But actually, I just found out the solution on the web... You know 
> > what, most web sites are just telling you what does it do (submit to

> > the server, header...$#&Q*^$@#) , but doesn't give u an example...
> >
> > Until I just found an example on the web, make my mind much 
> > clearer...
> >
> > And your example is exactly what I need before...
> >
> > Thanks anyway..
> >
> >
> >
> > "B.A.T. Svensson" <[EMAIL PROTECTED]> 
> > ???????:000601c243a6$fb3b12e0$[EMAIL PROTECTED]
> > > Well lest go trough the basic steps then (but I still recomend you

> > > to
> > visist the www.w3.org
> > > and realy spend some time trying to understand the specifications 
> > > - it
> > will save you lots
> > > of headache in the future...):
> > >
> > > First you start with the FORM tag:
> > >
> > >   <form method=POST action=start.asp>
> > >
> > > Here we see two attributes METHOD and ACTION.
> > >
> > > METHOD should be POST in our case, and the ACTION is a pointer to 
> > > a page
> > that should
> > > be handling the FORM request. In this case that page is called
> START.ASP,
> > in your
> > > case it should probably be with the file extension .PHP.
> > >
> > >
> > > What we then need is some interactive input fields:
> > >
> > >           <select name=Tissue>
> > >             <option value=0>Unspecified</option>
> > >             <option value=1>Brain</option>
> > >             <option value=2>Eye</option>
> > >             <option value=3>Liver</option>
> > >             <option value=4>Heart</option>
> > >             <option value=5>Muscel</option>
> > >             <option value=5>Splein</option>
> > >           </select>
> > >
> > > We choice to display a drop down menu with some various items 
> > > found in the OPTION-tag. The SELECT as to be refereed with a NAME 
> > > so we can refer to it once the START.ASP page is loaded. The name 
> > > of the variable that START.ASP will be able to figure out which 
> > > option we select will hence be "Tissue".
> > >
> > > Finally we need a button to be able to submit the selected data:
> > >
> > >           <input type=submit value='Go now' name=Submit>
> > >
> > > And then we ends the form:
> > >
> > >   </FORM>
> > >
> > > Once we press the "Go Now" button, the form data will be posted to

> > > the webserver, but the handlig page (START.ASP) need a script to 
> > > extract the data. This is done like this is VBScript:
> > >
> > >    Tissue = Request.Form("Tissue")
> > >
> > >
> > > In PHP I think a reference to a posted variable is done something 
> > > like
> > this:
> > >
> > >        $HTTP_POST_VARS['Tissue'];
> > >
> > > Knowing this it should be a quite simple to continue with whatever

> > > you
> > need to do.
> > >
> > > Check this link for more details about POSTing:
> > >
> > >
> >
> http://www.php.net/manual/en/language.variables.external.php#language.
> variab
> > les.external.form
> > >
> > > If you want to uplaod a file instead, you might want to check this

> > > out:
> > >
> > > http://www.php.net/manual/en/features.file-upload.php
> > >
> > >
> > > Cheers,
> > > Anders
> > >
> > > > -----Original Message-----
> > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, August 14, 2002 5:01 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP-WIN] PHP & "POST"
> > > >
> > > >
> > > > First, I don't know how to use POST, is it just changing the 
> > > > value GET
> > in
> > > > the form to POST?
> > > > Secondly, because I don't know where does it send to, I don't 
> > > > know
> where
> > to
> > > > get it, and I don't know how to get it even I know... so....... 
> > > > Anyone can show me an example coding for POST and how to get the

> > > > data
> > from
> > > > POST pls....
> > > >
> > > > "B.A.T. Svensson" <[EMAIL PROTECTED]> 
> > > > ???????:000001c24381$9ebbb8a0$[EMAIL PROTECTED]
> > > > > Have you tried this URL yet:
> > > > http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
> > > > > (www.w3.org might want to be your first choice when your are 
> > > > > looking
> > for
> > > > specifications
> > > > > details about HTML and HTTP transfers.)
> > > > >
> > > > > Also remember that GET is restricted to ASCII transfers, and 
> > > > > if you
> > > > happens
> > > > > to have binary data you should uses POST.
> > > > >
> > > > > But more precisly what are your problems:
> > > > >
> > > > > 1) can't post the data
> > > > > 2) can't get the values from posted data
> > > > > 3) something else
> > > > >
> > > > > ??
> > > > >
> > > > > Cheers,
> > > > > Anders
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Wednesday, August 14, 2002 12:32 PM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: [PHP-WIN] PHP & "POST"
> > > > > >
> > > > > >
> > > > > > Hey guys,
> > > > > > I want to know how to retrieve data from POST (form) ...
> > > > > >
> > > > > > What I want to do is...
> > > > > >
> > > > > > I've got a textarea for ppl to enter large amount of text 
> > > > > > (essay),
> > and I
> > > > let
> > > > > > ppl submit it (using POST), then insert these data into 
> > > > > > mySQL.
> > > > > >
> > > > > > I get it working if I use GET (I only know how to use GET, 
> > > > > > dunno
> > about
> > > > POST)
> > > > > > with small amount of words (say 1600 characters), but when 
> > > > > > there
> are
> > > > more
> > > > > > than 2000 characters, the submit button doesn't work. And I 
> > > > > > found
> > that
> > > > it is
> > > > > > becoz GET does not allow too large amount of text appear in 
> > > > > > the
> > URL...
> > > > > >
> > > > > > So anyone can teach me how to get data from POST? I read 
> > > > > > some web
> > sites
> > > > but
> > > > > > still have no idea how to do it ... I think I need an 
> > > > > > example...
> > > > > >
> > > > > > Please help
> > > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> >
> >
> 
> 
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---

The answer to your question is, as always with computer:

     "It depends on"

I can tell you some about it by checking out the HTTP specifications,
but I think I have provided you by enough information now so you will
be able to find this information and figure it out your self.

But even knowing this demands one know what kind of requirments
are laid out for the implimentation. So it still depends on the
situation.

Anyhow, soem examples:

GET is useful if you want to link data from one database to another
at the web, then you can simply construct URL that cross link
different databases.

To see examples of this just check this URL out:

http://www.ncbi.nlm.nih.gov/LocusLink/LocRpt.cgi?l=2125

This URL first post some query data to the database, and
displays it, but the interesting thing in the answer could
be find in the hyper links under the "Gene Ontology" link.
There you will find (at this moment) three links:

                     plasmodesma
                     structural protein
                     epidermal differentiation

They all point to another database in the worlds located
elsewhere, and they all post data in the same fashion as
GET.

POST, on the otherhand is useful if you want to send binary
data, which GET can't deal with. 

There is also a difference in the HTTP transfer with POST and GET,
I don't remember exactly how it was, but I think POST send the data
in the body while GET sends the data in the header. 

If this is the case, then it might be that a GET request is faster
handled by the webserver, than a POST, but this is pure speculations
from my side and I don't really know if this is true or not.

If you really want to know the advantage to use one method before the
other, you should inspect the implementation of GET and POST (done
by reading the RFC about HTTP) and then you will be able to judge
about which one is "best" solution when no other precedence exists.


Sorry if I sounds harsh, that's not my intention, but I do actually
answer you on my working hours, so I can't help out to much, just
fast things which requires less energy and thinking.

Cheers,

P.S. I don't know what a "DIY learner" is supposed to be? D.S.



> -----Original Message-----
> From: Samura1 [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 6:07 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] PHP & "POST"
> 
> 
> One more thing,
> I found that POST is better than GET as user won't see the variables ....
> But there must be a disadvantage of POST, otherwise, no one use GET...
> do you know what are the disadvantages of POST?
> 
> Thank you.
> 
> p.s and I'm looking for a very good website which talk about when you should
> use this or when you shouldn't use this on PHP (including reasons) ... if u
> know, pls let me know... as I'm a DIY learner, just trying everything out
> but dunno it's a good way to do or not...
> 
> 
> "Samura1" <[EMAIL PROTECTED]> 1/4?1/4g(c)o?lYo*s>D
> :[EMAIL PROTECTED]
> > Hey man, your post is very helpful ...
> >
> > But actually, I just found out the solution on the web...
> > You know what, most web sites are just telling you what does it do (submit
> > to the server, header...$#&Q*^$@#) , but doesn't give u an example...
> >
> > Until I just found an example on the web, make my mind much clearer...
> >
> > And your example is exactly what I need before...
> >
> > Thanks anyway..
> >
> >
> >
> > "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > ???????:000601c243a6$fb3b12e0$[EMAIL PROTECTED]
> > > Well lest go trough the basic steps then (but I still recomend you to
> > visist the www.w3.org
> > > and realy spend some time trying to understand the specifications - it
> > will save you lots
> > > of headache in the future...):
> > >
> > > First you start with the FORM tag:
> > >
> > >   <form method=POST action=start.asp>
> > >
> > > Here we see two attributes METHOD and ACTION.
> > >
> > > METHOD should be POST in our case, and the ACTION is a pointer to a page
> > that should
> > > be handling the FORM request. In this case that page is called
> START.ASP,
> > in your
> > > case it should probably be with the file extension .PHP.
> > >
> > >
> > > What we then need is some interactive input fields:
> > >
> > >           <select name=Tissue>
> > >             <option value=0>Unspecified</option>
> > >             <option value=1>Brain</option>
> > >             <option value=2>Eye</option>
> > >             <option value=3>Liver</option>
> > >             <option value=4>Heart</option>
> > >             <option value=5>Muscel</option>
> > >             <option value=5>Splein</option>
> > >           </select>
> > >
> > > We choice to display a drop down menu with some various items found
> > > in the OPTION-tag. The SELECT as to be refereed with a NAME so we can
> > > refer to it once the START.ASP page is loaded. The name of the variable
> > > that START.ASP will be able to figure out which option we select will
> > > hence be "Tissue".
> > >
> > > Finally we need a button to be able to submit the selected data:
> > >
> > >           <input type=submit value='Go now' name=Submit>
> > >
> > > And then we ends the form:
> > >
> > >   </FORM>
> > >
> > > Once we press the "Go Now" button, the form data will be posted to the
> > > webserver, but the handlig page (START.ASP) need a script to extract
> > > the data. This is done like this is VBScript:
> > >
> > >    Tissue = Request.Form("Tissue")
> > >
> > >
> > > In PHP I think a reference to a posted variable is done something like
> > this:
> > >
> > >        $HTTP_POST_VARS['Tissue'];
> > >
> > > Knowing this it should be a quite simple to continue with whatever you
> > need to do.
> > >
> > > Check this link for more details about POSTing:
> > >
> > >
> >
> http://www.php.net/manual/en/language.variables.external.php#language.variab
> > les.external.form
> > >
> > > If you want to uplaod a file instead, you might want to check this out:
> > >
> > > http://www.php.net/manual/en/features.file-upload.php
> > >
> > >
> > > Cheers,
> > > Anders
> > >
> > > > -----Original Message-----
> > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, August 14, 2002 5:01 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [PHP-WIN] PHP & "POST"
> > > >
> > > >
> > > > First, I don't know how to use POST, is it just changing the value GET
> > in
> > > > the form to POST?
> > > > Secondly, because I don't know where does it send to, I don't know
> where
> > to
> > > > get it, and I don't know how to get it even I know... so.......
> > > > Anyone can show me an example coding for POST and how to get the data
> > from
> > > > POST pls....
> > > >
> > > > "B.A.T. Svensson" <[EMAIL PROTECTED]>
> > > > ???????:000001c24381$9ebbb8a0$[EMAIL PROTECTED]
> > > > > Have you tried this URL yet:
> > > > http://www.w3.org/TR/html401/interact/forms.html#edef-FORM
> > > > > (www.w3.org might want to be your first choice when your are looking
> > for
> > > > specifications
> > > > > details about HTML and HTTP transfers.)
> > > > >
> > > > > Also remember that GET is restricted to ASCII transfers, and if you
> > > > happens
> > > > > to have binary data you should uses POST.
> > > > >
> > > > > But more precisly what are your problems:
> > > > >
> > > > > 1) can't post the data
> > > > > 2) can't get the values from posted data
> > > > > 3) something else
> > > > >
> > > > > ??
> > > > >
> > > > > Cheers,
> > > > > Anders
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Samura1 [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Wednesday, August 14, 2002 12:32 PM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: [PHP-WIN] PHP & "POST"
> > > > > >
> > > > > >
> > > > > > Hey guys,
> > > > > > I want to know how to retrieve data from POST (form) ...
> > > > > >
> > > > > > What I want to do is...
> > > > > >
> > > > > > I've got a textarea for ppl to enter large amount of text (essay),
> > and I
> > > > let
> > > > > > ppl submit it (using POST), then insert these data into mySQL.
> > > > > >
> > > > > > I get it working if I use GET (I only know how to use GET, dunno
> > about
> > > > POST)
> > > > > > with small amount of words (say 1600 characters), but when there
> are
> > > > more
> > > > > > than 2000 characters, the submit button doesn't work. And I found
> > that
> > > > it is
> > > > > > becoz GET does not allow too large amount of text appear in the
> > URL...
> > > > > >
> > > > > > So anyone can teach me how to get data from POST? I read some web
> > sites
> > > > but
> > > > > > still have no idea how to do it ... I think I need an example...
> > > > > >
> > > > > > Please help
> > > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP Windows Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> >
> >
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
> I did read the spec and I can understand how to use that... (also read a lot
> of docs)
> but the problem I've got before was:
> I don't know how to get the data, if I don't know how to get the data, I
> wouldn't have a clue whether the way I use POST is correct or not...
> w3.org does provide a very clear format and description on WHAT YOU CAN USE,
> but there are not many examples...

In addition, of course, you need to check the manuals for the target languages...
www.php.net/manual, provides an excellent search capability in the manual - and
it also has a splendid example section: as a programmer I must say that this
is the best API documentation I ever seen - well, I haven't seen that much
anyway, but what da heck....

> but now, everything fixed, and I learnt one more function.

A small step for humanity, but a big step for the human.
--- End Message ---
--- Begin Message ---
Samura1 wrote:

>One more thing,
>I found that POST is better than GET as user won't see the variables ....
>But there must be a disadvantage of POST, otherwise, no one use GET...
>do you know what are the disadvantages of POST?
>  
>
The disvantage of POST, or better, the advantage of GET is that the 
variables are passed with the url.

That allows for urls that have data atached and thrus allows the 
creation of portals and content servers. Otherwise, the user would 
bookmark always the start page of the portal/content server.

It is rather a question of choice.

BTW... the advantage of POST is that it allows file uploading and 
sending big quantities of information to the server. GET has some limits 
[arround 2Kb more or less... depends a bit on the browser/server combo].

Cheers,
Luis Ferro
TelaDigital

P.S.- as for the user not see the vars, well... that isn't of big 
importance as the user has access to all fields in the forms on the 
site... In any case i would recomend to perform regexp parsing on all 
vars received thru both post and get... just in case...

---
[This E-mail scanned for viruses by Declude Virus]

--- End Message ---
--- Begin Message ---
if you are using IIS on Win2000, its better to swotch to Apache server. I
was forced to switch as the IIS cookie bug is really bugging.

Regards,
Arijit


"Mickel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i'm pretty new to php and just installed a few scripts...but i think there
> is a problem in my php.ini because everytime i try to logon i think the
> cookie is never created or something because i always can't log
> on.....please could someone help me thank you very much
>
>


--- End Message ---
--- Begin Message ---
Did you change the location for the Cookies?  In the php.ini it starts off in
/tmp which does not exist on a windows machine.  Try changing it to c:\temp or
something that actually exists on your box.
-- 
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/


Quoting Arijit Chaudhuri <[EMAIL PROTECTED]>:

> if you are using IIS on Win2000, its better to swotch to Apache server. I
> was forced to switch as the IIS cookie bug is really bugging.
> 
> Regards,
> Arijit
> 
> 
> "Mickel" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > i'm pretty new to php and just installed a few scripts...but i think there
> > is a problem in my php.ini because everytime i try to logon i think the
> > cookie is never created or something because i always can't log
> > on.....please could someone help me thank you very much
> >
> >
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
I have just recently upgraded to PHP 4.2.2 and am trying to get this 
version to do the following compounding interest problem, which PHP3 had 
no problem with.

$futureValue = $currentAmount * pow( 1 + ($interestRatePercent/100), 
$timeInYears);

In PHP4, it issues a warning saying " Invalid argument(s) passed to 
pow() in C:\Server\Apache Group\Apache2\htdocs\Compound 
Interest\cinterest.php3 on line 24".  In reading about the pow() 
function, it appears that in PHP 4 the pow function use to return floats 
whereas now it returns integers.  So my first instinct was to try to 
cast what power returns into a float.  So I tried various tests (since I 
haven't cast in PHP before).  I tried everything from:

(float) $futureValue = $currentAmount * pow( 1 + 
($interestRatePercent/100), $timeInYears);

to:

$temp = 1 + ($interestRatePercent/100);
echo "<br>$temp to the $timeInYears<br>";  //i.e echos 1.06 to the 2    
(float) $temp1 = (float) pow($temp, $timeInYears);
$futureValue = $currentAmount * $temp1;

I am still getting the warning about invalid arguments passed to pow(). 
  So what is the deal here, how am I suppose to do this type of math 
problem?

Thanks for any help or ideas.
        -Andrew V. Romero

--- End Message ---
--- Begin Message ---
I came accross the following IIS4/5 Metabase setting:

AllowPathInfoForScriptMappings

It can be set at either the service or site level:

    W3SVC/
    W3SVC/1/

MS claims that this forces PATH_INFO and PATH_TRANSLATED to act according to
the CGI specification, however this setting seems to have made no difference
at all for me.  I am using the IIS5 on W2K Pro (not Server), so this may not
be an available option since this version of IIS is somewhat limited (though
MS does not mention this).

Has anyone else gotten this setting workding?  Does anyone know if there are
any caveats or additional settings I need to get this to work?


The MS KB is:

http://support.microsoft.com/default.aspx?scid=kb;en-us;q184320


--
---
Seairth Jacobs
[EMAIL PROTECTED]


"Jason Reid" <[EMAIL PROTECTED]> wrote in message
news:004201c24341$a4a8b410$[EMAIL PROTECTED]...
> Its an IIS problem. With apache there are several ways,
> www.phpbuilder.com/columns/tim20000526.php3 is IMO the best way, i
currently
> use it on several sites. i think this would be what you need if it was
> apache you were working on
>
> Jason Reid
> [EMAIL PROTECTED]
> --
> AC Host Canada
> www.achost.ca
>
> ----- Original Message -----
> From: "Seairth Jacobs" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 13, 2002 8:21 PM
> Subject: [PHP] URL path question
>
>
> > I would like to be able to do the following:
> >
> > www.sample.com/path/file.php/additional/path/
> >
> > Unfortunately on IIS, this gives an error.  Interestingly, the following
> > does not:
> >
> > www.sample.com/path/file.php/
> >
> > I need to have a single PHP script be responsible for a series of
> resources,
> > but I do not want to use a query string (for various reasons) to
identify
> > those resources.  So, how can I do this?  Is this an IIS-specific
problem
> or
> > does PHP just not allow this?
> >
> > TIA.
> >
> > ---
> > Seairth Jacobs
> > [EMAIL PROTECTED]
> >
> > p.s. Sorry if you see a cross-post on php.version4.  I got a warning
that
> > said it was a read-only list, so I am reposting to this list as well
> (which
> > is probably the  correct list to post to in the first place. <g>
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>


--- End Message ---
--- Begin Message ---
I have included my code below.  This is my first experience trying to use
COM objects in PHP.  My problem is that the
foreach loop does not output anything, regardless of whether or not there
are files in the folder.  Can anyone tell me what is wrong with my script?
Thanks for any help.

                   Kyle





<?php

 session_start();

 $objPath = "C:\\" . $_SESSION['user'] .  "\\";

 print $objPath;

 $objFileManager = new COM("Scripting.FileSystemObject") or die("cant open
COM object");

  if ($objFileManager->FolderExists($objPath))
  {
           print "folder exists";

           $objFolder = $objFileManager->GetFolder($objPath);

           $objFolder->Path;

           $fileCollection = $objFolder->Files;


           foreach ( $fileCollection as $file ){

                print $file->Path;
           }

  }
  else
       print "doesnt exist";


?>




--- End Message ---

Reply via email to