|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
nemesisjack Smarty n00b
Joined: 13 Dec 2013 Posts: 3
|
Posted: Thu Dec 19, 2013 12:53 am Post subject: What is the recommended way to deal with form error pages |
|
|
Hello,
I'm teaching myself PHP and smarty and need some guidance.
I have created a couple of forms and wanted an error page that looked nice. The tutorial I started with had a simple error function.
Code: |
function show_error($myError){
?>
<html>
<body>
<p>Please correct the following error:</p>
<strong><?php echo $myError; ?></strong>
<p>Hit the back button and try again</p>
</body>
</html>
<?php
exit();
}
?>
|
Ideally, I would like to redirect user to another page, with my layout, but somehow bring along the $myError variable to this new page so I can show the user where he went wrong.
I am doing client-side validation and sanitizing the inputs. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|