SlideShare a Scribd company logo
1 of 1
Accessing data from a simple POST


<?php
// Available since PHP 4.1.0

     echo $_POST['username'];
     echo $_REQUEST['username'];

     import_request_variables('p', 'p_');
     echo $p_username;

// As of PHP 5.0.0, these long predefined variables can be
// disabled with the register_long_arrays directive.

     echo $HTTP_POST_VARS['username'];

// Available if the PHP directive register_globals = on. As of
// PHP 4.2.0 the default value of register_globals = off.
// Using/relying on this method is not preferred.

     echo $username;
?>




Example2


<?php
if ($_POST) {
    echo '<pre>';
    echo htmlspecialchars(print_r($_POST, true));
    echo '</pre>';
}
?>
<form action="" method="post">
    Name: <input type="text" name="personal[name]" /><br />
    Email: <input type="text" name="personal[email]" /><br />
    Beer: <br />
    <select multiple name="beer[]">
        <option value="warthog">Warthog</option>
        <option value="guinness">Guinness</option>
        <option value="stuttgarter">Stuttgarter Schwabenbräu</option>
    </select><br />
    <input type="submit" value="submit me!" />
</form>

More Related Content

What's hot

Cake PHP 3 Presentaion
Cake PHP 3 PresentaionCake PHP 3 Presentaion
Cake PHP 3 Presentaionglslarmenta
 
Database Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and MysqlDatabase Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and MysqlAl-Mamun Sarkar
 
Php login system with admin features evolt
Php login system with admin features   evoltPhp login system with admin features   evolt
Php login system with admin features evoltGIMT
 
Login and Registration form using oop in php
Login and Registration form using oop in phpLogin and Registration form using oop in php
Login and Registration form using oop in phpherat university
 
次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介純生 野田
 
Errors, Exceptions & Logging (PHPNW13 Uncon)
Errors, Exceptions & Logging (PHPNW13 Uncon)Errors, Exceptions & Logging (PHPNW13 Uncon)
Errors, Exceptions & Logging (PHPNW13 Uncon)James Titcumb
 
FLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook bookFLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook bookBastian Waidelich
 

What's hot (16)

Java script
Java scriptJava script
Java script
 
Cake PHP 3 Presentaion
Cake PHP 3 PresentaionCake PHP 3 Presentaion
Cake PHP 3 Presentaion
 
Php hacku
Php hackuPhp hacku
Php hacku
 
String handling across the web
String handling across the webString handling across the web
String handling across the web
 
Php Mysql
Php Mysql Php Mysql
Php Mysql
 
Database Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and MysqlDatabase Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and Mysql
 
Php login system with admin features evolt
Php login system with admin features   evoltPhp login system with admin features   evolt
Php login system with admin features evolt
 
Synapse india basic php development part 1
Synapse india basic php development part 1Synapse india basic php development part 1
Synapse india basic php development part 1
 
4.4 PHP Session
4.4 PHP Session4.4 PHP Session
4.4 PHP Session
 
Login and Registration form using oop in php
Login and Registration form using oop in phpLogin and Registration form using oop in php
Login and Registration form using oop in php
 
Web 9 | OOP in PHP
Web 9 | OOP in PHPWeb 9 | OOP in PHP
Web 9 | OOP in PHP
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
PowerCMS X
PowerCMS XPowerCMS X
PowerCMS X
 
次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介次世代版 PowerCMS 開発プロジェクトのご紹介
次世代版 PowerCMS 開発プロジェクトのご紹介
 
Errors, Exceptions & Logging (PHPNW13 Uncon)
Errors, Exceptions & Logging (PHPNW13 Uncon)Errors, Exceptions & Logging (PHPNW13 Uncon)
Errors, Exceptions & Logging (PHPNW13 Uncon)
 
FLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook bookFLOW3, Extbase & Fluid cook book
FLOW3, Extbase & Fluid cook book
 

Viewers also liked

일산오피~다솜넷-dasom12.net~논현오피~안산오피
일산오피~다솜넷-dasom12.net~논현오피~안산오피일산오피~다솜넷-dasom12.net~논현오피~안산오피
일산오피~다솜넷-dasom12.net~논현오피~안산오피dasom62
 
P1 e1 samuel_mendes
P1 e1 samuel_mendesP1 e1 samuel_mendes
P1 e1 samuel_mendessamuelmch
 
Role of teachers
Role of teachersRole of teachers
Role of teachersa2media15d
 
평촌오피~다솜넷-dasom12.net~부평오피~야탑오피
평촌오피~다솜넷-dasom12.net~부평오피~야탑오피평촌오피~다솜넷-dasom12.net~부평오피~야탑오피
평촌오피~다솜넷-dasom12.net~부평오피~야탑오피dasom62
 
Google Partners - Certification GA
Google Partners - Certification GAGoogle Partners - Certification GA
Google Partners - Certification GATomas Čiulkinys
 
인천오피~다솜넷-dasom12.net~수원오피~마포오피
인천오피~다솜넷-dasom12.net~수원오피~마포오피인천오피~다솜넷-dasom12.net~수원오피~마포오피
인천오피~다솜넷-dasom12.net~수원오피~마포오피dasom62
 

Viewers also liked (10)

일산오피~다솜넷-dasom12.net~논현오피~안산오피
일산오피~다솜넷-dasom12.net~논현오피~안산오피일산오피~다솜넷-dasom12.net~논현오피~안산오피
일산오피~다솜넷-dasom12.net~논현오피~안산오피
 
Best of biblical
Best of biblical Best of biblical
Best of biblical
 
P1 e1 samuel_mendes
P1 e1 samuel_mendesP1 e1 samuel_mendes
P1 e1 samuel_mendes
 
ShalomIrisCV
ShalomIrisCVShalomIrisCV
ShalomIrisCV
 
Role of teachers
Role of teachersRole of teachers
Role of teachers
 
평촌오피~다솜넷-dasom12.net~부평오피~야탑오피
평촌오피~다솜넷-dasom12.net~부평오피~야탑오피평촌오피~다솜넷-dasom12.net~부평오피~야탑오피
평촌오피~다솜넷-dasom12.net~부평오피~야탑오피
 
Google Partners - Certification GA
Google Partners - Certification GAGoogle Partners - Certification GA
Google Partners - Certification GA
 
인천오피~다솜넷-dasom12.net~수원오피~마포오피
인천오피~다솜넷-dasom12.net~수원오피~마포오피인천오피~다솜넷-dasom12.net~수원오피~마포오피
인천오피~다솜넷-dasom12.net~수원오피~마포오피
 
BLLrecommendation
BLLrecommendationBLLrecommendation
BLLrecommendation
 
Forked Link Chain
Forked Link ChainForked Link Chain
Forked Link Chain
 

Similar to Accessing data from a simple post by karan chanana

php_postgresql.ppt
php_postgresql.pptphp_postgresql.ppt
php_postgresql.pptElieNGOMSEU
 
PHP with Postgres SQL connection string and connecting
PHP with Postgres SQL connection string and connectingPHP with Postgres SQL connection string and connecting
PHP with Postgres SQL connection string and connectingPraveenHegde20
 
Introduction to php and POSTGRESQL. ....
Introduction to php and POSTGRESQL. ....Introduction to php and POSTGRESQL. ....
Introduction to php and POSTGRESQL. ....Lalith86
 
Lecture7 form processing by okello erick
Lecture7 form processing by okello erickLecture7 form processing by okello erick
Lecture7 form processing by okello erickokelloerick
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overviewjsmith92
 
How to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdfHow to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdfAppweb Coders
 
Web app development_php_07
Web app development_php_07Web app development_php_07
Web app development_php_07Hassen Poreya
 
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018Elliot Taylor
 
Nashvile Symfony Routes Presentation
Nashvile Symfony Routes PresentationNashvile Symfony Routes Presentation
Nashvile Symfony Routes PresentationBrent Shaffer
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPBradley Holt
 
Sample php notification
Sample php notificationSample php notification
Sample php notificationkavi taragi
 
Class 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingAhmed Swilam
 
WordPress REST API hacking
WordPress REST API hackingWordPress REST API hacking
WordPress REST API hackingJeroen van Dijk
 

Similar to Accessing data from a simple post by karan chanana (20)

php_postgresql.ppt
php_postgresql.pptphp_postgresql.ppt
php_postgresql.ppt
 
PHP with Postgres SQL connection string and connecting
PHP with Postgres SQL connection string and connectingPHP with Postgres SQL connection string and connecting
PHP with Postgres SQL connection string and connecting
 
Introduction to php and POSTGRESQL. ....
Introduction to php and POSTGRESQL. ....Introduction to php and POSTGRESQL. ....
Introduction to php and POSTGRESQL. ....
 
php_postgresql.ppt
php_postgresql.pptphp_postgresql.ppt
php_postgresql.ppt
 
Lecture7 form processing by okello erick
Lecture7 form processing by okello erickLecture7 form processing by okello erick
Lecture7 form processing by okello erick
 
Intro to PHP
Intro to PHPIntro to PHP
Intro to PHP
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
 
How to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdfHow to Create Login and Registration API in PHP.pdf
How to Create Login and Registration API in PHP.pdf
 
Web app development_php_07
Web app development_php_07Web app development_php_07
Web app development_php_07
 
Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018Building scalable products with WordPress - WordCamp London 2018
Building scalable products with WordPress - WordCamp London 2018
 
Nashvile Symfony Routes Presentation
Nashvile Symfony Routes PresentationNashvile Symfony Routes Presentation
Nashvile Symfony Routes Presentation
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Sample php notification
Sample php notificationSample php notification
Sample php notification
 
PHP-Part4
PHP-Part4PHP-Part4
PHP-Part4
 
18.register login
18.register login18.register login
18.register login
 
Class 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web Programming
 
Further Php
Further PhpFurther Php
Further Php
 
Key features PHP 5.3 - 5.6
Key features PHP 5.3 - 5.6Key features PHP 5.3 - 5.6
Key features PHP 5.3 - 5.6
 
WordPress REST API hacking
WordPress REST API hackingWordPress REST API hacking
WordPress REST API hacking
 
servlet db connectivity
servlet db connectivityservlet db connectivity
servlet db connectivity
 

More from karan chanana

Javascript validation by karan chanana
Javascript validation by karan chananaJavascript validation by karan chanana
Javascript validation by karan chananakaran chanana
 
Load image of choice by karan chanana
Load image of choice by karan chananaLoad image of choice by karan chanana
Load image of choice by karan chananakaran chanana
 
Calendar html code by karan chanana
Calendar html code by karan chananaCalendar html code by karan chanana
Calendar html code by karan chananakaran chanana
 
Adding text to an image by karan chanana
Adding text to an image by karan chananaAdding text to an image by karan chanana
Adding text to an image by karan chananakaran chanana
 
Add text on image by karan chanana
Add text on image by karan chananaAdd text on image by karan chanana
Add text on image by karan chananakaran chanana
 
Java script errors by karan chanana
Java script errors by karan chananaJava script errors by karan chanana
Java script errors by karan chananakaran chanana
 
Java script while loop by karan chanana
Java script while loop by karan chananaJava script while loop by karan chanana
Java script while loop by karan chananakaran chanana
 
Calendar html code by karan chanana
Calendar html code by karan chananaCalendar html code by karan chanana
Calendar html code by karan chananakaran chanana
 

More from karan chanana (10)

Javascript validation by karan chanana
Javascript validation by karan chananaJavascript validation by karan chanana
Javascript validation by karan chanana
 
Load image of choice by karan chanana
Load image of choice by karan chananaLoad image of choice by karan chanana
Load image of choice by karan chanana
 
Calendar html code by karan chanana
Calendar html code by karan chananaCalendar html code by karan chanana
Calendar html code by karan chanana
 
Adding text to an image by karan chanana
Adding text to an image by karan chananaAdding text to an image by karan chanana
Adding text to an image by karan chanana
 
Add text on image by karan chanana
Add text on image by karan chananaAdd text on image by karan chanana
Add text on image by karan chanana
 
Java script errors by karan chanana
Java script errors by karan chananaJava script errors by karan chanana
Java script errors by karan chanana
 
Java script while loop by karan chanana
Java script while loop by karan chananaJava script while loop by karan chanana
Java script while loop by karan chanana
 
Karan chanana
Karan chananaKaran chanana
Karan chanana
 
Calendar html code by karan chanana
Calendar html code by karan chananaCalendar html code by karan chanana
Calendar html code by karan chanana
 
Karan is an indian
Karan is an indianKaran is an indian
Karan is an indian
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Accessing data from a simple post by karan chanana

  • 1. Accessing data from a simple POST <?php // Available since PHP 4.1.0 echo $_POST['username']; echo $_REQUEST['username']; import_request_variables('p', 'p_'); echo $p_username; // As of PHP 5.0.0, these long predefined variables can be // disabled with the register_long_arrays directive. echo $HTTP_POST_VARS['username']; // Available if the PHP directive register_globals = on. As of // PHP 4.2.0 the default value of register_globals = off. // Using/relying on this method is not preferred. echo $username; ?> Example2 <?php if ($_POST) { echo '<pre>'; echo htmlspecialchars(print_r($_POST, true)); echo '</pre>'; } ?> <form action="" method="post"> Name: <input type="text" name="personal[name]" /><br /> Email: <input type="text" name="personal[email]" /><br /> Beer: <br /> <select multiple name="beer[]"> <option value="warthog">Warthog</option> <option value="guinness">Guinness</option> <option value="stuttgarter">Stuttgarter Schwabenbräu</option> </select><br /> <input type="submit" value="submit me!" /> </form>