FearlessGoD
New Member
- Oct 17, 2016
- 3
- 0
so i created a script that only allow you view the page IF the url is correct than i included mysql database with the script that see if i added a new url extension like example: ./shop?Coin and the url extension is build on $_GET method so Coin is the word in my table stored in my database, soooo now my script is this:
this code would not work it will redirect me to index so the database has 3 results in the table, wouldnt work how i want to i want it this ill explain
$count variable counts up each results on table so theres 3
$ChkUrl[1] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];
$ChkUrl[2] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];
$ChkUrl[3] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];
than you know what the rest does, help me lol urgently..
[/COLOR]
disregard
its not in my script
PHP:
$ShopTabs = mysql_query('SELECT * FROM `shop_tabs`');[/COLOR][/COLOR][/COLOR][/COLOR]
[COLOR=#660000][COLOR=#000000][COLOR=#660000][COLOR=#000000]while($Shop = mysql_fetch_array($ShopTabs))
{
$count = $Shop['id'];
$ChkUrl[$count] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];
}
if($ChkUrl[$count] == $_SERVER['REQUEST_URI'])
{
/* template here */
}
else
{
header('Location: /index');
}
this code would not work it will redirect me to index so the database has 3 results in the table, wouldnt work how i want to i want it this ill explain
$count variable counts up each results on table so theres 3
$ChkUrl[1] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];
$ChkUrl[2] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];
$ChkUrl[3] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];
than you know what the rest does, help me lol urgently..
[/COLOR]
disregard
HTML:
[/COLOR]
[COLOR=#000000]