First, I must suggest not using names, but using numbers. Much simpler.
But if you're going to use names, check out php's urldecode and urlencode to make the text nice and usable
Got a question for any php developers out there.
In my new version of the stats I'm doing the front end entirely in php. However I'm having problems displaying teams which have spaces in them.
I'm sure I've had this working before but can't quite seem to get it to work now.
i.e. in my DB I have stored team=Dutch Power Cows
my php script reads this for Free-DC
http://stats.free-dc.org/new/teamsta...c&team=Free-DC
but how to I put in Dutch Power Cows into that URL and then have the script decode it ?
I've messed about putting in %20's, +'s and also using urldecode etc, but without success. I'm sure it's something obvious I'm overlooking but would appreciate any insight!
Bok
First, I must suggest not using names, but using numbers. Much simpler.
But if you're going to use names, check out php's urldecode and urlencode to make the text nice and usable
That's what I've been trying.
When I put this in
http://stats.free-dc.org/new/teamsta...20Power%20Cows
and then try
$team2=urldecode($team);
team2 is DutchPowerCows;
similarly if I do
$team2=htmlspecialchars(urldecode($team));
I could use the projectrank for the teams instead, it's just that putting that as the index and updating the index often is not nice
Bok
Form test
http://www.dp.cx/pub/bok.php
Source code
http://www.dp.cx/pub/bok.phps
Thanks DP,
I've actually just fixed it, though fix is not a good word here. I think I should throw myself off a virtual cliff
Remebering the name of my variables (i.e. $team ) .... I had an
include '../generalconfig.inc';
at the top of my script (I use it in all of the scripts) which contained (amongst other things)
$team = ereg_replace (' ','', $team);
$team = ereg_replace ('.html','', $team);
/me feels stupid
Bok