Hi can anyone help me. I have an issue of converting an array object to string.Here is my code
if(isset($_REQUEST['insert']))
{
$data['first_name']=$_REQUEST['fnam'];
$data['last_name']=$_REQUEST['lnam'];
$data['reg_number']=$_REQUEST['rnum'];
$data['date_of_birth']=$_REQUEST['dobi'];
$data['date_of_joining']=$_REQUEST['dojo'];
$data['name']=$_FILES['uploadfile']['name'];// i want to convert only this value to string
$data['type']=$_FILES['uploadfile']['type'];
$data['size']=$_FILES['uploadfile']['size'];
echo http_build_query($data['name']); exit;
$uname=str_replace(" ","_",$data);
$tmp_name=$_FILES['uploadfile']['tmp_name'];
$target_path="uploads/";
$target_path=$target_path.basename($uname);
if($data['name']=="")
{
$db->query_insert('tbl_student',$data);
header('');
}
if(move_uploaded_file($_FILES['uploadfile']['tmp_name'],$target_path))
{
//if (move_uploaded_file=$_FILES['upload file']['tmp_name'],$target_path)
list($width,$height,$siz,$attr)=getimagesize($target_path);
if($width>150||$height>200)
{
echo "Your image size has exceeded the maximum length please re-enter";?>
Please <a href="">Click here</a>to return to the page
<?php die(); ?>
<?php }
if($siz>350000)
{
echo "Size is too big"; ?>
Please <a href="">Click here</a>to return to the page
<?php die();
}
if(!( $type=='image/jpeg' || $type=='image/png' || $type=='image/gif' ))
{
echo "Your input format is not valid";
?>
Please <a href="">Click here</a>to return to the page
<?php die();
}
else
{
$db->query_insert('tbl_student',$data);
$result=mysql_query($sql);
header('');
}
}
thanx in advance