Solved

Pass the Values from PHP Form to Web Service?

Posted on 2014-09-09
2
152 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 108

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 108

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now