SHARE
TWEET

Untitled

a guest Jul 21st, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Morning,
  2.  
  3. I'm trying to integrate SMARTY with my script, I've done most of it except my registration page if I used smarty the php code can't identify the info from my smarty tbl
  4.  
  5. Here's my php file :
  6.  
  7. [code]require('libs/Smarty.class.php');
  8.     $smarty = new Smarty();
  9.     $smarty->setTemplateDir('libs/templates');
  10.     $smarty->setCompileDir('libs/templates_c');
  11.     $smarty->setCacheDir('libs/cache');
  12.     $smarty->setConfigDir('libs/configs');
  13.     $smarty->assign('usern', 'Username:');
  14.     $smarty->assign('userp', 'Password:');
  15.     $smarty->assign('userm', 'E-Mail:');
  16.     $smarty->assign('userrp', 'Re-Enter Your Password:');
  17.     $smarty->assign('usersiteurl', 'Site URL:');
  18.     $smarty->display('register_form.tpl');
  19.  
  20.  
  21.     }[/code]
  22.  
  23. Here's my template :
  24.  
  25. [code]
  26. <form name="form1" method="post" action="register.php">
  27.     <table width="600" border="0" cellspacing="0" cellpadding="4">
  28.     <tr>
  29.     <td width="196">{$usern}</td>
  30.     <td width="388"><label for="username"></label>
  31.     <input type="text" name="username" id="username"></td>
  32.     </tr>
  33.     <tr>
  34.     <td>{$userm}</td>
  35.     <td><label for="email"></label>
  36.     <input type="text" name="email" id="email"></td>
  37.     </tr>
  38.     <tr>
  39.     <td>{$userp}</td>
  40.     <td><label for="password"></label>
  41.     <input type="password" name="password" id="password"></td>
  42.     </tr>
  43.     <tr>
  44.     <td>{$userrp}</td>
  45.     <td><label for="password_confirm"></label>
  46.     <input type="password" name="password_confirm" id="password_confirm"></td>
  47.     <tr><td>{$usersiteurl}</td>
  48.     <td><label for="site_url"></label>
  49.     <input type="text" name="site_url" id="site_url"></td>
  50.     </tr></tr>
  51.     <tr>
  52.     <td><input name="ip" type="hidden" value="<?php echo $_SERVER["REMOTE_ADDR"]; ?>"></td>
  53.     <input name="date" type="hidden" value="<?php echo date('d M Y - H:i'); ?>"></td>
  54.     <td><input type="submit" name="register" id="register" value="Register"></td>
  55.     </tr>
  56.     </table>
  57.     </form>[/code]
  58.  
  59. If I added this code directly to register_form.php the registration is working fine, But If I integrated it with SMART it doesn't make the register.php file able to read the post method so the file can't write to the database.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top