Answer the question
In order to leave comments, you need to log in
How to display data received by WSDL using PHP in html?
Hello.
I don't have much experience in SOAP and WSDL, so I have a question.
dpkr-service.php
<?php
if (!empty($_POST)) {
$clientDPKR = new SoapClient("http://url-to.svc?wsdl", array('trace' => true));
// $result = $client->name_of_procedure($arg1, $arg2, ...);
$mkd = htmlspecialchars($_POST['mkd']);
$param = array("year" => '$mkd');
$resultMkd = $clientDPKR->GetCommonInfoMkd($param);
print_r($mkd);
}
?>
<?php require_once('dpkr-service.php'); ?>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="POST">
<label for="mkd">MKD info:</label>
<input type="number" min="2010" max="2040" name="mkd" placeholder="Year" />
<input type="submit" />
</form>
<?php print '<pre>'; print_r($resultMkd); print '</pre>'; ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question