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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:30:02+00:00 2026-06-10T17:30:02+00:00

I have a page here: https://github.com/alexwaters/PWTKD-new-CMS/blob/master/taekwondo/schedule-dev.php that is not showing my session messages: <?php

  • 0

I have a page here: https://github.com/alexwaters/PWTKD-new-CMS/blob/master/taekwondo/schedule-dev.php that is not showing my session messages: <?php echo output_message($message); ?>

I have been trying to track down what the heck is wrong with them, but have no idea. They work on other pages but not this one.

Can someone please help me find the noobie mistakes I made?

Per request here is some of the code that may be relevant:

schedule-dev.php

<?php require_once("../includes/initialize.php"); ?>
<?php $schedules = Schedule::find_all();?>
<?php $messages = Messages::find_by_id(1);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script src="jquery-1.2.6.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function(){

        $("#contactLink").click(function(){
            if ($("#contactForm").is(":hidden")){
                $("#contactForm").slideDown("slow");
            }else{
                $("#contactForm").slideUp("slow");
            }
        });

    });

    function closeForm(){
        $("#messageSent").show("slow");
        setTimeout('$("#messageSent").hide();$("#contactForm").slideUp("slow")', 2000);
    }
</script>

…

<?php 
if(isset($_POST['signupSubmit'])){
    $signup = new Signup();
    $signup->name = $_POST['name'];
    $signup->age = $_POST['email'];
    if($signup->save()) {
        $session->message("We will contact you with details.");
        redirect_to('schedule.php');
    } else {
        $message = join("test", $signup->errors);
    }
}
?>
<?php echo output_message($message); ?>
    <div id="contactFormContainer">
        <div id="contactLink"></div>
        <div id="contactForm">
            <fieldset>
                <label for="name">Name *</label>
                <input id="name" type="text" />
                <label for="email">Email address *</label>
                <input id="email" type="text" />
                <input id="sendMail" type="submit" name="signupSubmit" onclick="closeForm()" />
                <span id="messageSent"></span>
            </fieldset>     
        </div>
    </div>

Signup.php

<?php
// If it's going to need the database, then it's 
// probably smart to require it before we start.
require_once(LIB_PATH.DS.'database.php');

class Signup extends DatabaseObject {

    protected static $table_name="signup";
    protected static $db_fields=array('id', 'name','email');
    public $id;
    public $name;
    public $email;

    public $errors=array();

    public function save() {
        // A new record won't have an id yet.
        if(isset($this->id)) {
            // Really just to update the name
            $this->update();
            return true;
        } else {
            // Make sure there are no errors
            // Can't save if there are pre-existing errors
            if(!empty($this->errors)) { return false; }

            // Make sure the name is not too long for the DB
            if(strlen($this->name) >= 255) {
                $this->errors[] = "Name must be <= 255 characters long.";
                return false;
            }
            if(strlen($this->email) >= 255) {
                $this->errors[] = "Email must be <= 255 characters long.";
                return false;
            }
            if(empty($email)) {
                $this->errors[] = "Please enter an email address";
                return false;
            }
            //Finally add the item to the DB
            if($this->create()) {
                return true;
            } else {
                // 
                $this->errors[] = "Send failed, please contact us";
                return false;
            }
        }
    }

and some other generic class stuff

message method from session.php

public function message($msg="") {
  if(!empty($msg)) {
    // then this is "set message"
    // make sure you understand why $this->message=$msg wouldn't work
    $_SESSION['message'] = $msg;
  } else {
    // then this is "get message"
        return $this->message;
  }
}
  • 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-10T17:30:03+00:00Added an answer on June 10, 2026 at 5:30 pm
    1. I had to use $this-email in the save method
    2. I needed to make the form an actual post form
    3. The session message wasn’t being outputted(?) because it wasn’t grabbing the post vars
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use the History.js to save the current (History can be found here: https://github.com/browserstate/History.js/blob/master/README.md
I have a page that i have been starting to setup here http://www.brandybrowauto.com/NEW.html that
I'm using django-voting: https://github.com/brosner/django-voting/tree/master/voting And after my post, I'm redirected here: http://www.iana.org/domains/example/#c40 <form method=POST
UPDATE : The full site code is here - https://github.com/eWizardII/PeerInstruction I have the following
So I have this page here: http://www.eminentmedia.com/development/powercity/ As you can see when you mouse
I am using JQuery Accordion. I have this page here: http://www.hauppauge.com/site/support/support_colossus.html#tabs-6 What happens is
I have a page going here that uses jQuery: http://treethink.com/services What I am trying
Here is my page: http://budclarychevy.com/custom/parts-specials-test My aim is to have the images clickable and
I'm reading about using git as an svn client here: http://learn.github.com/p/git-svn.html That page suggests
So I set up an ATPagingView(ScrollView)( https://github.com/andreyvit/SoloComponents-iOS/tree/master/ATPagingView ) with a custom PageView for each

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.