--- id: php-forms title: "PHP Forms" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["GET vs POST", "PHP 폼 처리"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.9 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["php", "programming", "w3schools", "forms", "get", "post"] raw_sources: ["https://www.w3schools.com/php/php_forms.asp"] applied_in: [] github_commit: "" --- # [[PHP Forms]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) GET data is visible in the URL and bookmarkable, but capped at ~2000 characters and NEVER safe for passwords β€” while POST data is invisible in the URL (no bookmarking) but has no size limit and supports file uploads β€” meaning the "developer preference for POST" isn't arbitrary, it directly follows from these visibility/size/capability trade-offs. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`$_GET` / `$_POST`** β€” superglobal arrays collecting form data by the `name` attribute as key. [S1] - **GET** β€” data visible in URL; ~2000 character limit; bookmarkable; NEVER use for passwords/sensitive data. [S1] - **POST** β€” data invisible (embedded in request body); no size limit; supports file uploads (multi-part binary). [S1] - **No validation shown yet** β€” this chapter demonstrates the mechanics only; security/validation comes in later chapters. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - POST form: `
Name:
...`. [S1] - Retrieval: `echo $_POST["name"]; echo $_POST["email"];`. [S1] - GET form equivalent: ` ...` retrieved via `$_GET["name"]`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) - **GET의 λ³΄μ•ˆ κ²½κ³ **: λΉ„λ°€λ²ˆν˜Έ λ“± λ―Όκ°ν•œ μ •λ³΄λŠ” μ ˆλŒ€ GET으둜 μ „μ†‘ν•΄μ„œλŠ” μ•ˆ λœλ‹€λŠ” 점이 κ°•ν•˜κ²Œ 경고됨. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) ν˜„μž¬ 발견된 μ‹€μ œ 적용 사둀가 μ—†μŠ΅λ‹ˆλ‹€ β€” 이 μ±•ν„°μ˜ μ˜ˆμ œλŠ” 검증 μ—†λŠ” 기초 폼 처리이며, λ‹€μŒ 챕터뢀터 λ³΄μ•ˆμ„ κ³ λ €ν•œ 검증이 닀뀄진닀. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Basic POST form and retrieval (PHP/HTML): ```html Name:
``` ```php echo $_POST["name"]; ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.90 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[PHP Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[PHP Superglobals Get]], [[PHP Superglobals Post]], [[PHP Form Validation]] - **μ°Έμ‘° λ§₯락:** 폼 처리의 기초 β€” λ³΄μ•ˆμ„ κ³ λ €ν•œ 폼 검증(Form Validation) μ±•ν„°λ‘œ 직접 이어짐. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” PHP Form Handling β€” https://www.w3schools.com/php/php_forms.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "PHP Form Handling" page (Astra wiki-curation, P-Reinforce v3.1 format).