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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:07:51+00:00 2026-05-20T08:07:51+00:00

My site has an index page, and that page checks if a php session

  • 0

My site has an index page, and that page checks if a php session is set with:

session_start();

$name = $_SESSION["name"];

if (!$name) {
  header('Location: name.php');
}

name.php has a simple form to set the name (no php), with an action of setName.php.
setName.php:

session_start();

$_SESSION["name"] = $_POST["name"];

header('Location: index.php');

In every browser except safari (and Webkit Nightly), the user sets their name, and is taken back to the index. However, in S(&WN) Submitting the name form loops back to the same page.

Cookies are enabled for all sites, and the session id is being set:
enter image description here

Edit: In case this makes any difference, my server is a macbook running MAMP with php 5.3.

If you want to try it yourself, the url is 121.73.150.105/questions, but it is often offline.

  • 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-20T08:07:52+00:00Added an answer on May 20, 2026 at 8:07 am

    This may not be the cause of your troubles, but here’s what the PHP manual has to say about “Location”:

    HTTP/1.1 requires an absolute URI as argument to » Location: including the scheme, hostname and absolute path, but some clients accept relative URIs.

    PHP manual

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

Sidebar

Related Questions

My PHP site has header,body,footer files that are included into the INDEX.PHP page. On
Information: I have a site that has a design on index.php, and then you
I'm using apache2 and enabled a site that has no index.html file in its
My old web site has an index.html page … nothing strange! Everything is fine.
Lets say I have a site that has one page that handles all requests
My site has a drop-down menu built in CSS and JavaScript that drops down
My site has an input box, which has a onkeydown event that merely alerts
My site has a library full of games, nations, game scenarios, etc. library.php is
my site has three div elements, header, content and footer. i have a picture
My site has several listing pages and on each page, I'd like to enable

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.