Tullie Murrell Tullie Murrell - 1 year ago 110
PHP Question

Tags in form input?

When text with HTML tags inside it are inputted into a web-form (e.g

), how does it appear to the PHP processor?

I did some experiments with the example above and found that the form was sending the query string
is that how it would appear?

How could i fix this so that it appears as typed:

Answer Source


In the above statement % specifies whitespace.its browser dependent ,some browser replaces whitespace with '%' and some with '+'

if you want to decode than you can do that by php function rawurldecode(); the syntax of which is string rawurldecode ( string $str ).

Now about querystring:

when you are sending your data via GET method,the data which you send is formed into "name=value" form and its goes to the server.


consider you have a form like this

<form method="get" action="a.php">
name:<input type="text" name="name">

and you insert name as rahul

then the query string will be "name=rahul" ,the value of which you can retreive in the server side using $_GET or $_REQUEST

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download