我想制作我的表单,当它们发送时,它会自动在表格上显示“待定”值

时间:2015-12-17 14:14:42

标签: javascript php mysql

<?php
if (isset($_POST['submit']))
{   
    $username=$_POST['username'];

    $url=$_POST['url'];
    $bank=$_POST['bank'];
    $namarekening=$_POST['namarekening'];
    $norekening=$_POST['norekening'];
    $nohape=$_POST['nohape'];
    $email=$_POST['email'];
    $anda=$_POST['anda'];

    mysql_query("insert into users  (username,email,namarekening,norekening,nohape,anda,url,bank)
    values('$username','$email','$namarekening','$norekening','$nohape','$anda','$url','$bank')
    ")or die(mysql_error());
    ?>
    <script>alert('Successfully Registered!'); window.location = 'pesarta.php';</script>"
    <?php
}   
?>

这是我的代码,任何想法我该怎么做,我用3列,号码,URL制作表格,另一个是状态。我想如果他们发送,它会自动用待处理的状态填充状态表。

1 个答案:

答案 0 :(得分:-1)

在您的mysql表(用户)中为字段状态设置默认值 待处理