Note that there are some explanatory texts on larger screens.

plurals
  1. POForm adding /' to text file
    primarykey
    data
    text
    <p>I have a form, that is writing to a text file. Then that text file is being displayed on a page. I THOUGHT that adding strip_tags would remove the issue, but it hasn't. </p> <p>When I submit "I'm changing the content" i get "I/'m changing the content"</p> <p>I can't remember the FREAKING name of what that "/" is, I could have sworn it was strip something. So obviously i'm having trouble searching for my solution as well. </p> <p>here is the code, just in case it helps.</p> <p>index.php</p> <pre><code>&lt;body&gt; &lt;?php include("whotitle.txt"); ?&gt; &lt;br /&gt; &lt;?php include("whocontent.txt"); ?&gt; &lt;/body&gt; </code></pre> <p>admin.php</p> <pre><code>&lt;body&gt; &lt;form name="web_form" id="web_form" method="post" action="process-whotitle.php"&gt; &lt;p&gt;&lt;label&gt;Enter Title: &lt;/label&gt;&lt;textarea type="text" name="WhoTitle"&gt; &lt;?php include("whotitle.txt"); ?&gt; &lt;/textarea&gt;&lt;/p&gt; &lt;p&gt;&lt;label&gt;Enter Content: &lt;/label&gt;&lt;textarea type="text" name="WhoContent"&gt; &lt;?php include("whocontent.txt"); ?&gt; &lt;/textarea&gt;&lt;/p&gt; &lt;p&gt;&lt;input type="submit" value="Submit"&gt;&lt;/p&gt; &lt;/form&gt; &lt;/body&gt; </code></pre> <p>process-whotitle.php</p> <pre><code>&lt;?php $whotitle = strip_tags( $_POST['WhoTitle'] ); $data = "$whotitle"; $fh = fopen("whotitle.txt", "w"); fwrite($fh, $data); fclose($fh); $whocontent = strip_tags( $_POST['WhoContent'] ); $data = "$whocontent"; $fh = fopen("whocontent.txt", "w"); fwrite($fh, $data); fclose($fh); print "Info Submitted"; ?&gt; </code></pre>
    singulars
    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.
 

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