Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

What is the recommended way to deal with form error pages

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
nemesisjack
Smarty n00b


Joined: 13 Dec 2013
Posts: 3

PostPosted: Thu Dec 19, 2013 12:53 am    Post subject: What is the recommended way to deal with form error pages Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP