07-20-2023, 01:33 PM
The web page i want to go to is
I have a file called projects.php that looks for variables and includes the correct page (projectsm projectdetails, projectedit...) But i don't know how to make the script detect if there is a page definition (`?action=projectdetails`) The `&id` variable tells to server what id to query on the database to retrieve information.
Here is my current code (which doesn't work)
<?php
session_start();
ob_start();
$currentPage = 'usrprojects';
require ('assets/config.inc.php');
if (isset($_SESSION['logged_in']) != true) {
header("location: login.php");
}
else {
if (isset($_GET['action'])){
if( isset($_GET['projectdetails']) && $_GET['projectdetails'] == "")
{
echo "asd";
}
}
else {
require 'includes/pages/projects.php';
}
}
?>
[To see links please register here]
I have a file called projects.php that looks for variables and includes the correct page (projectsm projectdetails, projectedit...) But i don't know how to make the script detect if there is a page definition (`?action=projectdetails`) The `&id` variable tells to server what id to query on the database to retrieve information.
Here is my current code (which doesn't work)
<?php
session_start();
ob_start();
$currentPage = 'usrprojects';
require ('assets/config.inc.php');
if (isset($_SESSION['logged_in']) != true) {
header("location: login.php");
}
else {
if (isset($_GET['action'])){
if( isset($_GET['projectdetails']) && $_GET['projectdetails'] == "")
{
echo "asd";
}
}
else {
require 'includes/pages/projects.php';
}
}
?>