Hi all,

I am pretty much a newbie at php, but have looked for the answer to this question in several places and was not able to find it. So I thought I'd give this forum a go.

This the situation:

I have a form which contains a textarea in an html page. Let's say this is the text in the text area:


This is line 1

This is line 3

If I post this form the URL looks smt like:

register_user.php?Personal_Note=This+is+line1%0D%0A%0D%0AThis+is+line+3&User=0100123 ....

In the register_user.php file the $Personal_Note variable is now translate back to the 'original format' (with just spaces and new lines).

How can I 'pass on' the contents in this variable using a URL ? In other words how do I translate the string to an HTML compliant (?!?) string format.

Thanks,

Oscar

    It's a bad idea to pass textarea variables as a URL, because if you get a URL that is too long, data will get cut off, or you'll get unpredictable results. Can be a nusciance at best, a security hole at worst.

      Thanks,

      I think you are right. This is what I was looking for.

      Oscar

        I understand what you are saying, however I am not quite sure how to approach this problem then....

        I want user to be able to update their profiles. Amongst onther things their profile contains a personal note, which is maintained through a text area.

        How can I populate this text area, without passing it through a URL ... ???

        The only other way, I can think of is by just passing the user identifier in the URL and query for the text area content .... Is this the 'standard' approach...

        Is there a common solution to this question ?

        Thanks,

        Oscar

          Write a Reply...