Jump to content

PHP WebService


progress200710b

Recommended Posts

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

<?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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.