Note that there are some explanatory texts on larger screens.

plurals
  1. POhow do I POST two consecutive html tags to PHP script
    primarykey
    data
    text
    <p>I am sending cms updates from a textarea edited by CKeditor to a PHP handler using jQuery. The POST contains the HTML for the page. Not a problem, or so I thought. Now when I send two consecutive tags like <code>&lt;p&gt;&lt;strong&gt;</code> or even just <code>&gt;&lt;</code> the server throws a forbidden error.</p> <p>I haven't had a problem with another site I built using the same principles, running on the same server, and I tried the consecutive tags scenario without a hitch.</p> <p>I built a simple test(code below, a form with a textarea to POST to a PHP handler that echoes the results of the POST. Even if I don't even read the POST content the server still throws the error. So it would appear that I have to process the HTML before POSTing.</p> <p>I cannot for the life of me see what is different in the site that works as there is no data handling before POSTing.</p> <p>Does anyone know of this problem, and any solutions?</p> <p>Oh! and it works fine on my WAMP server(5.3.5)(public server is 5.2.17), so is there a PHP setting I could look at over-riding?</p> <p>And now we have entered the twilight zone. I changed the textarea field name from <code>name="test1"</code> to <code>S</code> and there are no hitches??? So I now have an odd solution but this may not be the end of it, so If anyone is aware of what the issue could be, I'd be very thankful if not amazed.</p> <p>Code: post-form.php</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Post Form&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form action="post-print.php" method="post"&gt; &lt;textarea name="test1" cols="50" rows="5"&gt;&lt;/textarea&gt; &lt;!--name this and the php code text1 and it works--&gt; &lt;textarea name="test2" cols="50" rows="5"&gt;&lt;/textarea&gt; &lt;textarea name="test3" cols="50" rows="5"&gt;&lt;/textarea&gt; &lt;input name="submit" type="submit" value="Send" /&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>post-print.php</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;title&gt;Untitled Document&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;p&gt;Print result:&lt;/p&gt; &lt;p&gt;&lt;?php echo $_POST['test1']; ?&gt;&lt;/p&gt; &lt;p&gt;&lt;?php echo $_POST['test2']; ?&gt;&lt;/p&gt; &lt;p&gt;&lt;?php echo $_POST['test3']; ?&gt;&lt;/p&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload