jasmine825 jasmine825 - 4 months ago 8
PHP Question

How can I call another file to my current one php

require("Remittance.php");

$id=$_GET['id'];

$remit= new Remittance();
$remit->getById($id);

echo $remit;


I have this code, and I just wanted it to display what the id is inside the file from Remittance. However it won't display anything, all I get is a blank page, and i'm not sure what the exact problem is.

Answer
require("Remittance.php");

$id=$_GET['id'];

$remit= new Remittance();
$voucher = $remit->getById($id);

echo $voucher;