I have resolved the problem off adding to my authorised user database, however the problem I now have is checking the authorised users .
I getting an error message to "Could not excute query" when the query is check the same user name is in use and if so to prompt the user to enter a new username.
// Check Username
session_start();
require ("serverdtls.php");// Server Details
mysql_connect($host,$user,$spassword) or die ("Unable to connect to server!");
mysql_select_db($database);
$sql = "SELECT userName * FROM Auth_members WHERE userName = '$userName' AND valMem = \" 3\" ";
$result = mysql_query($sql) or die ("Could not execute query");
$nrows = mysql_num_rows($result);
if ($userName = $nrows['userName']) {
$valMem = "0";
echo "
Member details already in use....please re-enter!!</p>";
include ("addMem_x.php");
exit;
}
else if ($userName != $nrows['userName']) {
....}
mysql_query($sql) or die(mysql_error() . "
" . $sql);
More than likely you need to be using single quotes, not double.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
that and I didnt notice the invalid "field * " in the select clause.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Thanks again for your assistance...my scripts working!!
yeha!!
Must read Review for Serious PHP Developers
NuSphere PhpED 5.5
: The Staff of php-editors.com recently spent a few days working with NuSphere
PhpED 5.5
(a popular PHP IDE) and
NuCoder 2.0
(a PHP Encoding Utility), read up on all the details.