Doing a Mysql database thing that can store images as part of a user registration thing(give your info and can browse to select a picture as well). Anyways, It works Perfect, as long as they select a picture. How can i make it so if no pic is selected, it will do an action, such as set a variable to 0, or chose a default pic....heres the code:
<?
$db = mysql_connect("localhost", "root", "XXXXXXX");
mysql_select_db("screenshots");
$data = addslashes(fread(fopen($form_data, "r"),
filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO screens
(description,bin_data,filename,filesize,filetype) ".
"VALUES
(0,'$data','$form_data_name','$form_data_size','$form_data_type')");
$imageid= mysql_insert_id();
would form_data_size be = 0 if there was non selected?