Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
- <meta name="author" content="RieqyNS13"/>
- <meta name="updater" content="C4Hy4"/>
- <title>Testing</title>
- <style type="text/css">
- body{
- background-color:#000000;
- }
- textarea{
- background-color:#000000;
- color:#FF0000;
- }
- input{
- background-color:#000000;
- color:#FF0000;
- }
- fieldset{
- color:#7FFF00;
- font-family:"Courier New";
- font-size:10px;
- border:1px solid;
- width:373px;
- }
- </style>
- </head>
- <body>
- <br>
- <form method=POST action=<?PHP $_SERVER['PHP_SELF'];?>>
- <fieldset>
- <legend>Isi Input</legend>
- <textarea name="txArea" cols=50 rows=20 value="<?php echo isset($_POST['txArea'])?$_POST['txArea']:"";?>"></textarea>
- </fieldset>
- <input type=submit name="btnSubmit" value="Generate"><br>
- <?php
- $result = '';
- if (isset($_POST['txArea'])){
- $str = $_POST['txArea'];
- $exp = explode("\n", $str);
- $count = count($exp);
- for($i=0; $i<$count; $i++){
- $result .= "Hello ".preg_replace('/(\s|\\\\[rn]{1})/', '',$exp[$i])." Problem ? \n";
- }
- echo "<fieldset><legend>Output :</legend>\n<textarea name='txResult' cols=50 rows=20 readonly=YES>$result</textarea></fieldset><br>";
- }
- ?>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement