This is the exact part of the code that doesn't work
if(isset($_GET['Champion'])){
$championget = trim(urldecode($_GET['Champion']));
echo $championget;
$championexists = $conn->prepare("SELECT * FROM champions where Champion = ?");
$championexists->bind_param('s', $championget);
$championexists->execute();
$championexistsresult = $championexists->get_result();
if(mysqli_num_rows($championexistsresult)==0){
echo 'Champion doesn\'t exist';
exit;
}elseif(mysqli_num_rows($championexistsresult)>=1)
{
//Continue here
include('php/champion.php');
exit;
}
}
Works fine with regular names like http://localhost/leaguenotes/Cassiopeia but i have names that have ' in them that is why i encoded them so they look like this http://localhost/leaguenotes/Cho%27Gath but this redirects me to folder index
Here is also htaccess that might be at fault
ErrorDocument 404 /
ErrorDocument 403 /
Options ALL -Indexes
RewriteEngine On
RewriteRule ^([0-9/.]+)$ index.php?Patch_No=$1 [NC,L]
RewriteRule ^([0-9/.]+)&([0-9a-zA-Z_-]+)$ index.php?Patch_No=$1&tab=$2 [NC,L]
RewriteRule ^patches php/patches.php [NC,L]
RewriteRule ^([0-9a-zA-Z_-]+)$ index.php?Champion=$1 [NC,L]
It just seems like because of %27 my code doesn't interpert this as a variable