first.php:
<?php
session_start();
$_SESSION['wdm_email'] = '[email protected]';
?>
–
second.php:
<?php
session_start();
echo 'Hi ' . $_SESSION['wdm_email'];
?>
–
When you will run second.php(after first.php), output would be:
Hi [email protected]
–
Do not forget to start the session at the top of the pages.
For more references: How to use session?
Related Posts:
- How to redirect user to a page after form submission
- Remove #wpcf7-f2450-o1 with Contact form 7 redirect [closed]
- WP_List_table with form of method=GET redirects to wrong url after submit
- Display Freebie Page Content only if Referrer is from Form Page
- simple wordpress form redirection
- Select post from dropdown and add query args not working
- Make a treatment before the action of the form
- Why is WordPress redirecting to homepage after GET form submit?
- Custom Form Redirects to Post after Submit
- noheader on the user/frontend side
- How to redirect to a page after submitting form data?
- Create a custom redirect link that tracks the first visited page and after submitting form goes to first page using formidable forms plugin? [closed]
- What does HTTP/1.1 302 mean exactly?
- How do I programmatically generate a 404?
- Stop WordPress from “guessing” redirects for nonexistent URLs
- prevent/block direct access to a thank you page
- Redirect After Delete User in Backend
- How to create a php url redirection for nicer links
- WP redirects all pages from new domain to old domain
- wp_logout_url() redirects to confirmation page even with nonce?
- Redirecting old site links to new site
- Creating intro page in wordpress
- Redirect to https not working with .htaccess [closed]
- How to redirect action=register link on the lostpassword page to a different link?
- You do not have sufficient permissions to access this page
- All pages showing up as homepage on WordPress website
- Redirect one of two domains on one WordPress installation
- Redirect blogpage /blog/abcd/ to /blog/
- template_redirect causing infinite loop when get_queried_object is called
- Redirect all pages except one to homepage via .htaccess
- Does WP always makes 301 redirection?
- WordPress Redirecting HTTPS Requests to HTTP
- How can I redirect my website’s homepage to a random blog post?
- Ninja form Redirect depending on text field content [closed]
- wp_redirect does not work
- Use virtual pages point to one specific page
- How to migrate production WordPress to Localhost
- How to redirect a page into file?
- How to redirect after login getting a variable from url (for example with the language)
- How to set 301 redirection after moving WordPress blog?
- How to include error message on login
- How to use a custom domain?
- WooCommerce unexpected behavior [closed]
- Force WordPress to load from site’s hostname
- 301 redirection editing .htaccess doesn’t work
- Redirect custom post type from one domain to another domain
- How can I force the user to log in, even if they’re already authenticated?
- 301 redirect instead of 404 when URL is a prefix of a post or page name?
- Redirect users after register (first login) and force submit post
- Stop Redirecting to and from www
- How to pass a message using template_redirect
- .htaccess 301 redirect conflict with plugin “WordPress Https”
- Disable WordPress URL auto complete
- W3 Cache redirects to front page when I press purge all caches
- Stop forcing certain paths to end with a forward slash
- Is it possible to wp_redirect() to a new tab?
- Redirection on Custom page
- How do I redirect users after submitting a topic for moderation?
- Direct iPhone visitors to different stylesheet?
- How to delete a post and keep its slug to refer to another post
- 301 redirect any RSS feed on level up url
- Dynamic 404 page content while still keeping 404 status code?
- Redirect loop with similar URLs
- Why does WP HTTP API switch the method (POST/PURGE) to GET when redirecting (302)?
- Redirect user to specific link after login
- 301 redirect via htaccess rules on the new site
- WordPress Domain redirects to different host
- Change the domain url?
- Redirect depending on category chosen
- Change Category Slug Redirection
- custom login form redirect problem
- wp_redirect is only working in Chrome Network, page is not redirecting
- Bulk redirect all post
- Disable redirect to homepage after successful Login, Stay on Current Page
- login form should redirect to register page for in 1st login next time it should redirected to home page
- Open wordpress page in directory the way index.html would open
- How force WordPress redirect to current custom page after login
- How to remove redirection
- Redirect Homepage to another page when user login
- Determine user destination on wp-login.php
- Disable WordPress URL auto Redirect
- Toggle Redirect Function On/Off With Checkbox
- My wordpress site has “https://” on it but when I go to Dashboard and click visit site, it removes the “https://”
- After disabling Multisite, homepage redirects to non-existing page
- redirect to https://my-site/wp-admin/ instead of https://my-site/wordpress/wp-admin/ after options updating
- Redirect after login when WordPress in subdirectory
- I get “too many redirects” problem when migrating localhost site
- Internal redirect from page to category
- All links redirecting to homepage
- How to redirect non-admin/editors from specific pages?
- How to make a redirect link in wordpress?
- wp_redirect leading to an infinite loop
- Redirect after Permalink change – What regex do I use?
- I’ve move my site but URL still goes to the old site
- Redirect attachment URL
- Redirect based on $_GET parameters
- Conditional redirection with logout
- redirect users to the login page
- Moving an ASP Site to WordPress – Looking for Help on Redirects
- WordPress Redirecting Form Action to Home Page