jasmine825 jasmine825 - 4 months ago 10
PHP Question

An object inside another class php

require("Remittance.php");

CLass Test{

function __construct(){

}

function getById(){
$remittance= new Remittance();
$getById= $remittance->getName();
echo $getById;
}
}

$test= new Test();
$test -> getById();


I have a function inside
Remittance.php
called
getById
and I want to be able to call it inside my
test.php
file. As well as making
Remittance.php
an object inside my test file

Answer

use

include 'Remmittee.php';

and the URL should be

www.inactive/test?id=1234

and to get the id, use,

$_GET['id'];