1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Rep Power

    Need the code to insert into access db a URL address


    I've just about got this project done, just need help on this one last thing. Running Coldfusion 9.01 using Dreamweaver on XP.

    The Code I have saves or Adds or Inserts into the MS Access database just like it suppose to but I need for it to save the URL address instead of the Windows direct address ie its saves it in the database as D:\inetpub\wwwroot\somedirectory\Images\image.gif. What I need is the code for it to display or insert the address as follows, either Http://localhost/somedirectory/images/image.gif or ../images/gif . I hate to bother people with this, I usually can figure this out but this one has me stumped. The code I have for this follows.

    <CFFORM action="Normal_Add.cfm" method="post">
    <INPUT type="hidden" name="Normal_Add" value="1">

    <table class="TableBasic">

    <TD valign="top" align="right" class="FieldNameTD"> <b>PictureURL</b> </TD>
    <TD class="FieldValueTD"<cfinput type="file" name="PictureURL" id="PicturURL" size="45"> <!---this being the area that browses to the image--->

    <!---<TEXTAREA name="PictureURL" cols=50 rows=5></TEXTAREA>---> </TD>

    and the following code submits it.

    <INPUT type="submit" name="btnEdit_OK" value=" Add Record ">

    Any help would be appreciated, as I'm not a programer but a modifier normally I can figure this out, but not this time.

  2. #2
  3. No Profile Picture

    Join Date
    Jun 2002
    Raleigh, NC
    Rep Power
    Just save the file name of the image to the database, not the path. In this case, only "image.gif". If you store all your images in a folder such as "/somedirectory/images/" off of your web root, you know the path and you know the file name.

IMN logo majestic logo threadwatch logo seochat tools logo