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
Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado<tr> <th>{ov_server_time}</th> <th
need to add "sizes" to shopping cart
Hey guys, I am trying to figure out a way to add a "size" selector on to this bit of code. I added a way to view it in the "zoom.php" page and also to select a size from the sizes
Getting Subdomain Name With PHP?
I want to grab the subdomain name with PHP so I can generate database queries.for example my subdomain is san-jose.mydomain.comHow would I go about grabbing the subdoman name with PHP? Thanks!
Cloud Computing?
Hello,I was wondering if anyone could help explain this term to me. I'm starting to hear it a lot now. Tried looking up some definitions on it via Google and on Wikipedia but its all really technical
Mail functionality from localhost to server
Hi I am facing problem of mail functionality.When i tested mail functionality in my localhost it works fine but when i tried it on server it didn't work and also no error it displays.So please give me
Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had to do with method overloading or overriding(through inheritence). The following wikipedia entry
need help in update query
hi i have a dynamic form. i need help in how can i use update query when values from dynamic form get pass to php file.currently when i press submit it displays this and does not update fieldsCode:
Insert numbers from Barcode scanner into online php page
I have a real big problem, Here is what I'm trying to do. I have a Intermec CN3 handheld computer that has a builtin scanner. We have built a website that manage our inventory. How? We have a simple
generating all possible random letters
hi'how can i randomize the letters a,b,c,d,e all possible ways, and i want to print the resultand unique from each?thanx
Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year changes ?