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 6124131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:05:51+00:00 2026-05-23T16:05:51+00:00

I am new to PHP as you may be able to tell from the

  • 0

I am new to PHP as you may be able to tell from the question.
What I have is an iOS application that accesses a database via an apache server using a php front end. I have managed to get a user inserted into the database using a POST on a php script called NewUser.php

The thing I am struggling with is how to organize the files and whether or not I need multiple php scripts for each query I want to run on the database or I am able to handle each different POST request in the same script?

As I said I am new to the concept of PHP. If anyone could point me in the right direction to maybe a tutorial or give me some pointers on here that would be great!

Disco

  • 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-23T16:05:52+00:00Added an answer on May 23, 2026 at 4:05 pm

    yes, you can handle more type of POST requests in one script.

    For example script name is action.php and inside is code:

    switch ($_POST['action']) {
       case 'insert_user':
           // code for inserting new user
           break;
       case 'delete_user':
           // code for deleteing user
           break;
       // and so on ...
    }
    

    and when are you doing POST request you will have to add parameter action which one will indetify the correct action.

    POST /action.php HTTP/1.1
    Some headers
    
    action=insert_user&name=John&surname=Doe....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new in the Python world, coming from PHP. So, this question may sound
I am new to OO php so this may seem basic.. Basically I have
This may be a silly question, but as someone relatively new to PHP, I'm
New to PHP and MySQL, have heard amazing things about this website from Leo
I'm pretty new to php but i'm learning pretty fast, I have a question
I'm new to javascript, my problem is effectively: I have a php page that
What I have noticed is that responses from AWS PHP SDK are sometimes a
We are in the startup build phase of a new PHP webapp that will
Am new to php... I have been battling on my dynamic checkboxes in such
I have a PHP script that processes file uploads. The script tries to organise

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.