Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to redirect to previous page in php

//index.php
<form action ="home.php" method = "POST">
<button type="submit" name="button"> Submit</button>
</form>
 //---------------------------------------------------------------- 
//home.php
if(isset($_POST['button'])){
 echo $_SERVER[HTTP_REFERER];//redirects to the page where the button was clicked
}
Comment

PREVIOUS NEXT
Code Example
Php :: turn text file to string php 
Php :: wp_query item count 
Php :: php check if get var is set 
Php :: php mb_convert_case 
Php :: maximum characters laravel validation 
Php :: laravel clear table 
Php :: link to another page php 
Php :: add post meta wordpress 
Php :: Carbon Format date with timezone in views Laravel 
Php :: blade template vs php core 
Php :: php from 
Php :: wp-config.php repair 
Php :: laravel add timestamps to existing table 
Php :: remove link from product name in woocommerce cart 
Php :: guzzlehttp php basic auth 
Php :: php get timezone 
Php :: read text from docx in php 
Php :: php store log in a text file 
Php :: Carbon Add Months To Date In Laravel 
Php :: csv to array in php 
Php :: Add 7 days to the current date in PHP 
Php :: Laravel Validation check array size min and max 
Php :: count sql query in php 
Php :: laravel return data from model to another controller 
Php :: php prime numbers 
Php :: foreign key in laravel 
Php :: Auth::routes(); why display error in route laravel 8 
Php :: php object(stdclass) to array 
Php :: wordpress get field 
Php :: curl header log php 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =