Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a solution to display error msgs over multiple pages / requests #38

Open
jhuesser opened this issue Apr 24, 2017 · 2 comments
Open

Comments

@jhuesser
Copy link
Owner

For example jodel.php contains the following code:

if(isset($_GET['upvotejodel'])){
//....
if(!$voted){
//....
else {
$_SESSION['errorMsg'] = "Already voted";
}
header('Location: https://jodel.domayntec.ch/jodels.php');
}

// ...
/....
f(isset($_SESSION['errorMsg'])) {
 ?>

 <div class="alert alert-danger" role="alert">
  
  <strong>Holy guacamole!</strong> <?php echo $_SESSION['errorMsg'];?>
</div>

So we need to clear the php $_SESSION['errorMsg'] after each time it's displayed, or find another soloutin....

@jhuesser
Copy link
Owner Author

bug because now, the messages is displayed until a user logs out

@jhuesser
Copy link
Owner Author

@CloudyWuff you said, you will check this with JS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants