Re: query string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Awsome!

Thanks, That is exactly what I was looking for. Work great now!


"Leif K-Brooks" <eurleif@buyer-brokerage.com> wrote in message
3EDB2506.2090702@buyer-brokerage.com">news:3EDB2506.2090702@buyer-brokerage.com...
> To answer your question, you should urlencode() the team name.  However,
> I would store the user in a cookie or session, and fetch the team name
> on each page load.  Otherwise, they can easily change which team they're
> using.
>
> Ian Fingold wrote:
>
> >Sorry I don't think I explained very well... heres my situation...
> >
> >I have a mysql database set up... I have a user table with 2
> >fields..."team_name" and "fant_week".
> >
> >What I want to do is, depending on who is logged in, I want my link to
> >change the value of 'team' to the logged in members team name, like wise
for
> >the week.
> >
> >For example..
> >if "gorno" is logged in and his team is called "fun team" the link will
> >reflect his team and look like this...
> >fant_stnd3.php?week=1&team=fun team
> >
> >or if say... "billbo" is logged in and his team is called "silly team"
the
> >link will look like this
> >fant_stnd3.php?week=1&team=silly team
> >
> >but again, my problem is that it's cutting off the team value when there
is
> >a space in the string..
> >
> >
> >
> >"G|rhan Vzen" <ergenekon@starpower.net> wrote in message
> >1054523332.1569.3.camel@localhost">news:1054523332.1569.3.camel@localhost...
> >
> >
> >>On Sun, 2003-06-01 at 22:26, Ian Fingold wrote:
> >>
> >>
> >>>I'm trying to build a query string for one of my links.. for example...
> >>>fant_stnd3.php?week=1&team=fun%20team
> >>>
> >>>I need to be able to grab the values of 'week' and 'team' from an
array,
> >>>
> >>>
> >I
> >
> >
> >>>can do that no problem, but when the code runs it cuts off the value if
> >>>there is a space in the string. so instead of putting "fun team" in the
> >>>query string it cuts it off and just puts.. "fun "
> >>>
> >>>So my question, is there a function or any way to prevent this from
> >>>happening?
> >>>
> >>>thanks.
> >>>
> >>>
> >>   Hi Ian,
> >> I have no idea what you are trying to do.. Well if you are getting
> >>those values from a URL, $week and $team variables in your php script
> >>should have the values in them.. In later versions of PHP, they will be
> >>_POST['week'] and _POST['team'] or _GET['week'] or _GET['team']
> >>depending on which method is used.. You don't need to parse the URL and
> >>run them through an array.. :)
> >>  Gurhan
> >>
> >>
> >>
> >
> >
> >
> >
> >
>
> --
> The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent of
the law.
>
>



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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux