Jump to content

[SOLVED] Getting function returned variables


adam291086

Recommended Posts

i have this function

 

function get_note($account, $domain)

{
	require_once('DbConnector.php');
	$loginConnector = new DbConnector();
	$getnote = $loginConnector->query("SELECT * FROM Notepad WHERE user_account_number = '$account' AND user_domain = '$domain'");
		while ($this->notedata = $loginConnector->fetchArray($getnote))
		{	
		$title = $this->notedata['title'];
		$text = $this->notedata['text'];
		$date = $this->notedata['date_due'];
		return $title;
		return $text;
		return $date;
		}
}

 

this function is within a class which is initated like

 

<?php
error_reporting(E_ALL);
require_once ('../../code/note.php');
$account = '123';
$domain = 'www.adamplowman.co.uk';

$add = new note();
$add->get_note($account, $domain)

?>

 

i want to get the return values $text, $title and $date into the page that the function is intated and echo them out within certain places within some html code.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.