Jump to content

rpg711

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by rpg711

  1. I'm a total noob at PHP, and need to make a simple authentication server-side script for a Java application that is in no way associated with the server. My Java app URL encodes in this format(pretty standard): "key1"="value1"

    I THINK I have the correct code in PHP to read the HTTP POST data values...

    $username = array("1", 2, 3, 4, 5);
    $match = FALSE;
        foreach($_POST as $key1 => $value1){
    	foreach($username as $key2 => $value2){
    		if ($value1 == $value2){
    			$match = TRUE;
    			break;
    		}
    	}
    	if ($match = TRUE) break;
        }

     

    After all this I'd like to send a response saying either TRUE or FALSE(in other words, I'd like to send the variable $match).

    I've looked far and wide for how to do this in PHP, and couldn't find a single helpful page.

×
×
  • 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.