Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
php problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="FearlessGoD" data-source="post: 389457" data-attributes="member: 71823"><p><span style="color: #000000">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: </span><span style="color: #660000">./shop?Coin <span style="color: #000000">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:</span></span></p><p><span style="color: #660000"><span style="color: #000000">[PHP]$ShopTabs = mysql_query('SELECT * FROM `shop_tabs`');[/COLOR][/COLOR][/COLOR][/COLOR]</span></span></p><p><span style="color: #660000"><span style="color: #000000">[COLOR=#660000][COLOR=#000000][COLOR=#660000][COLOR=#000000]while($Shop = mysql_fetch_array($ShopTabs))</span></span></p><p><span style="color: #660000"><span style="color: #000000"> {</span></span></p><p><span style="color: #660000"><span style="color: #000000"> $count = $Shop['id'];</span></span></p><p><span style="color: #660000"><span style="color: #000000"> $ChkUrl[$count] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];</span></span></p><p><span style="color: #660000"><span style="color: #000000"> }</span></span></p><p><span style="color: #660000"><span style="color: #000000">if($ChkUrl[$count] == $_SERVER['REQUEST_URI'])</span></span></p><p><span style="color: #660000"><span style="color: #000000"> {</span></span></p><p><span style="color: #660000"><span style="color: #000000"> /* template here */</span></span></p><p><span style="color: #660000"><span style="color: #000000"> }</span></span></p><p><span style="color: #660000"><span style="color: #000000"> else</span></span></p><p><span style="color: #660000"><span style="color: #000000"> {</span></span></p><p><span style="color: #660000"><span style="color: #000000"> header('Location: /index');</span></span></p><p><span style="color: #660000"><span style="color: #000000"> }</span></span></p><p><span style="color: #660000"><span style="color: #000000">[/PHP]</span></span></p><p><span style="color: #660000"></span></p><p><span style="color: #660000"><span style="color: #660000">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</span></span></p><p><span style="color: #660000"><span style="color: #660000">$count variable counts up each results on table so theres 3</span></span></p><p><span style="color: #660000"><span style="color: #660000">$ChkUrl[1] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];</span></span></p><p><span style="color: #660000"><span style="color: #660000">$ChkUrl[2] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];</span></span></p><p><span style="color: #660000"><span style="color: #660000">$ChkUrl[3] = '/'.$_SESSION['username'].'/shop?'.$Shop['tabLabel'];</span></span></p><p><span style="color: #660000"><span style="color: #660000">than you know what the rest does, help me lol urgently..</span></span></p><p>[/COLOR]</p><p>disregard </p><p>[HTML][/COLOR]</p><p>[COLOR=#000000][/HTML]</p><p> its not in my script</p></blockquote><p></p>
[QUOTE="FearlessGoD, post: 389457, member: 71823"] [COLOR=#000000]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: [/COLOR][COLOR=#660000]./shop?Coin [COLOR=#000000]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:[/COLOR][/COLOR] [COLOR=#660000][COLOR=#000000][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'); } [/PHP][/COLOR][/COLOR] [COLOR=#660000] [COLOR=#660000]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][/COLOR] [/COLOR] disregard [HTML][/COLOR] [COLOR=#000000][/HTML] its not in my script [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
php problem
Top