CEGONSOFT PVT LTD, Malleshwaram - Pioneers in software training programs, which has quality training and infrastructure up to the mark of the IT industry requirements.Training cum Interview Assistance
PHP/ MYSQL:
Features:-


- Overview of php5.3
- Classes and Objects (php 5.3)
- Working with Databases and forms
- Working with session and cookies with php
- DDL, DML and DCL statements
- Stored Procedures and Functions
- Triggers and views
- Introduction of Ajax, Apache webserver


How to upload a file to database?
<?php
if(isset($_POST['upload']) && $_FILES['userfile']['size'] > 0)
{
$fileName = $_FILES['userfile']['name'];
$tmpName = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];


echo $fileName;

$fp=fopen($tmpName,'r');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);

if(!get_magic_quotes_gpc())
{
$fileName = addslashes($fileName);
}

$mysql=mysql_connect("localhost","root","");
mysql_select_db("upload",$mysql);
$query = "INSERT INTO upload (name, size, type, content ) ".
"VALUES ('$fileName', '$fileSize', '$fileType', '$content')";

mysql_query($query) or die('Error, query failed');
echo "<br>File $fileName uploaded<br>";
}
?>

For any further clarifications, feel free to contact us:
Eswar
mobile: 9008911336