techwithquestion Posted November 24, 2014 Share Posted November 24, 2014 Hello I need to customize order page for my site. Can Some one give me code for order and client login. My developer is on leave. I can not wait until he returns from leave.. I tried to use below code for login but its not working http://domain.com/order.php <?php $url = "http://www.domain.com/whmcs/includes/api.php"; # URL to WHMCS API file $username = "Admin"; # Admin username goes here $password = "whmcs_password"; # Admin password goes here $command = "validatelogin"; $postfields["action"] = "validatelogin"; $postfields["email"] = "xyz@plantest.com"; $postfields["password2"] = "Zaq12345"; $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } if ($results["result"]=="success") { # Result was OK! } else { # An error occured echo "The following error occured: ".$results["message"]; } ?> Sorry I don't have much knowledge about php , Am I using correct code ? 0 Quote Link to comment Share on other sites More sharing options...
Cain72 Posted November 25, 2014 Share Posted November 25, 2014 Hi tech, its probably a good idea to wait for your developer, i understand the need to get things done now, but this in turn could lead to bigger problems for not only your developer but your entire venture. eg: $command = "validatelogin"; $postfields["action"] = "validatelogin"; $postfields["email"] = "xyz@plantest.com"; $postfields["password2"] = "Zaq12345"; Cain 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.