Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ?>
- <link rel="stylesheet" href="http://localhost/keuangan/emprit/setting/background.css" type="text/css"></link>
- <?php
- include "../../koneksi.php";
- function spesial($text){
- $text = htmlspecialchars($text);
- $text = preg_replace("/=/", "=\"\"", $text);
- $text = preg_replace("/"/", "\"", $text);
- $tags = "/<(\/|)(\w*)(\ |)(\w*)([\\\=]*)(?|(\")\""\"|)(?|(.*)?"(\")|)([\ ]?)(\/|)>/i";
- $replacement = "<$1$2$3$4$5$6$7$8$9$10>";
- $text = preg_replace($tags, $replacement, $text);
- $text = preg_replace("/=\"\"/", "=", $text);
- $text = nl2br($text);
- $text = preg_replace("/"/", """", $text);
- return $text;
- }
- $pass=sha1($_POST['pass']);
- $nama=spesial($_POST['nama']);
- mysql_query("INSERT INTO user values ('','$_POST[username]','$pass','$nama','$_POST[level]','$_POST[alamat]','$_POST[email]')")or die(mysql_error());
- echo "<H2><center>Proses Tambah User sudah masuk!</center></H2>";
- $hal="user.php";
- echo "<meta http-equiv=\"refresh\" content=\"2;url=$hal\">";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment