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.


if ($submit) {

    $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
    $result=MYSQL_QUERY("INSERT INTO binary_data
(uid,description,bin_data,filename,filesize,filetype) ".

    $id= mysql_insert_id();
    print "<p><b>Your pet has been entered</b>";


} else {


    <form method="post" action="<?php echo $PHP_SELF; ?>"
    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">
<a href="store.php">back</a>



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,

Thanks in advance

Jennifer Downey

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to