Does this script makes sense? I am trying to take the value that is set to "authenticat" and write it to authentication.
I think it is getting messes up by the $authenticat = "1" part.
Thanks
function check_username_pin($USERID, $PIN)
{
$query="SELECT id FROM users WHERE ( userid = '$USERID' AND pin = '$PIN' )";
// dont return pin because of hackers
$result=mysql_query($query);
if(mysql_num_rows($result)>0)
{
$authenticat = "1"
}
$query="SELECT id FROM users WHERE ( useris = '$USERID' )";
// dont return pin because of hackers
$result=mysql_query($query);
if(mysql_num_rows($result)==0)
{
$authenticat = "2"; // bad id
}
$query="SELECT id FROM users WHERE ( pin = '$PIN' )";
// dont return pin because of hackers
$result=mysql_query($query);
if(mysql_num_rows($result)==0)
{
$authenticat = "3"; //bad pin
}
}
write("SET VARIABLE authentication $authenticat");
Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the user and pass obviously but im wondering how i can pass the login details through to the script
extending tidy
I have problem with type-hinting and extending tidy. This code creates error:Code: class cMyTidy extends tidy{ public $tralala;}$oMyTidy = new cMyTidy();doSomething($oMyTidy);function
DATEDIFF Question
First time post, and of course it is a help question.I am using a WP plug-in to display previous and next games in a season. (Leaguemanager is the plug-in name - Link
login page does not execute a else statement
I've created a login page using sessions.When an incorrect user name or password is entered then a custom messege error message apears.But if a correct user name and password is used then notthing
Simple PHP/Java Help..
Hi,I'm trying to build a little program to do with calculating postage. Unfortunately i haven't got a very good idea of how to use PHP, Java, or any other languages - apart from CSS and HTML -_-. If
True way to see if action was successful?
If this is a good way to see if action was successful to continue:Code: function changeGameState($GameId) { mysql_query("UPDATE challenges SET status=status+1 WHERE id='$GameId'");
blank page.... nothing is happening.
I'm new to a lot of this but in the last 24hrs have learned a lot.Installed latest version of mysql... went fine no problems.Installed latest version of php... went fine no problems.did all my
question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.I have roughly 30 files. I want to be able to edit every $_POST and $_GETCode:
help with email script...
hey I need help with my mail scriptwhen the form on http://www.mcgdesignstudio.com/contact.html is filled out, it send the from with no errors.. however i never receive it.. my hosting company have
IMAGE - SERVER SIDE scripting help...
How to receive pixel data of an image and buid a bitmap file on the server using the HTTP POST method?please help