Gm Prodigy 24 Posted October 22, 2018 Share Posted October 22, 2018 (edited) Well I know you can make php blocks and add them to your pages but I'm not really sure how to use them. is there any way to not use the blocks and add php or is there someone who could help me to get a block working like connecting to another database and performing simple sql queries. I'd rather make a custom page an integrate it into IPS but it seems that only HTML pages work like that or maybe I'm doing something wrong. <?php include 'includes/database.php'; include 'includes/settings.php'; if(!isset($_SESSION)) { session_start(); } if(!isset($_SESSION['username'])) { echo' <script language="javascript"> window.location.href="index.php" </script> '; } if(isset($_POST['deletetoken'])) { if(isset($_GET['id'])) { $id = $_GET['id']; $delete_token = mysqli_query($con, "DELETE FROM `tokens` WHERE `id` = '".$id."'"); if($delete_token) { echo '<meta http-equiv="refresh" content="0.00001;url=tokens.php">'; } } } $tokens = mysqli_query($con, "SELECT COUNT(1) FROM `tokens`"); $tokens_row = mysqli_fetch_array($tokens); $tokens_total = $tokens_row[0]; $today = time("Y-m-d"); ?> Edited October 22, 2018 by Gm Prodigy Link to comment Share on other sites More sharing options...
Recommended Posts