我的reg_后面的图像错误 [英] Image error on my reg_ from after process

查看:64
本文介绍了我的reg_后面的图像错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?php



if ($_FILES['image']['size'] <= 0)

    {

        die ('Please you must upload a picture. Click <a href="Register.php">here</a> to return to registration page') ;
    }
else{
require ("connection.php");
require ("image_process.php");

$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die("Could not connect to MySQL database. ". mysql_error());
mysql_select_db(SQL_DB,$conn)  or die(mysql_error());
$_SESSION['fullname']=$_POST['fullname'];
$_SESSION['email']=$_POST['email'];
$sex = $_POST['sex'];
$height = $_POST['height'];
$_SESSION['career'] = $_POST['career'];
$_SESSION['phone']=$_POST['phone'];
$_SESSION['city']=$_POST['city'];
$about = $_POST['about'];
$_SESSION['DepositorName'] = $_POST['DepositorName'];
$_SESSION['BankName'] = $_POST['BankName'];
$TellerNo = $_POST['TellerNo'];
$_SESSION['DepositorPhone'] = $_POST['DepositorPhone'];
$_SESSION['refname']=$_POST['refname'];
$_SESSION['refphone']=$_POST['refphone'];
$date=date('Y-m-d');
$_SESSION['date'] = $date;
//$_SESSION['num'] = $numb;
$_SESSION['image']= $mypix;
$sqlb="insert into participant (`fullname`,`email`,`sex`,`height`,`career`,`phone`,`city`,`about`,`DepositorName`,`BankName`,`TellerNo`,`DepositorPhone`,`refname`,`refphone`,`date`,`image`)

values('$_POST[fullname]','$_POST[email]','$_POST[sex]','$_POST[height]','$_POST[career]','$_POST[phone]','$_POST[city]','$_POST[about]','$_POST[DepositorName]','$_POST[BankName]','$_POST[TellerNo]','$_POST[DepositorPhone]','$_POST[refname]','$_POST[refphone]','date','$mypix')" or die(mysql_error());
mysql_query($sqlb) or die(mysql_error());

echo "your detail has been captured successfully.";
//header("location:print.php");
}

//echo "<font color='red'><b>$sname</b></font> has been saved successfully.Click <a href='form2.php'>here</a> to get your place of primary posting...";
//echo "<br>";
//echo "<b>Click <a href='reg.php'>here</a> fill another form</b>";

?>





我有一张包含图片的表格



提交后....我收到第一个错误:

请你上传图片。点击这里返回注册页面。请问我知道哪里错了?



I have a form which image is included

after submiting.... i get the first error:
Please you must upload a picture. Click here to return to registration page.. Pls MAy i know where am wrong?

推荐答案

_FILES ['image'] ['size'] < span class =code-summarycomment> < = 0)

{

die ('Please 必须 upload a picture。 点击 < ; href = Register.php > 此处< / a > 返回注册页面');
}
else {
require(connection.php);
require(image_process.php);
_FILES['image']['size'] <= 0) { die ('Please you must upload a picture. Click <a href="Register.php">here</a> to return to registration page') ; } else{ require ("connection.php"); require ("image_process.php");


conn = mysql_connect(SQL_HOST,SQL_USER,SQL_PASS)或die(无法连接到MySQL数据库。。mysql_error() );
mysql_select_db(SQL_DB,
conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS) or die("Could not connect to MySQL database. ". mysql_error()); mysql_select_db(SQL_DB,


conn)或死(mysql_error());
conn) or die(mysql_error());


这篇关于我的reg_后面的图像错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆