ขั้นตอนการทำ
1. สร้างฟอร์มเพื่อใช้ในการทดสอบ
![]() |
โค้ดที่ใช้สร้าง Form
| <html> <head> <title>Un title page</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-874"> </head> <body bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td> <form name="form1" method="post" action="check.php"> //อย่าลืมกำหนด Action กรุณาใส่ User ที่คุณต้องการ : <input type="text" name="user"> //กำหนดชื่อของ TextBox <input type="submit" name="Submit" value="ค้นหา User"> </form> </td> </tr> </table> </body> </html> |
2. หลังจากนั้นให้เราเขียนโค้ดที่ไฟล์ check.php ดังนี้
| <? $user_upper=strtoupper($user); echo $user_upper; ?> |
3. หลังจากนั้นทดสอบดูผลที่ได้
![]() |

