ok so im working on uploading files to a database, i wrote the upload part in php. but i want vb to execute it. i would write it over in vb but im not the best vb programmer cause i just started using it. so what i want is when the user clicks the button upload i want it to execute my php code and capture its outcome. is this possible? if so how to do it .
if you want to see he code to see if possible here is my php code
if(isset($_POST['upload']) && $_FILES['userfile']['size'] > 0)
{
$fileName = $_FILES['userfile']['name'];
$tmpName = $_FILES['userfile']['tmp_name'];
$fileType = $_FILES['userfile']['type'];
$fileSize = $_FILES['userfile']['size'];
$fp = fopen($tmpName, 'r');
$content = fread($fp, filesize($tmpName));
$content = addslashes($content);
fclose($fp);
if(!get_magic_quotes_gpc())
{
// $fileName = addslashes($fileName);
}
$query = "INSERT INTO upload (name, type, size, content) VALUES
('$fileName', '$fileType', '$fileSize', '$content')";
mysql_query($query) or die('Error, query failed');
echo "<br>File $fileName uploaded<br>";
}