Jump to content

<? ben >?

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

About <? ben >?

  • Birthday 02/25/1989

Contact Methods

  • AIM
    sexybn617
  • MSN
    codmodsuk@hotmail.com
  • Website URL
    http://www.elite-commandos.co.uk

Profile Information

  • Gender
    Not Telling
  • Location
    uk

<? ben >?'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. the first block of code is my login bit i need help sorting the varibas out coz the 2nd block of code is an update thing which updates the persons profile i need it so they can edit it becaus when they do it shows my deatils go to www.elite-commandos.co.uk and click register then u will be logged in in the topcorner of the page u will be on it says update profile see 4 ur self thanks
  2. hi i have ths code <?php // *** Validate request to login to this site. session_start(); $loginFormAction = $_SERVER['PHP_SELF']; if (isset($accesscheck)) { $GLOBALS['PrevUrl'] = $accesscheck; session_register('PrevUrl'); } if (isset($_POST['username'])) { $loginUsername=$_POST['username']; $password=$_POST['password']; $MM_fldUserAuthorization = ""; $MM_redirectLoginSuccess = "login.php"; $MM_redirectLoginFailed = "index.php"; $MM_redirecttoReferrer = true; mysql_select_db($database_localhost, $localhost); $LoginRS__query=sprintf("SELECT username, password FROM logon WHERE username='%s' AND password='%s'", get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password)); $LoginRS = mysql_query($LoginRS__query, $localhost) or die(mysql_error()); $loginFoundUser = mysql_num_rows($LoginRS); if ($loginFoundUser) { $loginStrGroup = ""; //declare two session variables and assign them $GLOBALS['MM_Username'] = $loginUsername; $GLOBALS['MM_UserGroup'] = $loginStrGroup; //register the session variables session_register("MM_Username"); session_register("MM_UserGroup"); if (isset($_SESSION['PrevUrl']) && true) { $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; } header("Location: " . $MM_redirectLoginSuccess ); } else { header("Location: ". $MM_redirectLoginFailed ); } } ?> on the index.php and i have a update.php BUT how do i get the username varibal to carry on on the next page <?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form2")) { $updateSQL = sprintf("UPDATE logon SET password=%s, age=%s, email=%s, name=%s, advtar=%s, a=%s WHERE username=%s", GetSQLValueString($_POST['password'], "text"), GetSQLValueString($_POST['age'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['name'], "text"), GetSQLValueString($_POST['advtar'], "text"), GetSQLValueString($_POST['a'], "text"), GetSQLValueString($_POST['username'], "text")); mysql_select_db($database_localhost, $localhost); $Result1 = mysql_query($updateSQL, $localhost) or die(mysql_error()); $updateGoTo = "login.php"; if (isset($_SERVER['QUERY_STRING'])) { $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $updateGoTo)); } $colname_Recordset1 = "1"; if (isset($_GET['WHAT DO I PUT HERE'])) { $colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['WHAT DO I PUT HERE'] : addslashes($_GET['WHAT DO I PUT HERE']); } mysql_select_db($database_localhost, $localhost); $query_Recordset1 = sprintf("SELECT * FROM logon WHERE username = '%s'", $colname_Recordset1); $Recordset1 = mysql_query($query_Recordset1, $localhost) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); ?> thats my update Bit but were do i get my verabals to account for the username thanks a lot 4 ur help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.