Good afternoon, I want to create an index.php and that at the same time open several .php files but without having to reload the page
A friend gave me this .js that he uses to make said function
` let style = ["betados", "administradores", "ranking", "pug_history", "demo_history"];
var pag = 0;
var pagin = 0;
function ActualizarPag() {
$('#content_right').load('include/web/content_right_bans.php?i='+ pag + '&c=1&pagina=' + pagin);
return false;
}
function PaginadorClick(val) {
pagin = val;
$('#content_right').load('includes/right_content.php?i='+ pag + '&c=1&pagina=' + val);
return false;
}
function DisplayRightContent(val) {
pag = val;
$('#titulo').load('includes/right_content.php?i=' + val + '&c=0');
$('#content_right').load('includes/right_content.php?i=' + val + '&c=1');
$('#menu').load('includes/right_content.php?i='+ val +'&c=2');
return false;
}
function DisplayMatchContent(match_id) {
pag = 3;
$('#titulo').load('includes/right_content.php?i=' + 3 + '&c=0&m=' + match_id);
$('#content_right').load('includes/right_content.php?i=' + 3 + '&c=1&m=' + match_id);
$('#menu').load('includes/right_content.php?i='+ 3 +'&c=2&m=' + match_id);
return false;
}
$('#titulo').load('includes/right_content.php?i=0&c=0');
$('#content_right').load('includes/right_content.php?i=0&c=1');
$('#menu').load('includes/right_content.php?i=0&c=2'); `
The truth is that I have not tried it myself since I do not know how to start, the idea is that from a single .php file open several at the same time but without reloading the page
This is the index.php where I want to do everything
` <?php
$pag = 0;
include "include/web/steam.php";
include "include/web/conexion.php";
include "include/geoip.inc";
date_default_timezone_set("America/Caracas");
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, user-scalable=1">
<title id="titulo">Baneados | Test</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
<link rel="stylesheet" href="css/default.css">
<link rel="stylesheet" href="css/paginador.css">
<link rel="stylesheet" href="css/betado_stats.css">
<link rel="stylesheet" href="css/hover/hover.css" media="all">
<link rel="stylesheet" href="css/icomoon/style.css">
<link rel="icon" type="image/jpg" href="img/logo.png">
<link rel="stylesheet" href="css/right_content/administradores.css">
<link rel="stylesheet" href="css/right_content/betados.css">
<link rel="stylesheet" href="css/right_content/demo_history.css">
<link rel="stylesheet" href="css/right_content/pug_history.css">
<link rel="stylesheet" href="css/right_content/ranking.css">
</head>
<body>
<div id="style_right"></div>
<div class="contenedor">
<div class="animate__animated animate__backInDown">
<div class="banner">
<img src="img/banner3.png" alt>
</div>
<?php include "include/web/menu.php";?>
<?php include "include/web/content_left.php";?>
<?php include "include/web/content_right_bans.php";?>
</div>
<div class="footer">
<p>
Copyright © 2022 |
<a href="index.php">Test e-Sports</a>
</p>
</div>
</div>
<script src="js/right_content.js"></script>
<script src="js/index.js"></script>
<script src="js/right/betados.js"></script>
<script src="js/right/administradores.js"></script>
<script src="js/right/ranking.js"></script>
</body>
</html> `
in this part
` <?php include "include/web/menu.php";?>
<?php include "include/web/content_left.php";?>
<?php include "include/web/content_right_bans.php";?> `
is where I want the functions to be performed.
I don’t know if it is allowed, if it is not, let me know to remove the link, on this page is what I am trying to recreate, in the menu section when you click and see another section, it shows the data without having to reload the page