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
Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...Code: $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL, 'PRODUCT_LIST_NAME'
Creating an invoice
Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tiers.I've got it working so it only displays a tier if the quantity is greater than 0 but I end up
extract content from a website
i have written a code that will grab the content from the index page..i would like to know how can i leech completely thru the site (index,contact, news pages) and grab specific content only like
How to grab certain words ??
I am working with this APIReturns JSON.curl http://letsbetrends.com/api/current_trendsHow to grab just the trending topics Which come after "name" : "xxxxxxxx" (the x's)Or how to
Linked Keywords
I am trying to get a script that makes my predefined keyword converted to links and / or converted to a certain color, size and so on... In one of the other threads Ive posted I got an answer I am a
Help with ORDER BY
Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but I can't figure it out. If anyone could help, I would truly appreciated it! if(isset($countryid))
Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a users details entered into a login form against details stored in an existing flat file.No matter what
Fetching array then reversing it
Hi, I have a simple problem, I'll try to explain it as best I can:News entries in my database are ordered from oldest to newest. In order to pull out the last 10 lines I do
hiCode: <?phpecho "<td width=\"$columnWidth%\" align=\"center\"><a href=\"" . $_SERVER['PHP_SELF'] .
Install page
How do I make it so when a user submits information on the Install page, it'll right it into the correct file. I can do the forms and $_POST, but I need it so that it actually works.Current stuff in