Hi,

function openingBalance($accountNum) {
	$sql_OpenBal = " SELECT closing_balance FROM bank_balance				WHERE bank_account.account_no = $accountNum ";
	$runSql = mysqli_query($mysqli, $sql_OpenBal);...

Red line generates an error. "Warning: mysqli_query() expects parameter 1 to be mysqli, null given".

I call function echo openingBalance (1500); How can i search $accountNum in SQL statement?
Thanks

solved. I added database conenction string into function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.