Professional Web Applications Themes

text input with links, etc.. - PHP Development

Hi All, I hope you can give me a few pointers on this issue. I'd like visitors to my website to be able to enter text to be viewed on the site - a bit like a bulletin board or forum. I can do this for regular text easily by simply populating a 'TEXT' field within my MySQL database and grabbing it back when rendering the site using PHP. However, I'd also like visitors to be able to put in URL links or email items that can be clicked. How would I go about doing this?.I've seen this sort of ...

  1. #1

    Default text input with links, etc..

    Hi All,
    I hope you can give me a few pointers on this issue.

    I'd like visitors to my website to be able to enter text to be viewed on the
    site - a bit like a bulletin board or forum. I can do this for regular text
    easily by simply populating a 'TEXT' field within my MySQL database and
    grabbing it back when rendering the site using PHP. However, I'd also like
    visitors to be able to put in URL links or email items that can be clicked.
    How would I go about doing this?.I've seen this sort of thing on forums
    where words can be selected and a URL applied, but I have no idea how to do
    this and how this information (ie. the link and the associated text) would
    be stored in the database field(s).
    Any ideas?. Are there any PHP examples available for this sort of thing?.

    Thanks for any comments.

    Regards,
    Dave



    Dave Guest

  2. #2

    Default Re: text input with links, etc..

    Dave Moore wrote: 

    IMHO the easiest way is to allow users to use HTML-tags, that way they can set
    URLs.

    I think there are quite a lot of examples around the net, you can even take a
    look at the online manual

    http://www.php.net/manual/en/function.mysql-connect.php
    http://www.php.net/manual/en/function.mysql-fetch-array.php
    http://www.php.net/manual/en/function.mysql-query.php

    To catch the sent data, you can use $_REQUEST['text-name'] to get the data
    from the form.


    //Aho
    J.O. Guest

  3. #3

    Default Re: text input with links, etc..

    On Sat, 11 Jun 2005 20:54:33 +0200, J.O. Aho wrote:
     
    >
    >IMHO the easiest way is to allow users to use HTML-tags, that way they can set
    >URLs.[/ref]

    Easy, certainly - but could also give you a few problems. You'd need
    to watch out for links to *images*. I've seen a fair few bulletin
    boards that have been "compromised" by people pasting HTML links to
    rather unsavoury pics (that display inline) ;-)

    You'd need to devise a search & replace for all HTML tags (look for
    the < and > entities) - but allow <a href ....

    Adam.
    Adamski Guest

  4. #4

    Default Re: text input with links, etc..

    Thanks Aho, but that's not what I'm trying to achieve.

    "J.O. Aho" <net> wrote in message
    news:net... [/ref]
    the [/ref]
    text [/ref]
    like [/ref]
    clicked. [/ref]
    do [/ref]
    would [/ref]
    thing?. 
    set 
    take a 


    Dave Guest

  5. #5

    Default Re: text input with links, etc..

    Dave Moore wrote: 

    So it's not that you have a page with a text filed where users can write
    something and the submit and your php page take the text written and stores
    it in a mysql database which later on can be displayed on another page?



    //Aho
    J.O. Guest

  6. #6

    Default Re: text input with links, etc..


    "J.O. Aho" <net> wrote in message
    news:net... 
    >
    > So it's not that you have a page with a text filed where users can write
    > something and the submit and your php page take the text written and[/ref]
    stores 

    Well Yes and No. I can already do this using the functions you highlighted
    in your previous post. What I'd like to do in addition is to allow the user
    (some how) to include hypertext links in with their text such that when the
    information is rendered, visitors can click on the links and navigate to
    other pages. I assume that some sort of special form would be required to do
    this and I'd like to see some example code.

    Dave


    Dave Guest

Similar Threads

  1. Text Input
    By scriptworker in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: June 29th, 03:29 AM
  2. Input Text (External Text Files)
    By khabuki in forum Macromedia Flash Sitedesign
    Replies: 3
    Last Post: May 12th, 03:30 PM
  3. Input Text, need help
    By BuG56 webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: January 16th, 08:54 AM
  4. Load Text from Text file with html links?
    By Brajeshwar in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: January 13th, 12:09 AM
  5. Text vs Field for text input
    By Questy webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 1
    Last Post: January 12th, 05:26 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139