Garloz Posted January 2, 2012 Share Posted January 2, 2012 Hei, please can anyone help me? I guess it's done with if function - i can be wrong too. :/ I want to get about the same "step by step" stuff.. Look example: http://p6lva.eu/site/realinfo.php I tried by my own, but I failed too much : <?php $nick = $_GET['nick']; $server = $_GET['server']; $teenus = $_GET['teenus']; if (!empty($nick) && $server === null) { echo "<center>Choose server:<br><br>\n <a href='realinfo.php?server=1&nick=$nick' style='text-decoration: none;'><button style='width: 250px; text-align: left;'><center>\n Server 1</center></button></a> </center>"; } else { echo ""; } if (!empty($server) && $teenus === null) { include "service1.php"; } else { echo "show frontpage"; } if (!empty($teenus)) { if ($teenus === vip && $server === 1) { include "vip.php"; } if ($teenus === admin && $server === 1) { include "admin.php"; } } else { echo "You must choose service!!! Or this service doesnt in our database!!!"; } if (isset($nick) || isset($server) || isset($teenus)) { // if not added one of the values - like $server, $nick or $teenus then show frontpage echo ""; } else { include 'frontpage.php'; } ?> HELP Quote Link to comment https://forums.phpfreaks.com/topic/254211-newby-help/ Share on other sites More sharing options...
Pikachu2000 Posted January 2, 2012 Share Posted January 2, 2012 You haven't actually said what the problem is. Quote Link to comment https://forums.phpfreaks.com/topic/254211-newby-help/#findComment-1303363 Share on other sites More sharing options...
Garloz Posted January 2, 2012 Author Share Posted January 2, 2012 Sorry about that.. Actually the problem is, that the script wont work correctly. If I open in browser: realinfo.php?server=1&nick=&teenus=vip then it shows me "service1.php" page not the frontpage. If i open realinfo.php?server=1&nick=&teenus=NotValidService it shows me blank page. And so on.. If i add wrong serverID then it doesnt redirect me to frontpage :/ Or is there some possibility to make it easier? // Btw.. sorry for my english. Mhh.. I meant i want to get the same result like is this: http://p6lva.eu/site/realinfo.php (PS! it's not my site) Quote Link to comment https://forums.phpfreaks.com/topic/254211-newby-help/#findComment-1303367 Share on other sites More sharing options...
KevinM1 Posted January 2, 2012 Share Posted January 2, 2012 Since you're checking for specific strings, you need to put what you're looking for in quotes: if ($teenus === "vip" && $server === 1) and if ($teenus === "admin" && $server === 1) otherwise PHP will think they're constants. Also, put the following lines at the top of your script: ini_set("display errors", 1); error_reporting(-1); Quote Link to comment https://forums.phpfreaks.com/topic/254211-newby-help/#findComment-1303378 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.