PHP



  • I'm dealing with the php. I wrote a program to replace the symbols with a similar one. How do you get rid of the second textery and get the text processed back to the top?

    <form action="" method="post">
    <textarea rows="10" cols="100" name="Word"></textarea>
    <br/>
    <input type="submit" name="submit"value="Convert">
    <input type="submit" name="empty" value="Erase">
    </form>
    <p>
    

    <?php

    if($_POST['submit'])
    {$Word=$_POST['Word'];
    $Word =strtolower($Word);
    $SymbWord = str_split($Word);
    $i=0;

    while ($i<strlen($Word))
    {
    switch($SymbWord[$i])
    { case a : $RezWord=$RezWord. "а";break;
    case b : $RezWord=$RezWord. "β";break;
    case c : $RezWord=$RezWord. "с";break;
    case d : $RezWord=$RezWord. "ɗ";break;
    case e : $RezWord=$RezWord. "е";break;
    case f : $RezWord=$RezWord. "Ғ";break;
    case g : $RezWord=$RezWord. "ɠ ";break;
    case h : $RezWord=$RezWord. "ħ";break;
    case i : $RezWord=$RezWord. "î";break;
    case j : $RezWord=$RezWord. "ʝ";break;
    case k : $RezWord=$RezWord. "к";break;
    case l : $RezWord=$RezWord. "ɭ";break;
    case m : $RezWord=$RezWord. "ɱ";break;
    case n : $RezWord=$RezWord. "ŋ";break;
    case o : $RezWord=$RezWord. "о";break;
    case p : $RezWord=$RezWord. "р";break;
    case q : $RezWord=$RezWord. "q";break;
    case r : $RezWord=$RezWord. "ɾ";break;
    case s : $RezWord=$RezWord. "ʂ";break;
    case t : $RezWord=$RezWord. "ʈ";break;
    case u : $RezWord=$RezWord. "ʋ";break;
    case v : $RezWord=$RezWord. "ⱱ";break;
    case w : $RezWord=$RezWord. "ω";break;
    case x : $RezWord=$RezWord. "х";break;
    case y : $RezWord=$RezWord. "у";break;
    case z : $RezWord=$RezWord. "ʐ";break;
    case " " : $RezWord=$RezWord. " ";break;
    case "." : $RezWord=$RezWord. ".";break;
    case "," : $RezWord=$RezWord. ",";break;
    case "?" : $RezWord=$RezWord. "?";break;
    case "!" : $RezWord=$RezWord. "!";break;
    default : echo"*";break;
    }
    $i++;
    }
    }

    if($_POST['empty'])
    {$Word=$_POST['Word'];
    echo" ";
    }
    ?>
    <p/>

    <textarea rows="10" cols="100"name="R" >
    <?PHP
    echo $RezWord;
    ?>
    </textarea>



  • <?php
    
    if($_POST['submit'])
    {$Word=$_POST['Word'];
        $Word =strtolower($Word);
        $SymbWord = str_split($Word);
        $i=0;
    
        while ($i<strlen($Word))
        {   
          switch($SymbWord[$i])
          { case  a : $RezWord=$RezWord. "а";break;
            case  b : $RezWord=$RezWord. "β";break;
            case  c : $RezWord=$RezWord. "с";break;
            case  d : $RezWord=$RezWord. "ɗ";break;
            case  e : $RezWord=$RezWord. "е";break;
            case  f : $RezWord=$RezWord. "Ғ";break;
            case  g : $RezWord=$RezWord. "ɠ ";break;
            case  h : $RezWord=$RezWord. "ħ";break;
            case  i : $RezWord=$RezWord. "î";break;
            case  j : $RezWord=$RezWord. "ʝ";break;
            case  k : $RezWord=$RezWord. "к";break;
            case  l : $RezWord=$RezWord. "ɭ";break;
            case  m : $RezWord=$RezWord. "ɱ";break;
            case  n : $RezWord=$RezWord. "ŋ";break;
            case  o : $RezWord=$RezWord. "о";break;
            case  p : $RezWord=$RezWord. "р";break;
            case  q : $RezWord=$RezWord. "q";break;
            case  r : $RezWord=$RezWord. "ɾ";break;
            case  s : $RezWord=$RezWord. "ʂ";break;
            case  t : $RezWord=$RezWord. "ʈ";break;
            case  u : $RezWord=$RezWord. "ʋ";break;
            case  v : $RezWord=$RezWord. "ⱱ";break;
            case  w : $RezWord=$RezWord. "ω";break;
            case  x : $RezWord=$RezWord. "х";break;
            case  y : $RezWord=$RezWord. "у";break;
            case  z : $RezWord=$RezWord. "ʐ";break;
            case  " "  : $RezWord=$RezWord. " ";break;
            case  "."  : $RezWord=$RezWord. ".";break;
            case  ","  : $RezWord=$RezWord. ",";break;
            case  "?"  : $RezWord=$RezWord. "?";break;
            case  "!"  : $RezWord=$RezWord. "!";break;
            default : echo"*";break;
           }
         $i++;
        }
    }
    
    if($_POST['empty'])
    {
    $RezWord = "";
    }
    ?>
    <p/>
    
     <form action="" method="post">
    <textarea rows="10" cols="100" name="Word"><?=$RezWord ?></textarea>
    <br/>
    <input type="submit" name="submit"value="Convert">
    <input type="submit" name="empty" value="Erase">
    </form>
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2