Is it possible to reload a parent php file WITHOUT javascript ?I dont wanna use Javascript because if the client has disabled Javascript .
So I have a object and there should be a button to change the background color of the main page
parent.php
:
<!doctype html>
<html>
<head>
<title>This is the title of the webpage!</title>
<?php
session_start();
$_SESSION['backgroundcolor'] = '#fcba03';
?>
</head>
<body style="background-color:<?php echo $_SESSION['backgroundcolor'];?>">
<object data="changebackground.php" width="500" height="200">
</object>
</body>
</html>
changebackground.php
:
<form action="" method="post">
<input type="submit" value="change bgcolor" name="submit">
</form>
<?php
$var = "#ff0000";
if (isset($_POST['submit'])) {
$_SESSION['backgroundcolor'] = $var;
}
?>
source https://stackoverflow.com/questions/70622445/is-it-possible-to-reload-a-parent-php-file-without-javascriptworks
Comments
Post a Comment