progress200710b Posted July 29, 2008 Share Posted July 29, 2008 Hello I m a new bie in this PHP world. Actually i have to create a webservice in PHP to check UserName and password to verfiy a valid user. Although i have to write 20 functions in this web service , but if some one will provide a sample code then i will get a basic idea of PHP webservice..... Hope so... i will get my answer..........Eagerly waitting for the response from PHP masters........Please Provide me a sample code. Link to comment https://forums.phpfreaks.com/topic/117112-php-webservice/ Share on other sites More sharing options...
Third_Degree Posted July 29, 2008 Share Posted July 29, 2008 <?php if ( empty( $_POST['user'] ) || empty( $_POST['pass'] ) ) { ?> <form action="<?php print $_SERVER['PHP_SELF']; ?>" method="post"> Username: <input type="text" name="user" /><br /> Password: <input type="password" name="pass" /><br /> <input type="submit" value="Log In" /> </form> <?php die( ); } if ( $_POST['user'] == 'CorrectUser' && $_POST['pass'] == 'CorrectPass' ) { print 'Correct!'; } else { print 'Incorrect'; } ?> Link to comment https://forums.phpfreaks.com/topic/117112-php-webservice/#findComment-602383 Share on other sites More sharing options...
progress200710b Posted July 29, 2008 Author Share Posted July 29, 2008 Thanks for ur response. But I need a Webservice code that will call on the click of Log in Button...... Link to comment https://forums.phpfreaks.com/topic/117112-php-webservice/#findComment-602390 Share on other sites More sharing options...
samshel Posted July 29, 2008 Share Posted July 29, 2008 Check this out... http://in2.php.net/manual/en/book.soap.php you get all information regarding SOAP servers, client and functions. Link to comment https://forums.phpfreaks.com/topic/117112-php-webservice/#findComment-602397 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.