Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6153241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:03:47+00:00 2026-05-23T20:03:47+00:00

I wanted to know if it is possible to GET and POST on the

  • 0

I wanted to know if it is possible to GET and POST on the same php page, for example

I want to send data to:

http://www.example.com/my.php

So first the GET

http://www.example.com/my.php?task=dosomething

and POST some $thexml = XML to

http://www.example.com/my.php?task=dosomething

and then be able to access both in some code like (example)

// Example Code ============================

    if($_GET["task"] == "dosomething"){
      $mynewxml = $_POST["$thexml"];
    }
//==========================================
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:03:48+00:00Added an answer on May 23, 2026 at 8:03 pm

    Technically no, you cannot POST and GET at the same time. They are two different verbs, and you only get to make one during your request.

    However, you will find that if you do a POST and include parameters in the URL, such as yourscript.php?param1=somevalue&param2=somevalue, then both $_GET and $_POST will be populated with their respective data.

    It would be wise to read up on how HTTP actually works. http://www.jmarshall.com/easy/http/

    You should consider whether or not this is good system design on your part. A GET is supposed to be for requests that don’t change data on the server. A POST can change data. Even though both can be implemented to do either, it is best to follow this common practice. You never know what some proxy or other program up the line will do with it otherwise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to PHP programming and I wanted to know that is it possible
I wanted to know if what I want to do is even possible, since
I wanted to know if it is possible to treat a php file as
Just wanted to know whether it's possible to get cell tower changes in Android?
I wanted to know is it possible to get the height of a multi
Just wanted to know if is possible to use mod_rewrite on a single(or more
I just wanted to know if it is 100% possible, if my language is
i just wanted to know if it is possible to check in mouse event
I'm very new to facebook and wanted to know if this is even possible
I would like to know if it is possible to get the total miles

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.