cybernet Posted October 4, 2011 Share Posted October 4, 2011 $postlist = new Smarty; ... case 'submit': foreach(explode(":","desc:title") as $v) { if (!isset($_POST[$v])) $postlist->display('no_posted_data.tpl'); } post.tpl <form action="post.php?action=submit" method="post"> <legend>..title..</legend> <table border="1"> <tr> <td>{$post_form.title}:</td> <td> <input type="text" name="title" size="40"> </td> </tr> <tr> <td valign="top">{$post_form.desc}:</td> <td><textarea name="desc" cols="80" rows="10"></textarea></td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="Submit"> </td> </tr> </table> the only problem is that if i submit the form empty is still get processed any help please ? i have even tried in a template {if !isset($_POST['title']) } die? {/if} Quote Link to comment https://forums.phpfreaks.com/topic/248438-smarty-_post-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.