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

  • Home
  • SEARCH
  • 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 6938997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:33:46+00:00 2026-05-27T12:33:46+00:00

I am having a problem with returning a value from a library back to

  • 0

I am having a problem with returning a value from a library back to the controller.
When I echo the return value it shows nothing, but when I echo it in the library instead of returning it does show the whole thing.

This is the controller:

$this->load->library('lib_registration');
$message = $this->lib_registration->create_email($registerData);
echo $message;

This is the library:

<?php
class lib_registration
{
public function create_email($incomingData)
{
    $name = $incomingData['name'];
    $lastname = $incomingData['lastname'];
    $email = $incomingData['email'];
    $password = $incomingData['password'];

    $this->return_email($name, $lastname, $email, $password);
}

public function return_email($name, $lastname, $email, $password)
{
    $emailMessage = '
        <p>Beste '.$name.' '.$lastname.'</p>
        <p>
            Ten eerste heten wij u welkom bij BodyBook. Uw online medische dossier waarin u bepaalt wat er in staat.
            Privacy staat bij ons heel hoog en wij respecteren ook de privacy van anderen. Daardoor willen wij u 
            er gelijk op wijzen dat u zelf beslist wat in uw online dossier komt te staan en wat zichtbaar is voor anderen.
        </p>
        <p>
            Ten tweede heeft u zojuist een account aangemaakt bij BodyBook.
            Hieronder staat uw voorlopig wachtwoord om mee in te loggen.
            Gelieve dit wachtwoord gelijk te veranderen op het moment dat uw voor het eerst inlogt.
        </p>
        <p>
            Uw wachtwoord = <span style="font-weight:bold; font-size:20px"><strong>'.$password.'</strong></span>
        </p>
        <p>
            Onthoudt dit wachtwoord goed. Dit wachtwoord is beveiligd opgeslagen en kan daarom niet worden opgevraagd.
            Mocht u uw wachtwoord vergeten zijn, dan is daar een optie voor tijdens het inloggen.
            Mocht u uw wachtwoord willen wijzigen, dan kan dat in uw account instellingen als u bent ingelogd.
        </p>
        <p>
            Wij wensen u veel plezier met BodyBook.
        </p>
        <p>
            Met Vriendelijk Groet,
        </p>
        <p>
            Het BodyBook team.
        </p>
        ';

    return $emailMessage;
}
}
?>

I hope you guys can show me what I am doing wrong.

  • 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-27T12:33:47+00:00Added an answer on May 27, 2026 at 12:33 pm

    The create_email function needs a return as well. Like this…

    public function create_email($incomingData)
    {
        $name = $incomingData['name'];
        $lastname = $incomingData['lastname'];
        $email = $incomingData['email'];
        $password = $incomingData['password'];
    
        return $this->return_email($name, $lastname, $email, $password); //return here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The table I'm having problem with is pushed from another table controller, and there
I'm having problems returning a Session value set from mocking using Moq. Using the
I am having a problem where a routine (that I cannot modify) is returning
I am having a problem converting a value to int. I ran this query
I'm new to LINQ and am having a problem getting proper results from a
I am having problem with using REST and returning response as an XML. I've
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
We're having problem with a huge number of legacy stored procedures at work. Do
I'm having problem in the following line: rd.PrintOptions.PaperSize = PaperSize.PaperFanfoldStdGerman; it throws an exception
We are having problem with the server migration. We have one application that are

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.