html - Add line from a textfile to a textbox in php -


i want add specific text specific line textbox in html code.

i line textfile (which bash script) using:

<?php      $myfile = "c:\dat300backups\script.txt";         $lines = file($myfile);//file in array         echo $lines[13]; ?> 

then want text from:

echo $lines[13]; 

to inserted texbox in:

ip subnet: <input type="text" name="ipsubnet" value="i want line here"><br> 

here whole code:

    <html>     <head>     <title>rate limiter</title>     </head>      <body>      <?php       $myfile = "c:\dat300backups\script.txt";     $lines = file($myfile);//file in array     echo $lines[13];     echo("<br>");     echo $lines[14];     echo("<br>");     echo $lines[15];     echo("<br>");        echo $lines[16];     echo("<br>");     echo $lines[17];     echo("<br>");     echo $lines[18];     echo("<br>");     echo $lines[19];     echo("<br>");     echo $lines[20];     echo("<br>");     echo $lines[21];     echo("<br>");     echo("<br>");        ?>      <form>     ip subnet: <input type="text" name="ipsubnet" value=""><br>     ip from: <input type="text" name="ipfrom"><br>     ip to: <input type="text" name="ipto"><br>     wan: <input type="text" name="wan"><br>     lan: <input type="text" name="lan"><br>     traffic control path: <input type="text" name="tcpath"><br>     packetlimit: <input type="text" name="packetlimit"><br>     download rate: <input type="text" name="drate"> kbit/s<br>     upload rate: <input type="text" name="urate"> kbit/s<br>     </form>      <form name="input" action="html_form_action.asp" method="get">     password: <input type="password" name="pwd">     <input type="submit" value="submit">     </form>          </body> </html> 

ip subnet: <input type="text" name="ipsubnet" value="<?php echo $lines[13]; ?>"> 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -