Sample> FileControl


// include TPLN

$TPLN = new TPLN();

// automatic upload image file

// and create thumbnail with max width:150px or max height:150px, you can also assign a bicubic constraint


    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../style.css" rel="stylesheet" type="text/css" />


  <div style="font-weight:bold;color:red;">• {msg}</div>

<form action="" method="post" enctype="multipart/form-data" name="form">
<p>Please select a jpg file (< 500 ko) : <br>
    <input type="file" name="myfile" id="myfile" style="width:500px;" />
    <input type="hidden" name="posted" value="1" />
    <input type="submit" value="Upload" >

<div id="form_valid">
Your form was submitted without errors !<br>
  And replaced by bloc form_valid !

  Your image is uploaded and transformed in a thumbnail : <br />
  <br />
  <img src="image/upload.jpg" style="border:4px solid #ccc;" />


{_Logo}<font size="1"> in {_Chrono} s<br>
Queries executed: {_QueryCount}</font>