Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    Everthorpe, nr Hull, UK
    Posts
    106
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inserting images into sql

    hi there

    I wish to upload an image into my sql database for displaying in a dynamic asp page.

    i have the feild in the databse set to image but how do i submit the image.

    I have tried to use a browse for file button and this doesn't seem to work.

    I have the form submiting into the database and then going to a page that displays the new entry. i have a image with its sourse coming dynamically out of the database but it does not seem to appear.


    here is the code for the input item that the form uses to submit into the image feild:

    <input name="popimage" type="file" id="popimage2" value="<%= Request.Form("popimage") %>">


    here is the code for the display page:

    <table width="<%=(popupjs.Fields.Item("actwidth").Value)%>" border="1" cellpadding="1" cellspacing="4" bordercolor="#FFFFFF">
    <tr>
    <td align="center"> <div align="center"><a href="http://www.bemrosebooth.com/press_centre/press_release.asp?prID=<%=(popupjs.Fields.Item("popurl").Value)%>" target="_blank"><img src="<%=(popupjs.Fields.Item("popimage").Value)%>" border="0"></a></div></td>
    </tr>
    <tr>
    <td><font color="#000000"><font class="popup_head"><%=(popupjs.Fields.Item("poptitle").Value)%></font></font></td>
    </tr>
    <tr>
    <td ><span class="layerlinktext"></span><span class="layerlinktext"><%=(popupjs.Fields.Item("poptext").Value)%></span></td>
    </tr>
    <tr>
    <td ALIGN="center" VALIGN="top"> <div align="right" class="blue"><u>Full story</u></div></td>
    </tr>
    </table>

    Can someone tell me where i am going wrong as this is the first time i have tried to do this.

    but it does not seem to work. any ideas welcome

    Last edited by Dean; 01-23-2003 at 05:34 PM.
    Cheers

    Dean

    In the beginning god said "let there be light." and from out of the darkness a pen pusher was heard to say "not to much. that's expensive that is!"

  • #2
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Omnis mico antequam dominus Spookster!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •