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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:18:57+00:00 2026-06-14T10:18:57+00:00

First time here. Let’s hope this works! I’m new to PHP and trying to

  • 0

First time here. Let’s hope this works!

I’m new to PHP and trying to create a site where users have their own page with content they can edit. I got the login system to halfway work. It recognizes usernames and passwords correctly, but it does not seem to be storing the $_SESSION variable. At first I thought it was because I was trying to make the username (itself a variable) the $_SESSION variable, but even when I set it to something absolute, my code to check to see if the user is logged in redirects them to the “you are not logged in” page. Here is my verification php code:

<?php

$host="xxxx.ipagemysql.com";
$username="xxxxx";
$password="xxxxxx";
$db_name="farmers";
$tbl_name="users";

mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

$farmeruser=$_POST['farmeruser'];
$farmerpw=$_POST['farmerpw'];

$sql="SELECT * FROM ".$tbl_name." WHERE farmeruser='".$farmeruser."' and farmerpw='".$farmerpw."';";

$result=mysql_query($sql);

$count=mysql_num_rows($result);

if($count==1){

session_start();
$_SESSION['member'] = "affirmative";
header("location:succesful_login.php");
}
else {
echo "Wrong Username or Password";
}
?>

And here is my page that is never recognizing that the user is logged in:

<?php
session_start();
if($_SESSION['member'] == "affirmative")
{
echo
"Welcome!";
}
else {
header('Location: http://www.leukosweb.com/user_not_recognized.php');
}
?>

Any Ideas why this is not working?

PS. I would like to change “affirmative” to the user’s login name. If you want to help me set the $_SESSION ‘member’ variable using a variable in the login varification page, that would also be awesome!

  • 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-06-14T10:18:58+00:00Added an answer on June 14, 2026 at 10:18 am

    Okay, while Anad Pal’s answer was not the correct one, it set me in the right direction. Turns out you have to change your iPage account’s php.ini file on the following line

    session.save_path = "/var/php_sessions"
    

    to

    session.save_path = "/tmp"
    

    Now everything is working fine. Thanks! Ironic how it wasn’t my own code, but that ipage’s default for storing sessions does not work >.<

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

Sidebar

Related Questions

This is my first time here so I hope I post this question at
this is my first time posting here, I have a question which I have
I have a problem here im trying to upload a file first time it
It's my first time asking here (I have visited the site several times, but
first time posting here, but god know's I use this site to search for
This is my first time here and I am a beginner so kindly bear
first time posting here so be gentle :) On my web pages I have
first time posting here. I'm using a loop to create 3 buttons, but my
this is my first time asking a question here. I tried to be well
this is my first time posting here, but I didn't know where else to

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.