Have just used Kevin Yanks tutorial http://www.sitepoint.com/article/use...essions-mysql/ to set up user access.
A fantastic tutorial, but there are two points which just don't work for me.
1 - If i use <form method="post" action="<?=$_SERVER['PHP_SELF']?>">
the page isn't called again, it just appends <?=$_SERVER['PHP_SELF']?> to the url
if i use <?php echo $_SERVER['PHP_SELF']; ?> it works fine
2 - the mysql PASSWORD function causes an error
If i use $sql = "INSERT INTO user SET
userid = '$_POST[newid]',
password = PASSWORD('$newpass'),
fullname = '$_POST[newname]',
email = '$_POST[newemail]',
notes = '$_POST[newnotes]'"; i get a mysql error
but, if i then copy the sql string generated and exec it in sqlyog it works fine!
If i remove the PASSWORD function it works
I am guessing they are both down to php.ini settings ???









Bookmarks