Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/cyr2lat_test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Yaroslav Shapoval  >  Cyrillic to Latin  >  examples/cyr2lat_test.php  >  Download  
File: examples/cyr2lat_test.php
Role: Example script
Content type: text/plain
Description: cyrillic to latin symbols test
Class: Cyrillic to Latin
Translite text between cyrillic and latin
Author: By
Last change:
Date: 2005-10-21 13:39
Size: 764 bytes
 

Contents

Class file image Download
<?php

if (!isset($_POST['convert'])){
    echo 
"
<html>
  <head><title>lat2cyr test form</title></head>
    <body>
     <form action=cyr2lat_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->cyr2lat($input);
echo 
"
<html>
  <head><title>latr2cyr test result</title></head>
    <body>
    <h1>Result:</h1>
     <form action=cyr2lat_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>"
;

?>