Note that there are some explanatory texts on larger screens.

plurals
  1. POTricky situation calling variable with ÅÄÖ and & afterwards
    primarykey
    data
    text
    <p>I have these tricky problems.</p> <p>On my site I allow registrations with the characters <code>åäö</code> in them, and I have friendly URLs linking to their profile, so lets say an URL looks like this:</p> <p><a href="http://example.com/profile/%C3%A5%C3%A4%C3%B6ismyname/" rel="nofollow">example.com/profile/åäöismyname/</a></p> <p>and the <code>userfriendly</code> variable is <code>$_GET['vanlig']</code>.</p> <p>Now, this is called <a href="http://example.com/profile/%C3%A5%C3%A4%C3%B6myname&amp;favorisera" rel="nofollow">example.com/profile/åäömyname&amp;favorisera</a></p> <p><code>$_GET['vanlig']</code> is now called as <code>åäömyname&amp;favorisera</code> instead of <code>åäömyname</code>, and <code>&amp;favorisera</code> is not called.</p> <p>This works perfectly fine as long as I don't have <code>åäö</code> in the <code>$_GET</code> variable, <code>&amp;favorisera</code> is then called properly.</p> <p>Any suggestions to this? Changing their friendly names is not an option. Since this may cause duplicate names in the DB.</p> <p>I'm using nginx as a webserver for friendly URLs.</p> <p>EDIT:</p> <p>i tried this</p> <pre><code>$userid = urlencode($userid); &lt;div class="privat" onclick="window.location = '/profil/&lt;?=$userid?&gt;&amp;favorisera'" style="cursor:pointer;" title=""&gt;&lt;/div&gt; </code></pre> <p>without any success, the linking shows ( as an actual example from the source code ) :</p> <pre><code>&lt;div class="privat" onclick="window.location = '/profil/k%C3%A5taelin&amp;favorisera'" style="cursor:pointer;" title=""&gt;&lt;/div&gt; </code></pre> <p>When clicked, i return a var dump of $_GET['vanlig'], which results in string(19) "kåtaelin&amp;favorisera" anyway.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload