Closed Thread
Results 1 to 7 of 7

Thread: How Do I Add This Bit Of Code?????

  1. #1
    byronwells is offline Learning Programmer
    Join Date
    Dec 2009
    Posts
    58
    Rep Power
    0

    How Do I Add This Bit Of Code?????

    Alright Guys

    I have created a new db field called download_link and have linked it to the add products page. That is working fine. The information that is stored in that field is the filename and extention ie. text.zip

    I have then attempted to get the information display on this page.. http://www.digitalresellersvault.com...ategory=demo_1 look under the demo 3 product

    What I am trying to do is to get it to display in a url format. So all I need to do is add the file name on the add products page, then on the marketplace it will add it to a url link, and then display it..

    The url link is suppose to look like this

    <a href="http://www.digitalresellersvault.com/go/downloads/ "file name goes here"


    I have tried all sort of cobinmations but all I can get to display is the filename, not a url link..

    This is the code that I am using now

    $download_link='<a href="http://www.digitalresellersvault.com/go/downloads/'$r[download_link]."></a>';

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Feral is offline Programmer
    Join Date
    Jul 2008
    Posts
    163
    Rep Power
    15

    Re: How Do I Add This Bit Of Code?????

    your link is broken but if you bit of code you posted is straight from your file doing it like this

    Code:
    $download_link='<a href="http://www.digitalresellersvault.com/go/downloads/' . $r[download_link]. '"></a>';
    should fix your problem

  4. #3
    byronwells is offline Learning Programmer
    Join Date
    Dec 2009
    Posts
    58
    Rep Power
    0

    Re: How Do I Add This Bit Of Code?????

    Quote Originally Posted by Feral View Post
    your link is broken but if you bit of code you posted is straight from your file doing it like this

    Code:
    $download_link='<a href="http://www.digitalresellersvault.com/go/downloads/' . $r[download_link]. '"></a>';
    should fix your problem
    That didnt work.. Its not showing in a url link...

  5. #4
    Feral is offline Programmer
    Join Date
    Jul 2008
    Posts
    163
    Rep Power
    15

    Re: How Do I Add This Bit Of Code?????

    more code and a working link are needed then.

  6. #5
    byronwells is offline Learning Programmer
    Join Date
    Dec 2009
    Posts
    58
    Rep Power
    0

    Re: How Do I Add This Bit Of Code?????

    Quote Originally Posted by Feral View Post
    more code and a working link are needed then.
    At the moment no url link is being dispalyed

    Just the contents of the db field...

    The contents of the db field needs to go into the url link

  7. #6
    webcodez's Avatar
    webcodez is offline Programmer
    Join Date
    Feb 2010
    Posts
    148
    Rep Power
    0

    Re: How Do I Add This Bit Of Code?????

    Uhm Im not sure if this is the problem but you didn't specify any name/title/text to display for the link:

    Code:
    $download_link='<a href="http://www.digitalresellersvault.com/go/downloads/' $r[download_link]. '">Some link name here</a>'
    Should work However Im not sure what the display text of the link should be in your case.
    Last edited by webcodez; 02-16-2010 at 08:26 AM.

  8. #7
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: How Do I Add This Bit Of Code?????

    Andrew, why would we add perl code to a PHP script?
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem in a href location from php code to html code
    By newphpcoder in forum PHP Development
    Replies: 5
    Last Post: 05-13-2011, 02:03 PM
  2. how to make a bar code reader program in VB 2008 please send me the code
    By tontonskie in forum Visual Basic Programming
    Replies: 1
    Last Post: 11-15-2010, 12:58 AM
  3. add code for font size under php echo code
    By newphpcoder in forum PHP Development
    Replies: 2
    Last Post: 11-10-2010, 11:03 PM
  4. Code: Capture Code from USB Camera
    By MrNobody in forum Visual Basic Tutorials
    Replies: 71
    Last Post: 08-14-2009, 08:59 AM
  5. Code: Capture Code from USB Camera
    By MrNobody in forum Tutorials
    Replies: 5
    Last Post: 09-08-2007, 06:00 AM

Tags for this Thread

Bookmarks

Posting Permissions

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