0

Hello Friends, I want to upload an image to the server and also insert the image path into the database, I have a sample of my code below

<cfinput type="text" name="city">
      </label></td>
      <td>State</td>
      <td><label>
        <cfinput type="text" name="state">
      </label></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Email</td>
      <td><label>
        <cfinput type="text" name="email" validate="email" required="no" >
      </label></td>
<td>Picture</td>
      <td height="23"><label>
        <cfinput type="file" name="picture">
      </label></td>
I use the typical SQL syntax as below
INSERT INTO patient(
id,
lastname,
mi,
firstname,
age,
VALUES(
'#Trim(Form.id)#',
'#Trim(Form.lastname)#',
'#Trim(Form.mi)#',
'#Trim(Form.firstname)#',
'#Trim(Form.age)#',

Could someone give me a detailed description, on how to write the action page so I can insert the image path into the database.

Thanks

1
Contributor
1
Reply
3
Views
9 Years
Discussion Span
Last Post by zoid777
0

Hello Coders I finally figured it out, all i had to do was reference cffile.serverfile and use it in my insert statement

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.