0

<?php
$con = mysql_connect("localhost","root","")or die (mysql_error());
mysql_select_db("registration", $con);
function protect($value){
$value=mysql_real_escape_string($value);
$value=stripslashes($value);
$value=strip_tags($value);
}
if(isset($_POST) && $_FILES >0)
{
$fileName = $_FILES;
$tmpName = $_FILES;
$fileSize = $_FILES;
$fileType = $_FILES;
$fp = fopen($tmpName, 'r');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);
$sql = "INSERT INTO signup_image (name, size, type, content ) VALUES ('$fileName', '$fileSize', '$fileType', '$content')";
$result = mysql_query($sql,$con);//PROBLEM HERE(LINE 121)
if($result>0)
{
echo"<p>file $fileName uploaded</p>";
}
}
mysql_close($con);
?>
when i try to send file i got message MySQL server has gone away on line 121
so please help me!

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by tomato.pgn
0

just notify which is line 121 ....i can only see few lines...
and by the way use CODE tag to write code....

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.