cybernet Posted September 27, 2011 Share Posted September 27, 2011 i would like to create a posting page just like this form i'm writing now including return ( <br/> ) pagination, and language codes ( php mysql c++ c# ... etc without affecting site security ) are there any good tutorials i can follow or any advice ? i'm very new to smarty and i have only basic php knowledge to prove that i'm not lazy and i read the documentation this is what i got so far <?php require('../dev0_inc/smarty/Smarty.class.php'); require('../dev0_inc/config/ride_mysql.php'); $smarty = new Smarty; $smarty->error_reporting = E_ALL & ~E_NOTICE; // $smarty->debugging = true; $smarty->caching = false; $smarty->cache_lifetime = 120; // setConfig for *.conf files $smarty->setConfigDir('../dev0_inc/config'); // $smarty-> // sqL $result = mysql_query("SELECT * FROM posts ORDER BY `id` DESC LIMIT 0 , 50") or die(mysql_error()); // For each result that we got from the Database while ($line = mysql_fetch_assoc($result)) { $value[] = $line; } // Assign this array to smarty... $smarty->assign('posts', $value); $config['cyber_date'] = '%d %b %y, %T'; $smarty->assign('config', $config); $smarty->display('index.tpl'); ?> and i'm using phpmyadmin to insert data so far i read from documentation that i have to escape the assign values, but i don't know if it's secure using smarty 3.1.1, thanks for reading - cybernet Quote Link to comment https://forums.phpfreaks.com/topic/247980-smarty-submit-form/ Share on other sites More sharing options...
cybernet Posted October 4, 2011 Author Share Posted October 4, 2011 please delete topic Quote Link to comment https://forums.phpfreaks.com/topic/247980-smarty-submit-form/#findComment-1275776 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.