Senin, 09 September 2013

PHP Indonesia - Facebook: para master.. saya mebuat form input ... tidak mau...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
How to Get into Medical School

A tested blueprint to approach the daunting admissions process with both confidence and success! Enroll in this online course for just $29.
From our sponsors
para master.. saya mebuat form input ... tidak mau...
Sep 9th 2013, 11:06, by Irfan Atjeh Rayeuk

Irfan Atjeh Rayeuk 11:06am Sep 9
para master..
saya mebuat form input ...
tidak mau masuk ke database nya...
tlng pencerahan nya ...

<?php
include"assabil-include/koneksi.php";
include "menu.php";

?>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

<style type="text/css">
<!--
.style1 {
color: #FF0000;
font-style: italic;
font-weight: bold;
}
-->
<!--
body {
background-image: url(../../FINAL PHP/admin/image/bkg.png);
background-repeat: no-repeat;
background-attachment: fixed;
}
//-->
</style>
<script>
$(document).ready(function(){
$.validator.addMethod("username", function(value, element) {
return this.optional(element) || /^[a-z0-9\_]+$/i.test(value);
}, "Username must contain only letters, numbers, or underscore.");

$("#regForm").validate();
});
</script>
</head>
<div id="isi_content">
<div class="content_kiri">
<body >

<h2>
<? //memangil koneksi database
include"assabil-include/koneksi.php";

//menerima data kiriman dari form
$stat = $_REQUEST[stat] ;
$username = $_REQUEST[username] ;
$password = $_REQUEST[password] ;
$nama_lengkap = $_REQUEST[nama_lengkap] ;
$email = $_REQUEST[email] ;
$no_tlp = $_REQUEST[no_tlp] ;
$level = $_REQUEST[level] ;


//jika belum di klik input data
$sts = $stat ;
if ($sts == "" or $sts == 0 )
{
?>

</h2>
<h1>Form Tambah Admin</h1>
<form action="admin.php" method="post" enctype="multipart/form-data" name="input" id="input">
<table cellpadding="0" cellspacing="0" border="0" width="700">
<tr>
<td width="200">Username</td>
<td>:
<input type="text" name="username" size="30" maxlength="30" id="username" /></td>
</tr>
<tr>
<td>Password</td>
<td>:
<input type="text" name="password" size="30" maxlength="30" id="password" /></td>
</tr>
<tr>
<td>Nama</td>
<td>:
<input type="text" name="nama_lengkap" size="30" maxlength="30" id="nama_lengkap" /></td>
</tr>
<tr>
<td>Email</td>
<td>:
<input type="text" name="email" size="30" maxlength="30" id="email" /></td>
</tr>
<tr>
<td>Nomor Telpon</td>
<td>:
<input type="text" name="no_tlp" size="30" maxlength="30" id="no_tlp" /></td>
</tr>
<tr>
<td>Level</td>
<td>:
<select name="level">
<option value="">================</option>
<option value="1">Admin</option>
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;&nbsp;&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;&nbsp; <input type="submit" name="Input" value="Input Data" /> <input type="reset" name="reset" value="Reset" /></td>
</tr>
</table>

</form>
<!-- PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=174 height=189 name="gToday:normal:./calender/agenda.js" id="gToday:normal:./calender/agenda.js" src="./calender/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe>
</div>
<p><span class="isi">
<? }
elseif ($stat==1)
{ // echo "</p><br><br><br><br>$id_nasabah";
$msg=" !!!";

$queryx="INSERT INTO admin (username, password, nama_lengkap, email, no_tlp, level)
values('$username','$password','$nama_lengkap','$email','$no_tlp','$level')";
$cursor = mysql_query($queryx);
if(!$cursor)
{

?>
</span></p>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="90%"><div align="center"><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong>
</strong></font></font>
<table width="33%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../../FINAL PHP/icon/images.jpg" width="78" height="58"></td>
<td><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong>&nbsp;&nbsp;<font color="#FF0000">Gagal
<? echo $msg; ?>
</font></strong></font></font></td>
</tr>
<tr>
<td width="4%">&nbsp;</td>
<td width="96%"><font size="2">&nbsp;Data Gagal di Masukan Silahkan
Ulang Kembali!!!</font></td>
</tr>
</table>
</div></td>
<td width="10%"><div align="right"><strong><font size="2">| <a href="javascript:history.go(-1)">Kembali</a>
| </font></strong></div></td>
</tr>
</table>
<?
exit;
}

?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="90%"><div align="center"><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong>
</strong></font></font>
<table width="33%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../../FINAL PHP/icon/download.jpg" width="62" height="45"></td>
<td><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong>&nbsp;&nbsp;Sukses</strong></font></font></td>
</tr>
<tr>
<td width="4%">&nbsp;</td>
<td width="96%"><font size="2">&nbsp;Data Sukses di Masukan</font></td>
</tr>
</table>
</div></td>
<td width="10%"><div align="right"><strong><font size="2">| <a href="../../FINAL PHP/admin/Data_suratmasuk.php" target="mainF"></a>
| </font></strong></div></td>
</tr>
</table>
<?
}
//if(!$hasiltj)
//{
// echo "Maaf Ada Kesalahan Pada Server Kami......";
// exit;
//}*/?>
</body>
</html>
</div><!-- end content kiri -->

Ibnu Calm 11:11am Sep 9
ada errornya ngga ?
,ciba yang bwat nrima data .dipindah di dalam query.
pake <?php

Irfan Atjeh Rayeuk 11:13am Sep 9
gak ada error.. yanga ada pas kikta klik tombol input... malah keluar form lagi...

Ibnu Calm 11:17am Sep 9
coba diganti pake $_POST ,tambahin if isset..

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar