Solved

Pass the Values from PHP Form to Web Service?

Posted on 2014-09-09
2
164 Views
Last Modified: 2014-09-29
So I've got a working consumption of a web service.

My goal is to create a form, capture the values by a User, then process that through the web service. Then throw the results back up on the page.

I'm thinking this is pretty straightforward? Is there some template I can starting using?

<html>  
<head>  
<title>Call to Navigator Web Service</title>  
</head>  
<body>  
<?php    


$param = array('commodity' => 'LAPTOP',  'placeOfPerformance' => array('location' => 'LSA' , 'lsaStates' => 'NY', 'VA', 'TX', 'oconusStates' => 'ALASKA', 'EMEA'),  'equipmentType' => 'ANY', 'socioEconomicObjective' => 'NONE', 'agencyCode' => '007',);

$client = new SoapClient('https://sso-test.fas.gsa.gov/mpdev/navigator/wsdl');  
$results = $client->__soapCall('retrieveContractVehicles', array('parameters' => $param));  
  
print_r($results);  
echo ("<br />");
echo ("We are crazy 8");
  
?>  
</body>  
</html>  

Open in new window

0
Comment
Question by:sandshakimi
  • 2
2 Comments
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 40313218
Is the question how to use PHP with HTML forms?  If so, good examples are in the introductory tutorial.
http://www.php.net/tut.php
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 40350037
I'd like an explanation of the grade you gave here.  Please review the grading guidelines first.
http://support.experts-exchange.com/customer/portal/articles/481419
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question