User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 373,469 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,968 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 997 | Replies: 1
Reply
Join Date: Feb 2008
Posts: 16
Reputation: zoid777 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
zoid777 zoid777 is offline Offline
Newbie Poster

Question IMAGE AND TEXT FORM(HELP!!!)

  #1  
Mar 6th, 2008
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
Last edited by peter_budo : Mar 6th, 2008 at 6:05 am. Reason: Please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2008
Posts: 16
Reputation: zoid777 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
zoid777 zoid777 is offline Offline
Newbie Poster

Re: IMAGE AND TEXT FORM(HELP!!!)

  #2  
Mar 27th, 2008
Hello Coders I finally figured it out, all i had to do was reference cffile.serverfile and use it in my insert statement
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ColdFusion Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 5:20 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC