How would I code it that the script takes two variables that are passed to it (UserID and PIN), and checks the table to see if the PIN matches the one in the table. If it does it should assign the value "1" to a variable, if not a value "2".
This variable should then be passed back to the original calling script. (In a different PHP file).
What I have so far is:
$ID = $_SERVER["argv"][1];
$ID = trim($ID);
$ID = ltrim($ID);
$PIN = $_SERVER["argv"][2];
$PIN = trim($STATUS);
$PIN = ltrim($STATUS);
$link = mysql_connect("localhost", "root", "passw0rd")
or die("Data base connection failed");
mysql_select_db("test")
or die("data base open failed");
I dont know the sql command to compare if the value passed on matches the current record.
Thanks
Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about because the control being searched for is nested within a container other than the webform.I came
Request-URI Too Large
I have created a simple submit form for a mysql database that puts a piece of code into database.But if I want to put a document of any decent length, eg. 500 characters (I guess), I get the error
finding key position of specified value in multi-dimensional array
Code: $openedfile = fopen($tfc_file4, "r");$rc = 1;while(!feof($openedfile)){$rc++;$hold[$rc] = explode("|" , trim(fgets($openedfile)));}fclose($openedfile);How can I loop through
Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data update current data or delete old data from tempproducts to products then it will delete the
Hyperlink in PHP to MySQL record
Hello,I am having trouble as i am new to php. I have connected to the database and I have displayed the fields i want on my page. I need to access certain fields by links to each letter.For example A
help with calculations on a flat text file
hello,I have this code below that is attached to a flat file like this:Email:LastName:FirstName:Assignment1,100:Assignment2,100:Quiz1,50someone@email.com:Doe:John:85:93:45Here is the code:
output printing as hexadecmal... XD
Everything works except the calcem call for the totusold and totuprice. The out put shows up as hex. Im not positive but i think i might have to use PBV or PBR?
Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i was trying to make a Image gallery for just that particular user who had uploaded those images. i am
Tournament Brackets (Double Elimination)?
Is making a double elimination tournament style bracket system capable of being done in php?After dealing with numerous very well qualified programmers to only turn down the project due to difficulty
User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out by myself.Im developing a web based reporting application, based upon PHP/MySQL. At some point the