I finally found a solution.
I have a lot of misconception about a stored procedure when you return to the data for this question. Even the simplest.
Instead of retrieving the data of the called parameters, the called parameter is used to call other parameters of the result. For example, UserId and UserPwd are called here to display UserName and LoginStatus .
This is the correct code to extract data from the result parameter UserName and LoginStatus and based on the variable parameter UserId and UserPwd .
<?php $conn=odbc_connect("dsn", " ", " "); if (!$conn) { exit("Connection Failed : " . $conn); } $stmt=odbc_exec($conn,"CALL ndTblUser (".$_POST['UserId'].",'".$_POST['UserPwd']."')"); if (!$stmt) { "Error : " . odbc_errormsg(); } if (odbc_fetch_row($stmt)) { $UserName=odbc_result($stmt,"UserName"); $LoginStatus=odbc_result($stmt,"LoginStatus"); } if($LoginStatus==1) { echo odbc_result($stmt,"UserName"); echo odbc_result($stmt,"LoginStatus"); }
Iman yasmin
source share