You are here: Re: Simple beginners question about inserting data via an URL « PHP Programming Language « IT news, forums, messages
Re: Simple beginners question about inserting data via an URL

Posted by Jerry Stuckle on 10/12/07 10:58

deja@icepick.com wrote:
>> If your URL is really something like:
>>
>> http://www.example.com?var1=blah&var2=blah
>>
>> Then $_GET['var1'] will contain the first value, and $_GET['var2'] will
>> contain the second value. If it doesn't work, either your url is wrong
>> or you're not accessing the data correctly.
>>
>> P.S. Please don't top post. And when using examples, use example.com as
>> the domain - that's what it's reserved for.
>>
>
> Jerry,
> I simplified my webpage to
>
> <?php
> echo $_GET['var1'];
> echo $_GET['var2'];
> echo $_GET['var3'];
> ?>
>
> And the url I use now to test is (besides the example part)
> www.example.com/php/blah.php?var1=test&var2=blahblah&var3=candy
>
> When I do this it only returns one variable.
> There must be something simple I am missing here..
>
>
>

OK, what do you get if you do the following:

<pre>
<?php
print_r($_GET);
echo "\n" . $_SERVER['QUERY_STRING'] . \n";
?>
</pre>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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