1原代码:
echo"<li><a href='javascript:void(0);' id='newjh'>提交</a></li>";
jquery代码:
$("#newjh").click(function(){
user=$("#user").val();eml=$("#eml").val();
pwc=$("#pwc").val();name=$("#name").val();
if(user!=null && eml!=null){
if(pwc!=null){
$.get("persusnavi1act.php?", {nick:user,email:eml,password:pwc,fptime:name}, function(data){
$("#tip").html(data);});
}
else $("#tip").html("(~ _ ~) 修改失败!");
}
else $("#tip").html("(~ _ ~) 修改失败!");
});
处理脚本:
$name=$_GET[fptime];
if($name!=NULL){
$mysql2=mysql_query("select Ptime from jhresume where name='$name'");
while($row2=mysql_query($mysql2)){$Ptime=$row2[Ptime];}
if($Ptime){
$mysql3=mysql_query("update jobhunter set nick='$_GET[nick]',email='$_GET[email]',pasw='$_GET[password]' where Ptime='$Ptime'");
if($mysql3) echo"(^_^) 修改成功!";
else echo"(~ _ ~) 修改失败!";
}
else echo"(~ _ ~) 修改失败!";
}