PHP Classes

File: examples/lat2cyr_test.php

Recommend this page to a friend!
  Classes of Yaroslav Shapoval   Cyrillic to Latin   examples/lat2cyr_test.php   Download  
File: examples/lat2cyr_test.php
Role: Example script
Content type: text/plain
Description: latin to cyrillic symbols test
Class: Cyrillic to Latin
Translite text between cyrillic and latin
Author: By
Last change:
Date: 18 years ago
Size: 760 bytes
 

Contents

Class file image Download
<?php
if (!isset($_POST['convert'])){
    echo
"
<html>
  <head><title>lat2cyr test form</title></head>
    <body>
     <form action=lat2cyr_test.php method=POST>
      <textarea name=input>Pro Scheloch'</textarea><br>
      <input type=submit name=convert value='GO!'>
     </form>
    </body>
</html>"
;
exit;
}
require_once(
"../cyrlat.class.php");
$cyrlat=new CyrLat;
$input=$_POST['input'];
$result=$cyrlat->lat2cyr($input);
echo
"
<html>
  <head><title>latr2cyr test result</title></head>
    <body>
    <h1>Result:</h1>
     <form action=lat2cyr_test.php method=POST>
      <textarea>
$result</textarea><br>
    <h1>Try Again?</h1>
       <textarea name=input>
$input</textarea><br>
      <input type=submit name=convert value='GO!'>
     </form>
    </body>
</html>"
;
?>