Forums

This topic is locked

Check new Username (Extension)

Posted 10 Jun 2003 12:57:24
1
has voted
10 Jun 2003 12:57:24 Saeed Abdi posted:
Seem to be having problem with Check new Username extension by felix for php,
I keep getting the following error msg

"Warning: Cannot modify header information - headers already sent by (output started at E:\Site\login\adduser.php:2) in E:\Site\login\adduser.php"


$FF_flag="MM_insert";
if (isset($HTTP_POST_VARS[$FF_flag])) {
$FF_dupKeyRedirect="Usererror.php";
$FF_dupKeyUsernameValue = $HTTP_POST_VARS["username"];
$FF_dupKeySQL = "SELECT username FROM users WHERE username='" . $FF_dupKeyUsernameValue . "'";
mysql_select_db($database_password_entry, $password_entry);
$FF_rsKey=mysql_query($FF_dupKeySQL, $password_entry) or die(mysql_error());
if(mysql_num_rows($FF_rsKey) > 0) {
// the username was found - can not add the requested username
$FF_qsChar = "?";
if (strpos($FF_dupKeyRedirect, "?") $FF_qsChar = "&";
$FF_dupKeyRedirect = $FF_dupKeyRedirect . $FF_qsChar . "requsername=" . $FF_dupKeyUsernameValue;
header ("Location: $FF_dupKeyRedirect";
exit;
}


Seems to be complaining about the line above exit.

any help is appreciated and it goes without saying that my php knowledge is limited so go easy please

Reply to this topic