Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>1) The best way to do it is by using some sort of formatting like Put you template like this <code>$template = "whats the best way to insert %%UserName%% %%textarea%% value in here.";</code></p> <p>And then create an array with like</p> <p><code>$trans = array ("%%UserName%%" =&gt; $username, "%%textarea%% =&gt; $textarea);</code></p> <p>Then use php's <code>strtr</code> function to convert it</p> <p><code>$data_to_store = strtr($template, $trans);</code></p> <p>2) You can find a lot of encryption and decryption algorithms and php classes for doing that check out <a href="http://www.phpclasses.org/search.html?go_search=1&amp;words=encryption" rel="nofollow">PHP Classes</a>.</p> <p>3) You could try this. But i am not 100% sure if its works properly. Use PHP's <a href="http://www.php.net/manual/en/class.ziparchive.php" rel="nofollow">ZipArchive</a> Directory And then load the content's into a string then</p> <pre><code>&lt;?php header('Content-Disposition: attachment; filename="downloaded.pdf"'); $zip = new ZipArchive; $res = $zip-&gt;open('php://stdout', ZipArchive::CREATE); if ($res === TRUE) { $zip-&gt;addFromString('file.txt', $content_populated_from_db); $zip-&gt;close(); echo 'ok'; } else { echo 'failed'; } exit; ?&gt; </code></pre> <p>I hope this works, If it didn't try changing the flags of <code>ZipArchive::open</code>. And if it didn't work then also. In that case let me know, with you code and i might be able to help you. As of this point, i havn't tried it.</p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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