您好,欢迎访问一九零五行业门户网

javascript-onsubmit触发事件把表单数据发送到相关php处理问题

phpjavascript
问题详情:onsubmit触发事件把表单数据发送到相关php处理但是如何避免数据有问题时也会触发事件呢?
function dosubmit(){ window.open('num3.php?cf='+window.form.cf.value+'&cf1='+window.form.cf1.value); }
0) && ($st_size {
if($_files['st']['error']==0){
$target=gw_uploadpath .$st;
//第30行
if(move_uploaded_file($_files['st']['tmp_name'],$target)){
$dbc=mysqli_connect(host,user,password,name);
$st=$_files['st']['name'];
$query=insert into b (date,st,score,name).
values(now(),'$st','$score','$name');
//第40行
mysqli_query($dbc,$query)
or die('uu');
echo'you are success to add dates to mysql '.'
';echo 'name :'.$name.'
';echo 'score : '.$score.'
';echo 'photo :'.''; //第50行 echo'back to index page
';
//clear the score datas
$name=;
$score=;
$st=;
mysqli_close($dbc);
}//if(move_uploaded_f
else
{
echo $_files['st']['error'];
echo'
文件没有移动成功 !!';//第60行
}
}//if($_files['st']['error']
else
echo'there is something wrong to upload the file ! plese upload it agian.';
}//if(($st_type=='image/gif'
else echo'
the screen pic must be a gif,jpeg, or png image and the file '.'size must fit '.'(max_file_size/1024)'.'kb.
';}//else //第70行
//try to delete the temporary screen shot image file.
@unlink($_files['st']['tmp_name']);
}else $output_form=true;
if($output_form){
?>
your name:
your score:
your photo:
商品交易; 商品互换;
其它类似信息

推荐信息