我想用 Jquery 在我的数据表中编辑照片。为此,
<a href="ajax/edit_photo.php?id=<?=$row['ID']?>" class="edit ajax" id="">-->'Edit Photo Link'
编辑照片.php:
<div class="photoEdit">
    <form id="editphoto" action="1.php?id=<?=$_GET['id']?>" method="post" class="stdform quickform" enctype="multipart/form-data">
    //My Forms...
    </form>
</div>
我的jQuery:
jQuery('#editphoto').submit(function(){
            var formdata = jQuery(this).serialize();
            var url = jQuery(this).attr('action');
            jQuery.post(url, formdata, function(data){                          
            jQuery('.notifyMessage').addClass('notifySuccess');
                //otherwise
                //jQuery('.notifyMessage').addClass('notifyError');
                jQuery.fn.colorbox.resize();    
            });
            return false;
        });
还有我的 1.php
<? 
include("../../connection.php");
include("../../functions/upload.php");
?>
<?
$limit="1048576";
if(isset($_GET['kaydet'])){
    $id=$_GET['id'];
    $icerik=$_POST['icerik'];
    $picture=DoUpload("picture",$limit,$FileUploadPath);
    $result=mysql_query("SELECT * FROM tbl_photo WHERE ID=$id");
    $picture2=mysql_result($result,0,"picture");
    if($picture=='')
    $picture=$picture2;
    if($picture!="")
{
    mysql_query("UPDATE  `tbl_photo` SET  `picture` =  '$picture',`icerik` =  '$icerik' WHERE `ID` =$id");
    }
}
?>
我编码了一些东西。但是在我的操作中,Jquery 不起作用。所以,什么都没有。