You are here: Re: Passing Variables « PHP Programming Language « IT news, forums, messages
Re: Passing Variables

Posted by Dave M on 11/17/05 18:45

In article <ro-dnZt4cc-5PeHeRVn-jQ@comcast.com>, Khai says...
>
>First off, yes, I understand the crapload of tutorials out there, (well,
>rather, I understand there /are/ a crapload of tutorials out there), the
>problem is my comprehension.
>
>I'm trying to pass variables, and can do so just fine with a URL, and $_GET.
>What I would like to learn, and be very adept at using is the Form functions
>and how you pass through that.
>
>The problem in my comprehending this, is how does the original page know how
>to post the data to the new page? Or do you create the form on the original
>page, and somehow, magically, the new page can read from it?
>
>Can someone break it down into the most basic steps, remembering that i'm a
>2-week newbie? :)
>
>Sometimes, all we need is a little one on one attention.
>
>-Thank you,
>Humbly,
>Khai
>
>

Hi Khai,

From my understanding the variables are passed along from a form depending on
the "method" in your HTML code. If you use the "GET" method, the form adds the
variable to the URL (e.g. http://www.domain.com/phpscript?var1=1+var2=2 ) and
would access them in PHP with the $_GET variables.

If the form uses the "POST" method though, the variable are passed along more
transparently, so you don't see them on the URL, and can get the using the
$_POST variables.

Dave
--
Basic Newsguy - 3 GB / month - $39.95 / year
http://newsguy.com/overview.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация