Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15701
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Derek Turner <frderek@suremail.je> |
| Newsgroups | comp.lang.php |
| Subject | rawurlencode problem |
| Date | 19 Oct 2015 14:56:25 GMT |
| Lines | 32 |
| Message-ID | <d8kekpFmk8uU1@mid.individual.net> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net uo1XY56jZoB2JMZ1/MLzcQqHwsoTr/BXTCPKB/shZK2ZOcdgXA |
| Cancel-Lock | sha1:pHKlvu16NqhbkEw9VEV1rOzzsz0= |
| User-Agent | Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) |
| Xref | csiph.com comp.lang.php:15701 |
Show key headers only | View raw
Hi,
I'm using this:
echo "<ol class=\"reader\">";
while ($row = $result->fetch_assoc()):
echo "<li class=\"reader\"> <a href = \"#".rawurlencode($row
['name'])."\">" . $row['name'] . "</a></li>\n\n";
endwhile;
echo "</ol>";
to provide links for screen-readers to various points in my page
$row['name'] may and does contain white spaces in many records.
The code works fine without the rawurlencode but fails validation
similarly this code lower down:
while ($row = $result->fetch_assoc()):
echo "<h2 id =\"" .rawurlencode($row['name']). "\">" . $row
['name'] . "</h2>";
etc.
works without the rawurlencode but fails validation as 'id' must not
contain white space.
SO the link href and the id are identical apart from the leading #
PROBLEM: this passes validation but DOES NOT WORK. Clicking the links
does not move the page. Without the second rawurlencode it works!
What am I missing????
Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread
rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-19 14:56 +0000
Re: rawurlencode problem Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-10-19 17:18 +0200
Re: rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-19 15:48 +0000
Re: rawurlencode problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-20 00:02 +0200
Re: rawurlencode problem Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-10-21 09:40 +0200
Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-20 18:33 +0200
Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-19 21:27 +0200
Re: rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-19 19:43 +0000
Re: rawurlencode problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-20 00:03 +0200
Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-20 07:10 +0200
Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-20 07:21 +0200
Re: rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-20 08:29 +0000
Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-20 18:29 +0200
Re: rawurlencode problem Arno Welzel <usenet@arnowelzel.de> - 2015-10-27 14:01 +0100
Re: rawurlencode problem Arno Welzel <usenet@arnowelzel.de> - 2015-10-27 14:04 +0100
Re: rawurlencode problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-20 00:00 +0200
Re: rawurlencode problem Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-19 19:35 -0400
Re: rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-20 08:34 +0000
Re: rawurlencode problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-21 13:54 +0200
csiph-web