Hi
It doen't post any mySQL error code - it just runs the 'login failed' part of the script - as though it couldn't access the database
I have a version of it working fine on a server right now - but if I try to rewrite it to access another table in the same database, or another database, it just runs straight to the login failed page
I have spent two days trying every variation of the script - different...
User Profile
Collapse
-
Login script which only works some of the time...?
Hi
I wrote a very basic login script which acesses a mySQL database, like this:-
<?php
// compares values entered in login page form with mySQL database,
and then
directs either to protected page or to a failure page
$em = trim($_POST['email']);
$pw = trim($_POST['password']);
$link = mysql_connect ('server', 'account', 'password');
... -
Thanks for that - the script is now returning messages nicely. ;)Leave a comment:
-
OK
1) Yes <?php> is wrong - slapped wrist! - ( and I left the ?> off....) but removing the extra bracket still produces the same parse error
2) Hemashiki's script produces this error:_
Warning: mysql_fetch_arr ay(): supplied argument is not a valid MySQL result resource.
3) Ronverdonk - could I ask you what OS and version of php you are running? - I am on Apple OSX 10.3.9, and php...Leave a comment:
-
Compare Form Data to Database
Hi
I am trying to write a (very) basic script to compare data retrieved from a form with a mySQL database. In this case it is a simple name and password entry - if there is a corresponding entry in the database, then it prints a simple sucess message, and if not a failure messge.....
The script looks like this, and I get ' parse error, line 25,( somewhere after $query)
Any ideas?
...
No activity results to display
Show More
Leave a comment: