snach15 Posted December 28, 2012 Report Share Posted December 28, 2012 if(isset($_GET['id'])) { switch($_GET['id']) { case 'abc': include("pages/2.php"); break; } } vai ir iespējams abc vietā ielikt $row['username'] ? Quote Link to comment Share on other sites More sharing options...
rpr Posted December 28, 2012 Report Share Posted December 28, 2012 kāpēc nevar vienkārši?: if(isset($_GET['id']) && $_GET['id']==$row['username']) { include ('pages/2.php'); } Quote Link to comment Share on other sites More sharing options...
snach15 Posted December 28, 2012 Author Report Share Posted December 28, 2012 neder jo man kods izkatās šādi ... if(isset($_GET['id'])) { switch($_GET['id']) { case 'abc': include("pages/2.php"); break; case 'abc2': include("pages/3.php"); break; case 'abc3': include("pages/4.php"); break; } } Quote Link to comment Share on other sites More sharing options...
rpr Posted December 28, 2012 Report Share Posted December 28, 2012 ielikt var, bet ko tas dos? es gan nezinu vai visās php versijās tā var izdarīt, bet pēdējās var. Quote Link to comment Share on other sites More sharing options...
snach15 Posted December 28, 2012 Author Report Share Posted December 28, 2012 gribēju visu sarežģīt ^^ īzstenībā tavs variants pat man derēja ... paldies tew! Quote Link to comment 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.