Hi, Woud someone be able to help?
I can't for the life of me figure out how to get this to store a image path instead of the image itself. In other words I want to make this so that the user isn't uploading an image. I want to use a radio or check box that they pick from. Any help would be appreciated. <?php if ($submit) { $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data))); $uid="{$session["uid"]}"; $result=MYSQL_QUERY("INSERT INTO binary_data (uid,description,bin_data,filename,filesize,filetype) ". "VALUES ('$uid','$form_description','$data','$form_data_name','$form_data_size','$fo rm_data_type')"); $id= mysql_insert_id(); print "<p><b>Your pet has been entered</b>"; MYSQL_CLOSE(); } else { ?> <form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data"> File Description:<br> <input type="text" name="form_description" size="40"> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to upload/store in database:<br> <input type="file" name="form_data" size="40"> <--------I already have the image on the server how do I change this to store the path <p><input type="submit" name="submit" value="submit"> </form> <a href="store.php">back</a> <?php } ?> this is the table CREATE TABLE binary_data ( id int(4) NOT NULL auto_increment, uid int(10) NOT NULL default '0', description varchar(50) default NULL, bin_data longblob, filename varchar(50) default NULL, filesize varchar(50) default NULL, filetype varchar(50) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; Thanks in advance Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php