[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Returning a value to a certain location using PHP

Posted on 2011-04-28
Medium Priority
Last Modified: 2012-05-11
Hey guys,

I have a PHP based site. On account.php where there is a button for logging in thats calls php/login.php on click. When clicking login in validates your details, then echos to a blank page whether login was successful or not.

What im wanting to do is have the php/login.php send data back to the account.php form to the location under the login button. How would I do this?
Question by:Letsgetcoding
  • 2
LVL 111

Accepted Solution

Ray Paseur earned 2000 total points
ID: 35483134

Expert Comment

ID: 35483174
in php/login.php make function:
function CheckLogin($username, $password)
       // Check username and password code.

      return $CheckResult;

Open in new window

in  account.php insert commands:

// You code here

$checkResultVariable = CheckLogin($username, $password);

//Your code here

Open in new window

LVL 111

Expert Comment

by:Ray Paseur
ID: 35838909
Thanks for the points.  If you want a good learning resource for PHP and MySQL, this book is excellent:

Best regards, ~Ray

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
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.
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

872 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