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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:31:50+00:00 2026-05-28T21:31:50+00:00

Im developing am mcv framework in php and currently my url format is: /admin/users/?action=add&method=admin

  • 0

Im developing am mcv framework in php and currently my url format is:

/admin/users/?action=add&method=admin

this will call the ADMIN controller, then call the user function in the admin contoller. The user function loads the admin_model model and the action=add&method=admin will call the add_admin() function.

If your still following, in each model, i have functions such as:

add_admin()
edit_admin()
view_admin()
add_agent()
edit_agent()

etc, etc, etc…

now the add_admin() function returns a html form that the user fills in and submits

on submit, i would like to call a function post_admin()

So my url should be:

/admin/users/?action=post&method=admin

however, I CANT set the action of the html form to that url.

so I need the form to method=”post” the form data and method=”get” the query string

Any Ideas?

  • 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-28T21:31:51+00:00Added an answer on May 28, 2026 at 9:31 pm

    I’d be inclined to avoid doing this if I were you, you could just get really confused. Besides, whilst it’s not written in stone, it’s generally considered to use GET for actions that don’t cause changes, and actions that do cause changes should be restricted to POST.

    Option 1: Use $_REQUEST

    $_REQUEST holds an aggregate of $_GET, $_POST and $_COOKIE (and maybe $_SERVER too, can’t remember for sure).

    I’d STRONGLY recommend against using $_REQUEST though, you have no way of knowing if your values came from $_GET or $_POST, and if you have the same variable in both, one will overwrite the other.

    The other option is to put the GET part of the request in the form action.

    <form method="post" action="file_to_process_form.php?get1=foo&amp;get2=bar">
    

    This is better cos you know where the variables come from, but it can get somewhat messy, especially if there’s a lot of data that needs to be sent via GET.

    Personally, I’d say your best bet is to just try avoiding mixed submission types altogether and just try to stick to GET or POST.

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

Sidebar

Related Questions

What is mvc ? What are the benefits developing mcv website ? How can
Developing a multilingual application in VB.Net 2008, Im able to add resources to forms
developing an application in Access. The access file will be located on a db
Developing a VSS writer app: see this error during backup, initiated by windows backup
Developing iphone application using makkit framework. I have got the map view integrated in
Developing an application for Android, i want to record data that will be usefull
Developing is more of a hobby at the moment; so apologies if this is
When developing complex features for SharePoint, what is the recommended method of data storage?
Developing a web application that I've registered with Twitter. In this app, I might
I´m developing a simple form that allows users to check availability in a hotel

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.