Posted by ZeldorBlat on 10/13/42 11:36
home wrote:
> The web site (a cycling one) can list one or more events happening at
> different locales on the same day.
> To differentiate between events happening on the same day, when I make
> the hyperlink -
> print("<a
> href=\"fun_runs_individual.php?id=$Row[event_date]&$Row[event]\">$Row[event]<br>$Row[event_date]</a></td>");
> the status bar shows the full combination (e.g.
> id=http://domain/fun_runs_individual.php?id=2005-01-01&Fintry 2005) and
> that appears in the address bar of the next screen as
> http://domain/fun_runs_individual.php?id=2005-01-01&Fintry%202005
> In that following page, when I take the $id to try and separate the two
> elements so I can search the table for all entries which have the chosen
> event_date and the chosen event, all that $id prints out as is the event
> date.
> I've never tried to pass two variables at once before this and just
> supposed it would work. Am I missing something blindingly obvious?
Just give the two variables different names:
http://domain/fun_runs_individual.php?date=2005-01-01&name=Fintry%202005
Then on the next page you'll have $_GET['date'] and $_GET['name'].
Navigation:
[Reply to this message]
|