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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.