How do I get, from which page/url the data in the $_POST variable come from :$_SERVER['HTTP_HOST'] ?
How to get, in which page i posted my data in php?
83 Views Asked by Praveen Muarli At
2
There are 2 best solutions below
0
TsV
On
The super-global $_SERVER could be useful for you, specifically $_SERVER['REQUEST_URI']:
echo '<pre>';
print_r($_SERVER);
// [DOCUMENT_ROOT] =>
// [REMOTE_ADDR] =>
// [REMOTE_PORT] =>
// [SERVER_SOFTWARE] =>
// [SERVER_PROTOCOL] =>
// [SERVER_NAME] =>
// [SERVER_PORT] =>
// [REQUEST_URI] => /f1 <-----------------
// ...
Related Questions in PHP
- How to add the dynamic new rows from my registration form in my database?
- Issue in payment form gateway
- How to create a facet for WP gridbuilder that displays both parent and child custom fields?
- Function in anonymous Laravel Blade component
- How to change woocomerce or full wordpress currency with value from USD to AUD
- General questions about creating a custom theme Moodle CMS
- How to add logging to an abstract class in php
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- Composer installation fails and reverts ./composer.json and ./composer.lock to original content
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Laravel: Using belongsToMany relationship with MongoDB
- window.location.href redirects but is causing problems on the webpage
- Key provided is shorter than 256 bits, only 64 bits provided
- Laravel's whereBetween method not working with two timestamps
- Implementing UUID as primary key in Laravel intermediate table
Related Questions in POST
- Add an http GET/POST entry point to a Django with channels websocket
- NEXTJS - POST net::ERR_ABORTED 500 (Internal Server Error)
- Post request response time spikes
- Slim routing in PHP-DI container
- single form and multiple submit (with multiple value)
- How do I post new data directly into a nested array in my json data file?
- When my form submitts I get: Failed to load resource: the server responded with a status of 400 (Bad Request) | Cannot GET /api/auth/createEvent
- POST a 50MB file to an Azure Durable Function app
- submitting multiple files as array ,with react axios
- I'm did POST method for DELETE with correct parameters and URL in React application but receive 400 Bad request error. Can it be server side issue?
- How to change the post permalink from title plus custom field value
- Making a POST to a folder are recived as a GET
- I can't retrieve GET values
- UPS new OAuth QVEvent POST API into VBA
- How to reference a model in a POST request body schema according to OpenAPI?
Related Questions in HTTPREQUEST
- Python Requests: Handling Exceptions and Ensuring Server Response
- Auth0 return status code 400 after on subsequent polls for request token
- How to establish connection pooling for HTTP Requests Lambda function attached to AWS API gateway?
- .NET httpserver. Get handle new request in current request handler
- Struts2 (version 2.5.33) restricts the limit of query string parameters
- ChatWork does not give me access token
- C# Deepl API HTTP Response 403
- How to add parameters when using HttpClient to send request .Net Core C#?
- node-red HTTP authentication through environmental variables
- Http requests with id (put, delete) don't work in ASP.NET Core 8
- Android studio - empty activity won't sync - java.lang.NoClassDefFoundError: org/apache/http/HttpRequest
- Application slowness issue in Chrome
- ASP.NET Core 8 - exclude HTTP request body from logging for certain paths
- The If-Match header contain invalid value
- Post image to Sharepoint List using Http request
Related Questions in HTTP-HOST
- How to fix Invalid HTTP_HOST header error
- HTTP_HOST Stripping via Firewalls and VPNs
- How is the HTTP host header resolvable?
- Need help in simulating (and blocking) HTTP_HOST spoofing attacks
- What is the .net core version of HttpContext.Current.Request.ServerVariables["HTTP_HOST"]
- Get only domain name
- Nginx: Need a map function for domain of http_name
- Set HTTP_HOST server variable in ASP.NET (4.7) MVC behind reverse proxy in Azure
- Generic way to set a proxy server for a JaxRs client
- Nginx propagate server_name regex inside Php
- apache wrong HTTP_HOST and SERVER_NAME in .htaccess but correct in php
- Why there're different host headers when making requests in Next.js?
- apache redirect in https from none www to www domain
- Is it possible to overide HttpRequestHeader Host spring boot
- Nginx: modifying http_host header using the value from x_custom_header
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You must use