Guest User

Untitled

a guest
Nov 6th, 2010
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. FILE.HTML
  2. ---------------------------
  3.  
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml" dir="rtl"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. </head>
  7. <body>
  8.  
  9. <form action="action.php" method="POST">
  10. First name: <input type="text" name="fname" /><br />
  11. <input type="submit" value="Submit" />
  12. </form>
  13.  
  14.  
  15. </body>
  16. </html>
  17.  
  18. -----------------------------------
  19. action.php
  20. -----------------------------------
  21. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  22. <html xmlns="http://www.w3.org/1999/xhtml" dir="rtl"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  23.  
  24. </head>
  25. <body>
  26.  
  27. <?php
  28. $str = $_POST["fname"];
  29. $strlen = strlen($str);
  30.  
  31. echo $str;
  32. echo $str[0];
  33. echo $str[1];
  34. echo $str[2];
  35.  
  36. ?>
  37.  
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment