0
function uyeyap()
{
global $veriyolu;
$idno=$_REQUEST['uyeno'];
$guncelle=mysql_query("uptade uyeler set onay='1' where uyeno='$idno'",$veriyolu);

if($guncelle){
             echo "<script>alert(' Üye Yapıldı! ')</script>";
             echo "<meta http-equiv='Refresh' content='0; URL=yonetim.php'>";
             }else{
             echo "<script>alert(' !! Üye Yapılamadı !! ')</script>";
             echo "<meta http-equiv='Refresh' content='0; URL=yonetim.php'>";            
             }
}

function adminyap()
{
global $veriyolu;
$idno=$_REQUEST['uyeno'];
$guncelle=mysql_query("uptade uyeler set onay='2' where uyeno='$idno'",$veriyolu);
if($guncelle){
             echo "<script>alert(' Admin Yapıldı! ')</script>";
             echo "<meta http-equiv='Refresh' content='0; URL=yonetim.php'>";
             }else{
             echo "<script>alert(' !! Admin Yapılamadı !! ')</script>";
             echo "<meta http-equiv='Refresh' content='0; URL=yonetim.php'>";            
             }
}

function sil()
{
$idno=$_REQUEST['uyeno'];
global $veriyolu;
$guncelle=mysql_query("delete from uyeler where uyeno='$idno'",$veriyolu);
if($guncelle){
             echo "<script>alert(' Silindi ! ')</script>";
             echo "<meta http-equiv='Refresh' content='0; URL=yonetim.php'>";
             }else{
             echo "<script>alert(' !! Silinemedi !! ')</script>";
             echo "<meta http-equiv='Refresh' content='0; URL=yonetim.php'>";            
             }
}
<?php
$menu= $_GET['menu'];
if ($menu = 1)
{
echo "<table>";
$sql1="select * from uyeler order by onay desc";
$sorgu1=mysql_query($sql1);
while ($sql1sonuc = mysql_fetch_array($sorgu1))
{
if ($sql1sonuc["onay"]==2)
{
echo "<tr><td><font color='red'><b>Admin</b></font></td><td>&nbsp</td><td>".$sql1sonuc['kulladi']."</td><td>&nbsp</td><td>"."<a href='yonetim.php?menu=$menu&uyeno={$sql1sonuc['uyeno']}&git=uyeyap'>Üye yap</a>"."</td></tr>";
}
if ($sql1sonuc["onay"]==1)
{
echo "<tr><td><font color='blue'>Üye</font></td><td>&nbsp</td><td>".$sql1sonuc['kulladi']."</td><td>&nbsp</td><td>"."<a href='yonetim.php?menu=$menu&uyeno={$sql1sonuc['uyeno']}&git=adminyap'>Admin yap</a>"."</td></tr>";
}

}
echo "</table>";
}
?>
</div>
</body>
<?php
switch ($_GET['git']){ 
case "adminyap";
adminyap();
break;
case "uyeyap";
uyeyap();
break;
}
?>

大家好,我有一个问题:(函数不起作用。不要更改mysql数据。函数有问题吗?对不起,我是新手,我使用的方法有误吗?我怎样才能让它工作?请求方法有误?

4

1 回答 1

1

在您的查询中,您键入uptade而不是update.Check your query

于 2013-01-08T05:06:48.010 回答