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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:12:13+00:00 2026-05-14T03:12:13+00:00

Ok I am making a registry for my website. First page asks for some

  • 0

Ok I am making a registry for my website.

First page asks for some personal info

        if($error==false) {

        $query = pg_query("INSERT INTO chatterlogins(firstName, lastName, gender, password, ageMonth, ageDay, ageYear, email, createDate) VALUES('$firstNameSignup', '$lastNameSignup', '$genderSignup', md5('$passwordSignup'), $monthSignup, $daySignup, $yearSignup, '$emailSignup', now());");
        $query = pg_query("INSERT INTO chatterprofileinfo(email, lastLogin) VALUES('$emailSignup', now());");
        $userNameSet = $emailSignup;
        $_SESSION['$userNameSet'] = $userNameSet;
        header('Location: signup_step2.php'.$rdruri);

    }

The first query works. The second query works but doesn’t save the email…

the session doesn’t work but the header works and sends me to the next page

I get no errors even if I comment out header

next page

    @session_start();

$conn = pg_connect("host=localhost dbname=brittains_db user=brittains password=XXXX" );

$signinCheck = false;
$checkForm = "";

if(isset($_SESSION['$userName'])) {

    $userName = $_SESSION['$userName'];
    $signinCheck = true;
    $query = pg_query("UPDATE chatterprofileinfo SET lastLogin='now()' WHERE email='$userName'");

}

if(isset($_SESSION['$userNameSet'])) {

    $userName = $_SESSION['$userNameSet'];
    $signinCheck = true;
    $query = pg_query("UPDATE chatterprofileinfo SET lastLogin='now()' WHERE email='$userName'");

}

This is the top starting the session depending on if your logged in or not.

then if I enter in the info here and put it through this

if($error==false) {

    $query = pg_query("UPDATE chatterprofileinfo SET aboutSelf='$aboutSelf', hobbies='$hobbies', music='$music', tv='$tv', sports='$sports', lastLogin='now()' WHERE email='$userName'") or exit(pg_last_error());
    //header('Location: signup_step3.php'.$rdruri);

}

nothing shows up for on my database from this.

I have no idea where I went wrong

the website is

http://opentech.durhamcollege.ca/~intn2201/brittains/chatter/

  • 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-14T03:12:13+00:00Added an answer on May 14, 2026 at 3:12 am

    For starters, don’t put things that aren’t strings in single-quotes like that. ‘now()’ means a literal string “now()”

    Also, if you’re doing updates to your database you’re better of using prepared statements to help prevent against sql injection. In your case, see http://www.php.net/manual/en/function.pg-prepare.php

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

Sidebar

Related Questions

I'm making an application, and i need to write some stuff in the registry,
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
I'm making a Social Networking Website using this book called PHP5 Social Networking. I'm
I'm making a program that is using Windows Shell Integration, and the registry changes
I'm making a program in visual c++. The program relies on some dll files,
I'm making some tidy installers for our internal libraries (instead of just opening the
I'm making a program depending on some DLLs included in a third party program.
Making a 2D OpenGL game. When rendering a frame I need to first draw
I have some code which I am making available via RMI. If my program
I tried making registry changes by running WScript that runs reg , but it

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.