Open saweetha opened 6 years ago
please post the code here, it should be a simple code error.
This is the index.php
<?php
session_start();
if(!isset($_SESSION['username'])) { header('Location: login.php'); }
?>
<?php include('config/setup.php'); ?>
<!DOCTYPE html>
Page could not be '.$action.' because: '.mysqli_error($dcb); $message .= '
'.$q.'
'; } } ?>Try changing the $_GET['id']
on the $q
for $_POST['id']
on the update statement or the other way around.
Also, the input for the id
is not closed
it showing a syntax error if I close the id
please provide the error
It never shows error, my admin page contain just dissapear.
Try changing the form action from:
<form action="index.php?id=<?php echo $opened['id']; ?>" ...>
To
<form action="index.php?page=#insert_page_here#&id=<?php echo $opened['id']; ?>" ...>
The page is the name you're accessing in the admin dashboard, for example my page would be page_adm
.
Sir, still I'm having the updating issue.
Does your code still updates twice? Or updates the page while creating a new one?
If I add one page, the out come is two pages. How to solve this issue ?