SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A page to retrieve then update profile details for currently logged in user only

    Hi,

    I designed and manage a data-driven website for medical professionals using php and MySQL. I'm not an expert but the site works very well. There is log-in log-out functionality (the log-in function is on the main page of the site so this page is only accessible once logged-in and there are 2 levels of security, general (2) and administration (1). I have a set of administration pages for me to add, edit or delete user's information but I now want to allow users to access their own info so that they can add or edit details.

    I am having huge problems with this.

    Here is the code for the admin page to access ALL the users. Can anyone help by telling me what I need to change to make it only access the single user's details, who is accessing it at the time?

    I will be sooooooo grateful as this is driving me insane.

    the user_email is the primary key and unique identifier. Obviously I should remove the repeat regions and add the level 2 security clearance but the rest I just can't seem to get it.....

    This is the basic edit page for the admin user with some fields left out:

    .........................................................................................................................................

    PHP Code:
    <?php require_once('../Connections/justrislide2.php'); ?>
    <?php
    if (!isset($_SESSION)) {
      
    session_start();
    }
    $MM_authorizedUsers "1";
    $MM_donotCheckaccess "false";

    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers$strGroups$UserName$UserGroup) { 
      
    // For security, start by assuming the visitor is NOT authorized. 
      
    $isValid False

      
    // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
      // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
      
    if (!empty($UserName)) { 
        
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
        // Parse the strings into arrays. 
        
    $arrUsers Explode(","$strUsers); 
        
    $arrGroups Explode(","$strGroups); 
        if (
    in_array($UserName$arrUsers)) { 
          
    $isValid true
        } 
        
    // Or, you may restrict access to only certain users based on their username. 
        
    if (in_array($UserGroup$arrGroups)) { 
          
    $isValid true
        } 
        if ((
    $strUsers == "") && false) { 
          
    $isValid true
        } 
      } 
      return 
    $isValid
    }

    $MM_restrictGoTo "admin_access_denied.php";
    if (!((isset(
    $_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers$_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
      
    $MM_qsChar "?";
      
    $MM_referrer $_SERVER['PHP_SELF'];
      if (
    strpos($MM_restrictGoTo"?")) $MM_qsChar "&";
      if (isset(
    $QUERY_STRING) && strlen($QUERY_STRING) > 0
      
    $MM_referrer .= "?" $QUERY_STRING;
      
    $MM_restrictGoTo $MM_restrictGoTo$MM_qsChar "accesscheck=" urlencode($MM_referrer);
      
    header("Location: "$MM_restrictGoTo); 
      exit;
    }
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function 
    GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
    {
      if (
    PHP_VERSION 6) {
        
    $theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }

      
    $theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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;
    }
    }

    $currentPage $_SERVER["PHP_SELF"];

    $maxRows_EditUser 20;
    $pageNum_EditUser 0;
    if (isset(
    $_GET['pageNum_EditUser'])) {
      
    $pageNum_EditUser $_GET['pageNum_EditUser'];
    }
    $startRow_EditUser $pageNum_EditUser $maxRows_EditUser;

    mysql_select_db($database_justrislide2$justrislide2);
    $query_EditUser "SELECT * FROM `MEMBER` ORDER BY user_surname ASC";
    $query_limit_EditUser sprintf("%s LIMIT %d, %d"$query_EditUser$startRow_EditUser$maxRows_EditUser);
    $EditUser mysql_query($query_limit_EditUser$justrislide2) or die(mysql_error());
    $row_EditUser mysql_fetch_assoc($EditUser);

    if (isset(
    $_GET['totalRows_EditUser'])) {
      
    $totalRows_EditUser $_GET['totalRows_EditUser'];
    } else {
      
    $all_EditUser mysql_query($query_EditUser);
      
    $totalRows_EditUser mysql_num_rows($all_EditUser);
    }
    $totalPages_EditUser ceil($totalRows_EditUser/$maxRows_EditUser)-1;

    $queryString_EditUser "";
    if (!empty(
    $_SERVER['QUERY_STRING'])) {
      
    $params explode("&"$_SERVER['QUERY_STRING']);
      
    $newParams = array();
      foreach (
    $params as $param) {
        if (
    stristr($param"pageNum_EditUser") == false && 
            
    stristr($param"totalRows_EditUser") == false) {
          
    array_push($newParams$param);
        }
      }
      if (
    count($newParams) != 0) {
        
    $queryString_EditUser "&" htmlentities(implode("&"$newParams));
      }
    }
    $queryString_EditUser sprintf("&totalRows_EditUser=%d%s"$totalRows_EditUser$queryString_EditUser);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Edit User</title>
    </head>

    <body>
    <p>EDIT User</p>
    <p>The members are in alphabetical order by surname.</p>
    <p>To edit, click on the email address of the record you want to edit. You will be transferred to an update page to make your changes</p>
    <p>&nbsp;
    <table border="1" align="center">
      <tr>
        <td><h3>email</h3></td>
        <td><h3>user_surname</h3></td>
        <td><h3>user_firstname</h3></td>
        <td><h3>occupation</h3></td>
        <td><h3>country</h3></td>
      </tr>
      <?php do { ?>
        <tr>
          <td><a href="basic_updateuser.php?user_email=<?php echo $row_EditUser['user_email']; ?>"> <?php echo $row_EditUser['user_email']; ?>&nbsp; </a></td>
          <td><?php echo $row_EditUser['user_surname']; ?>&nbsp; </td>
          <td><?php echo $row_EditUser['user_firstname']; ?>&nbsp; </td>
          <td><?php echo $row_EditUser['occupation']; ?>&nbsp; </td>
          <td><?php echo $row_EditUser['Country']; ?>&nbsp; </td>
        </tr>
        <?php } while ($row_EditUser mysql_fetch_assoc($EditUser)); ?>
    </table>
    <br />
    <table border="0">
      <tr>
        <td><?php if ($pageNum_EditUser 0) { // Show if not first page ?>
            <a href="<?php printf("%s?pageNum_EditUser=%d%s"$currentPage0$queryString_EditUser); ?>">First</a>
            <?php // Show if not first page ?></td>
        <td><?php if ($pageNum_EditUser 0) { // Show if not first page ?>
            <a href="<?php printf("%s?pageNum_EditUser=%d%s"$currentPagemax(0$pageNum_EditUser 1), $queryString_EditUser); ?>">Previous</a>
            <?php // Show if not first page ?></td>
        <td><?php if ($pageNum_EditUser $totalPages_EditUser) { // Show if not last page ?>
            <a href="<?php printf("%s?pageNum_EditUser=%d%s"$currentPagemin($totalPages_EditUser$pageNum_EditUser 1), $queryString_EditUser); ?>">Next</a>
            <?php // Show if not last page ?></td>
        <td><?php if ($pageNum_EditUser $totalPages_EditUser) { // Show if not last page ?>
            <a href="<?php printf("%s?pageNum_EditUser=%d%s"$currentPage$totalPages_EditUser$queryString_EditUser); ?>">Last</a>
            <?php // Show if not last page ?></td>
      </tr>
    </table>
    Records <?php echo ($startRow_EditUser 1?> to <?php echo min($startRow_EditUser $maxRows_EditUser$totalRows_EditUser?> of <?php echo $totalRows_EditUser ?>
    </p>
    <p><a href="index.php">BACK to ADMIN</a></p>
    <p><a href="../hivtrislide.php">BACK to justrislide</a></p>

    </body>
    </html>
    <?php
    mysql_free_result
    ($EditUser);
    ?>
    .........................................................................................................................................
    and this is the code for the basic update page that is then accessed after clicking on one of the users from the basic edit page

    ........................................................................................................................................
    PHP Code:
    <?php require_once('../Connections/justrislide2.php'); ?>
    <?php
    if (!isset($_SESSION)) {
      
    session_start();
    }
    $MM_authorizedUsers "1";
    $MM_donotCheckaccess "false";

    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers$strGroups$UserName$UserGroup) { 
      
    // For security, start by assuming the visitor is NOT authorized. 
      
    $isValid False

      
    // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
      // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
      
    if (!empty($UserName)) { 
        
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
        // Parse the strings into arrays. 
        
    $arrUsers Explode(","$strUsers); 
        
    $arrGroups Explode(","$strGroups); 
        if (
    in_array($UserName$arrUsers)) { 
          
    $isValid true
        } 
        
    // Or, you may restrict access to only certain users based on their username. 
        
    if (in_array($UserGroup$arrGroups)) { 
          
    $isValid true
        } 
        if ((
    $strUsers == "") && false) { 
          
    $isValid true
        } 
      } 
      return 
    $isValid
    }

    $MM_restrictGoTo "admin_access_denied.php";
    if (!((isset(
    $_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers$_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
      
    $MM_qsChar "?";
      
    $MM_referrer $_SERVER['PHP_SELF'];
      if (
    strpos($MM_restrictGoTo"?")) $MM_qsChar "&";
      if (isset(
    $QUERY_STRING) && strlen($QUERY_STRING) > 0
      
    $MM_referrer .= "?" $QUERY_STRING;
      
    $MM_restrictGoTo $MM_restrictGoTo$MM_qsChar "accesscheck=" urlencode($MM_referrer);
      
    header("Location: "$MM_restrictGoTo); 
      exit;
    }
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function 
    GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
    {
      if (
    PHP_VERSION 6) {
        
    $theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }

      
    $theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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"] == "form1")) {
      
    $updateSQL sprintf("UPDATE MEMBER SET   user_surname=%s, user_firstname=%s, occupation=%s, Country=%s  WHERE user_email=%s",
                           
                          
                           
    GetSQLValueString($_POST['user_surname'], "text"),
                           
    GetSQLValueString($_POST['user_firstname'], "text"),
                           
    GetSQLValueString($_POST['occupation'], "text"),
                           
    GetSQLValueString($_POST['Country'], "text"),
                           
    GetSQLValueString($_POST['user_email'], "text"));

      
    mysql_select_db($database_justrislide2$justrislide2);
      
    $Result1 mysql_query($updateSQL$justrislide2) or die(mysql_error());

      
    $updateGoTo "confirm.php";
      if (isset(
    $_SERVER['QUERY_STRING'])) {
        
    $updateGoTo .= (strpos($updateGoTo'?')) ? "&" "?";
        
    $updateGoTo .= $_SERVER['QUERY_STRING'];
      }
      
    header(sprintf("Location: %s"$updateGoTo));
    }

    $colname_member "-1";
    if (isset(
    $_GET['user_email'])) {
      
    $colname_member $_GET['user_email'];
    }
    mysql_select_db($database_justrislide2$justrislide2);
    $query_member sprintf("SELECT * FROM MEMBER WHERE user_email = %s"GetSQLValueString($colname_member"text"));
    $member mysql_query($query_member$justrislide2) or die(mysql_error());
    $row_member mysql_fetch_assoc($member);
    $totalRows_member mysql_num_rows($member);
    ?>



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    </head>

    <body>
    <p>UPDATE User</p>
    <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction?>">
      <table border="1" align="center">
        <tr>
          <td>user_email</td>
          <td><input name="user_email" type="text" id="user_email" value="<?php echo $row_member['user_email']; ?>" /></td>
        </tr>
        <tr>
          <td>user_surname</td>
          <td><input name="user_surname" type="text" id="user_surname" value="<?php echo $row_member['user_surname']; ?>" /></td>
        </tr>
        <tr>
          <td>user_firstname</td>
          <td><input name="user_firstname" type="text" id="user_firstname" value="<?php echo $row_member['user_firstname']; ?>" /></td>
        </tr>
        <tr>
          <td>occupation</td>
          <td><select name="occupation" type="text" id="occupation" > 
          <option value="<?php echo $row_member['occupation']; ?>"selected="selected"><?php echo $row_member['occupation']; ?></option> 
          <option value="Doctor">Doctor</option> 
          <option value="Nurse">Nurse</option> 
          <option value="Other health professional">Other health professional</option> 
          <option value="Other">Other</option></select></td>
        </tr>
        <tr>
          <td>Country</td>
          <td><select name="Country" type="text" id="Country">
          <option value="<?php echo $row_member['Country']; ?>" selected="selected"><?php echo $row_member['Country']; ?></option>
          <option value="Afghanistan" data-alternative-spellings="AF افغانستان">Afghanistan</option>
          <option value="Åland Islands" data-alternative-spellings="AX Aaland Aland" data-relevancy-booster="0.5">Åland Islands</option>
          <option value="Albania" data-alternative-spellings="AL">Albania</option>
          <option value="Algeria" data-alternative-spellings="DZ الجزائر">Algeria</option>
          <option value="American Samoa" data-alternative-spellings="AS" data-relevancy-booster="0.5">American Samoa</option>
          <option value="Andorra" data-alternative-spellings="AD" data-relevancy-booster="0.5">Andorra</option>
          <option value="Angola" data-alternative-spellings="AO">Angola</option>
          <option value="Anguilla" data-alternative-spellings="AI" data-relevancy-booster="0.5">Anguilla</option>
          <option value="Antarctica" data-alternative-spellings="AQ" data-relevancy-booster="0.5">Antarctica</option>
          <option value="Antigua And Barbuda" data-alternative-spellings="AG" data-relevancy-booster="0.5">Antigua And Barbuda</option>
          <option value="Argentina" data-alternative-spellings="AR">Argentina</option>
          <option value="Armenia" data-alternative-spellings="AM Հայաստան">Armenia</option>
          <option value="Aruba" data-alternative-spellings="AW" data-relevancy-booster="0.5">Aruba</option>
          <option value="Australia" data-alternative-spellings="AU" data-relevancy-booster="1.5">Australia</option>
          <option value="Austria" data-alternative-spellings="AT Österreich Osterreich Oesterreich ">Austria</option>
          <option value="Azerbaijan" data-alternative-spellings="AZ">Azerbaijan</option>
          <option value="Bahamas" data-alternative-spellings="BS">Bahamas</option>
          <option value="Bahrain" data-alternative-spellings="BH البحرين">Bahrain</option>
          <option value="Bangladesh" data-alternative-spellings="BD বাংলাদেশ" data-relevancy-booster="2">Bangladesh</option>
          <option value="Barbados" data-alternative-spellings="BB">Barbados</option>
          <option value="Belarus" data-alternative-spellings="BY Беларусь">Belarus</option>
          <option value="Belgium" data-alternative-spellings="BE België Belgie Belgien Belgique" data-relevancy-booster="1.5">Belgium</option>
          <option value="Belize" data-alternative-spellings="BZ">Belize</option>
          <option value="Benin" data-alternative-spellings="BJ">Benin</option>
          <option value="Bermuda" data-alternative-spellings="BM" data-relevancy-booster="0.5">Bermuda</option>
          <option value="Bhutan" data-alternative-spellings="BT भूटान">Bhutan</option>
          <option value="Bolivia" data-alternative-spellings="BO">Bolivia</option>
          <option value="Bonaire, Sint Eustatius and Saba" data-alternative-spellings="BQ">Bonaire, Sint Eustatius and Saba</option>
          <option value="Bosnia and Herzegovina" data-alternative-spellings="BA Босна и Херцеговина">Bosnia and Herzegovina</option>
          <option value="Botswana" data-alternative-spellings="BW">Botswana</option>
          <option value="Bouvet Island" data-alternative-spellings="BV">Bouvet Island</option>
          <option value="Brazil" data-alternative-spellings="BR Brasil" data-relevancy-booster="2">Brazil</option>
          <option value="British Indian Ocean Territory" data-alternative-spellings="IO">British Indian Ocean Territory</option>
          <option value="Brunei Darussalam" data-alternative-spellings="BN">Brunei Darussalam</option>
          <option value="Bulgaria" data-alternative-spellings="BG България">Bulgaria</option>
          <option value="Burkina Faso" data-alternative-spellings="BF">Burkina Faso</option>
          <option value="Burundi" data-alternative-spellings="BI">Burundi</option>
          <option value="Cambodia" data-alternative-spellings="KH កម្ពុជា">Cambodia</option>
          <option value="Cameroon" data-alternative-spellings="CM">Cameroon</option>
          <option value="Canada" data-alternative-spellings="CA" data-relevancy-booster="2">Canada</option>
          <option value="Cape Verde" data-alternative-spellings="CV Cabo">Cape Verde</option>
          <option value="Cayman Islands" data-alternative-spellings="KY" data-relevancy-booster="0.5">Cayman Islands</option>
          <option value="Central African Republic" data-alternative-spellings="CF">Central African Republic</option>
          <option value="Chad" data-alternative-spellings="TD تشاد‎ Tchad">Chad</option>
          <option value="Chile" data-alternative-spellings="CL">Chile</option>
          <option value="China" data-relevancy-booster="3.5" data-alternative-spellings="CN Zhongguo Zhonghua Peoples Republic 中国/中华">China</option>
          <option value="Christmas Island" data-alternative-spellings="CX" data-relevancy-booster="0.5">Christmas Island</option>
          <option value="Cocos (Keeling) Islands" data-alternative-spellings="CC" data-relevancy-booster="0.5">Cocos (Keeling) Islands</option>
          <option value="Colombia" data-alternative-spellings="CO">Colombia</option>
          <option value="Comoros" data-alternative-spellings="KM جزر القمر">Comoros</option>
          <option value="Congo" data-alternative-spellings="CG">Congo</option>
          <option value="Congo, the Democratic Republic of the" data-alternative-spellings="CD Congo-Brazzaville Repubilika ya Kongo">Congo, the Democratic Republic of the</option>
          <option value="Cook Islands" data-alternative-spellings="CK" data-relevancy-booster="0.5">Cook Islands</option>
          <option value="Costa Rica" data-alternative-spellings="CR">Costa Rica</option>
          <option value="Côte d'Ivoire" data-alternative-spellings="CI Cote dIvoire">Côte d'Ivoire</option>
          <option value="Croatia" data-alternative-spellings="HR Hrvatska">Croatia</option>
          <option value="Cuba" data-alternative-spellings="CU">Cuba</option>
          <option value="Curaçao" data-alternative-spellings="CW Curacao">Curaçao</option>
          <option value="Cyprus" data-alternative-spellings="CY Κύπρος Kýpros Kıbrıs">Cyprus</option>
          <option value="Czech Republic" data-alternative-spellings="CZ Česká Ceska">Czech Republic</option>
          <option value="Denmark" data-alternative-spellings="DK Danmark" data-relevancy-booster="1.5">Denmark</option>
          <option value="Djibouti" data-alternative-spellings="DJ جيبوتي‎ Jabuuti Gabuuti">Djibouti</option>
          <option value="Dominica" data-alternative-spellings="DM Dominique" data-relevancy-booster="0.5">Dominica</option>
          <option value="Dominican Republic" data-alternative-spellings="DO">Dominican Republic</option>
          <option value="Ecuador" data-alternative-spellings="EC">Ecuador</option>
          <option value="Egypt" data-alternative-spellings="EG" data-relevancy-booster="1.5">Egypt</option>
          <option value="El Salvador" data-alternative-spellings="SV">El Salvador</option>
          <option value="Equatorial Guinea" data-alternative-spellings="GQ">Equatorial Guinea</option>
          <option value="Eritrea" data-alternative-spellings="ER إرتريا ኤርትራ">Eritrea</option>
          <option value="Estonia" data-alternative-spellings="EE Eesti">Estonia</option>
          <option value="Ethiopia" data-alternative-spellings="ET ኢትዮጵያ">Ethiopia</option>
          <option value="Falkland Islands (Malvinas)" data-alternative-spellings="FK" data-relevancy-booster="0.5">Falkland Islands (Malvinas)</option>
          <option value="Faroe Islands" data-alternative-spellings="FO Føroyar Færøerne" data-relevancy-booster="0.5">Faroe Islands</option>
          <option value="Fiji" data-alternative-spellings="FJ Viti फ़िजी">Fiji</option>
          <option value="Finland" data-alternative-spellings="FI Suomi">Finland</option>
          <option value="France" data-alternative-spellings="FR République française" data-relevancy-booster="2.5">France</option>
          <option value="French Guiana" data-alternative-spellings="GF">French Guiana</option>
          <option value="French Polynesia" data-alternative-spellings="PF Polynésie française">French Polynesia</option>
          <option value="French Southern Territories" data-alternative-spellings="TF">French Southern Territories</option>
          <option value="Gabon" data-alternative-spellings="GA République Gabonaise">Gabon</option>
          <option value="Gambia" data-alternative-spellings="GM">Gambia</option>
          <option value="Georgia" data-alternative-spellings="GE საქართველო">Georgia</option>
          <option value="Germany" data-alternative-spellings="DE Bundesrepublik Deutschland" data-relevancy-booster="3">Germany</option>
          <option value="Ghana" data-alternative-spellings="GH">Ghana</option>
          <option value="Gibraltar" data-alternative-spellings="GI" data-relevancy-booster="0.5">Gibraltar</option>
          <option value="Greece" data-alternative-spellings="GR Ελλάδα" data-relevancy-booster="1.5">Greece</option>
          <option value="Greenland" data-alternative-spellings="GL grønland" data-relevancy-booster="0.5">Greenland</option>
          <option value="Grenada" data-alternative-spellings="GD">Grenada</option>
          <option value="Guadeloupe" data-alternative-spellings="GP">Guadeloupe</option>
          <option value="Guam" data-alternative-spellings="GU">Guam</option>
          <option value="Guatemala" data-alternative-spellings="GT">Guatemala</option>
          <option value="Guernsey" data-alternative-spellings="GG" data-relevancy-booster="0.5">Guernsey</option>
          <option value="Guinea" data-alternative-spellings="GN">Guinea</option>
          <option value="Guinea-Bissau" data-alternative-spellings="GW">Guinea-Bissau</option>
          <option value="Guyana" data-alternative-spellings="GY">Guyana</option>
          <option value="Haiti" data-alternative-spellings="HT">Haiti</option>
          <option value="Heard Island and McDonald Islands" data-alternative-spellings="HM">Heard Island and McDonald Islands</option>
          <option value="Holy See (Vatican City State)" data-alternative-spellings="VA" data-relevancy-booster="0.5">Holy See (Vatican City State)</option>
          <option value="Honduras" data-alternative-spellings="HN">Honduras</option>
          <option value="Hong Kong" data-alternative-spellings="HK 香港">Hong Kong</option>
          <option value="Hungary" data-alternative-spellings="HU Magyarország">Hungary</option>
          <option value="Iceland" data-alternative-spellings="IS Island">Iceland</option>
          <option value="India" data-alternative-spellings="IN भारत गणराज्य Hindustan" data-relevancy-booster="3">India</option>
          <option value="Indonesia" data-alternative-spellings="ID" data-relevancy-booster="2">Indonesia</option>
          <option value="Iran, Islamic Republic of" data-alternative-spellings="IR ایران">Iran, Islamic Republic of</option>
          <option value="Iraq" data-alternative-spellings="IQ العراق‎">Iraq</option>
          <option value="Ireland" data-alternative-spellings="IE Éire" data-relevancy-booster="1.2">Ireland</option>
          <option value="Isle of Man" data-alternative-spellings="IM" data-relevancy-booster="0.5">Isle of Man</option>
          <option value="Israel" data-alternative-spellings="IL إسرائيل ישראל">Israel</option>
          <option value="Italy" data-alternative-spellings="IT Italia" data-relevancy-booster="2">Italy</option>
          <option value="Jamaica" data-alternative-spellings="JM">Jamaica</option>
          <option value="Japan" data-alternative-spellings="JP Nippon Nihon 日本" data-relevancy-booster="2.5">Japan</option>
          <option value="Jersey" data-alternative-spellings="JE" data-relevancy-booster="0.5">Jersey</option>
          <option value="Jordan" data-alternative-spellings="JO الأردن">Jordan</option>
          <option value="Kazakhstan" data-alternative-spellings="KZ Қазақстан Казахстан">Kazakhstan</option>
          <option value="Kenya" data-alternative-spellings="KE">Kenya</option>
          <option value="Kiribati" data-alternative-spellings="KI">Kiribati</option>
          <option value="Korea, Democratic People's Republic of" data-alternative-spellings="KP North Korea">Korea, Democratic People's Republic of</option>
          <option value="Korea, Republic of" data-alternative-spellings="KR South Korea" data-relevancy-booster="1.5">Korea, Republic of</option>
          <option value="Kuwait" data-alternative-spellings="KW الكويت">Kuwait</option>
          <option value="Kyrgyzstan" data-alternative-spellings="KG Кыргызстан">Kyrgyzstan</option>
          <option value="Lao People's Democratic Republic" data-alternative-spellings="LA">Lao People's Democratic Republic</option>
          <option value="Latvia" data-alternative-spellings="LV Latvija">Latvia</option>
          <option value="Lebanon" data-alternative-spellings="LB لبنان">Lebanon</option>
          <option value="Lesotho" data-alternative-spellings="LS">Lesotho</option>
          <option value="Liberia" data-alternative-spellings="LR">Liberia</option>
          <option value="Libyan Arab Jamahiriya" data-alternative-spellings="LY ليبيا">Libyan Arab Jamahiriya</option>
          <option value="Liechtenstein" data-alternative-spellings="LI">Liechtenstein</option>
          <option value="Lithuania" data-alternative-spellings="LT Lietuva">Lithuania</option>
          <option value="Luxembourg" data-alternative-spellings="LU">Luxembourg</option>
          <option value="Macao" data-alternative-spellings="MO">Macao</option>
          <option value="Macedonia, The Former Yugoslav Republic Of" data-alternative-spellings="MK Македонија">Macedonia, The Former Yugoslav Republic Of</option>
          <option value="Madagascar" data-alternative-spellings="MG Madagasikara">Madagascar</option>
          <option value="Malawi" data-alternative-spellings="MW">Malawi</option>
          <option value="Malaysia" data-alternative-spellings="MY">Malaysia</option>
          <option value="Maldives" data-alternative-spellings="MV">Maldives</option>
          <option value="Mali" data-alternative-spellings="ML">Mali</option>
          <option value="Malta" data-alternative-spellings="MT">Malta</option>
          <option value="Marshall Islands" data-alternative-spellings="MH" data-relevancy-booster="0.5">Marshall Islands</option>
          <option value="Martinique" data-alternative-spellings="MQ">Martinique</option>
          <option value="Mauritania" data-alternative-spellings="MR الموريتانية">Mauritania</option>
          <option value="Mauritius" data-alternative-spellings="MU">Mauritius</option>
          <option value="Mayotte" data-alternative-spellings="YT">Mayotte</option>
          <option value="Mexico" data-alternative-spellings="MX Mexicanos" data-relevancy-booster="1.5">Mexico</option>
          <option value="Micronesia, Federated States of" data-alternative-spellings="FM">Micronesia, Federated States of</option>
          <option value="Moldova, Republic of" data-alternative-spellings="MD">Moldova, Republic of</option>
          <option value="Monaco" data-alternative-spellings="MC">Monaco</option>
          <option value="Mongolia" data-alternative-spellings="MN Mongγol ulus Монгол улс">Mongolia</option>
          <option value="Montenegro" data-alternative-spellings="ME">Montenegro</option>
          <option value="Montserrat" data-alternative-spellings="MS" data-relevancy-booster="0.5">Montserrat</option>
          <option value="Morocco" data-alternative-spellings="MA المغرب">Morocco</option>
          <option value="Mozambique" data-alternative-spellings="MZ Moçambique">Mozambique</option>
          <option value="Myanmar" data-alternative-spellings="MM">Myanmar</option>
          <option value="Namibia" data-alternative-spellings="NA Namibië">Namibia</option>
          <option value="Nauru" data-alternative-spellings="NR Naoero" data-relevancy-booster="0.5">Nauru</option>
          <option value="Nepal" data-alternative-spellings="NP नेपाल">Nepal</option>
          <option value="Netherlands" data-alternative-spellings="NL Holland Nederland" data-relevancy-booster="1.5">Netherlands</option>
          <option value="New Caledonia" data-alternative-spellings="NC" data-relevancy-booster="0.5">New Caledonia</option>
          <option value="New Zealand" data-alternative-spellings="NZ Aotearoa">New Zealand</option>
          <option value="Nicaragua" data-alternative-spellings="NI">Nicaragua</option>
          <option value="Niger" data-alternative-spellings="NE Nijar">Niger</option>
          <option value="Nigeria" data-alternative-spellings="NG Nijeriya Naíjíríà" data-relevancy-booster="1.5">Nigeria</option>
          <option value="Niue" data-alternative-spellings="NU" data-relevancy-booster="0.5">Niue</option>
          <option value="Norfolk Island" data-alternative-spellings="NF" data-relevancy-booster="0.5">Norfolk Island</option>
          <option value="Northern Mariana Islands" data-alternative-spellings="MP" data-relevancy-booster="0.5">Northern Mariana Islands</option>
          <option value="Norway" data-alternative-spellings="NO Norge Noreg" data-relevancy-booster="1.5">Norway</option>
          <option value="Oman" data-alternative-spellings="OM عمان">Oman</option>
          <option value="Pakistan" data-alternative-spellings="PK پاکستان" data-relevancy-booster="2">Pakistan</option>
          <option value="Palau" data-alternative-spellings="PW" data-relevancy-booster="0.5">Palau</option>
          <option value="Palestinian Territory, Occupied" data-alternative-spellings="PS فلسطين">Palestinian Territory, Occupied</option>
          <option value="Panama" data-alternative-spellings="PA">Panama</option>
          <option value="Papua New Guinea" data-alternative-spellings="PG">Papua New Guinea</option>
          <option value="Paraguay" data-alternative-spellings="PY">Paraguay</option>
          <option value="Peru" data-alternative-spellings="PE">Peru</option>
          <option value="Philippines" data-alternative-spellings="PH Pilipinas" data-relevancy-booster="1.5">Philippines</option>
          <option value="Pitcairn" data-alternative-spellings="PN" data-relevancy-booster="0.5">Pitcairn</option>
          <option value="Poland" data-alternative-spellings="PL Polska" data-relevancy-booster="1.25">Poland</option>
          <option value="Portugal" data-alternative-spellings="PT Portuguesa" data-relevancy-booster="1.5">Portugal</option>
          <option value="Puerto Rico" data-alternative-spellings="PR">Puerto Rico</option>
          <option value="Qatar" data-alternative-spellings="QA قطر">Qatar</option>
          <option value="Réunion" data-alternative-spellings="RE Reunion">Réunion</option>
          <option value="Romania" data-alternative-spellings="RO Rumania Roumania România">Romania</option>
          <option value="Russian Federation" data-alternative-spellings="RU Rossiya Российская Россия" data-relevancy-booster="2.5">Russian Federation</option>
          <option value="Rwanda" data-alternative-spellings="RW">Rwanda</option>
          <option value="Saint Barthélemy" data-alternative-spellings="BL St. Barthelemy">Saint Barthélemy</option>
          <option value="Saint Helena" data-alternative-spellings="SH St.">Saint Helena</option>
          <option value="Saint Kitts and Nevis" data-alternative-spellings="KN St.">Saint Kitts and Nevis</option>
          <option value="Saint Lucia" data-alternative-spellings="LC St.">Saint Lucia</option>
          <option value="Saint Martin (French Part)" data-alternative-spellings="MF St.">Saint Martin (French Part)</option>
          <option value="Saint Pierre and Miquelon" data-alternative-spellings="PM St.">Saint Pierre and Miquelon</option>
          <option value="Saint Vincent and the Grenadines" data-alternative-spellings="VC St.">Saint Vincent and the Grenadines</option>
          <option value="Samoa" data-alternative-spellings="WS">Samoa</option>
          <option value="San Marino" data-alternative-spellings="SM">San Marino</option>
          <option value="Sao Tome and Principe" data-alternative-spellings="ST">Sao Tome and Principe</option>
          <option value="Saudi Arabia" data-alternative-spellings="SA السعودية">Saudi Arabia</option>
          <option value="Senegal" data-alternative-spellings="SN Sénégal">Senegal</option>
          <option value="Serbia" data-alternative-spellings="RS Србија Srbija">Serbia</option>
          <option value="Seychelles" data-alternative-spellings="SC" data-relevancy-booster="0.5">Seychelles</option>
          <option value="Sierra Leone" data-alternative-spellings="SL">Sierra Leone</option>
          <option value="Singapore" data-alternative-spellings="SG Singapura  சிங்கப்பூர் குடியரசு 新加坡共和国">Singapore</option>
          <option value="Sint Maarten (Dutch Part)" data-alternative-spellings="SX">Sint Maarten (Dutch Part)</option>
          <option value="Slovakia" data-alternative-spellings="SK Slovenská Slovensko">Slovakia</option>
          <option value="Slovenia" data-alternative-spellings="SI Slovenija">Slovenia</option>
          <option value="Solomon Islands" data-alternative-spellings="SB">Solomon Islands</option>
          <option value="Somalia" data-alternative-spellings="SO الصومال">Somalia</option>
          <option value="South Africa" data-alternative-spellings="ZA RSA Suid-Afrika">South Africa</option>
          <option value="South Georgia and the South Sandwich Islands" data-alternative-spellings="GS">South Georgia and the South Sandwich Islands</option>
          <option value="South Sudan" data-alternative-spellings="SS">South Sudan</option>
          <option value="Spain" data-alternative-spellings="ES España" data-relevancy-booster="2">Spain</option>
          <option value="Sri Lanka" data-alternative-spellings="LK ශ්*රී ලංකා இலங்கை Ceylon">Sri Lanka</option>
          <option value="Sudan" data-alternative-spellings="SD السودان">Sudan</option>
          <option value="Suriname" data-alternative-spellings="SR शर्नम् Sarnam Sranangron">Suriname</option>
          <option value="Svalbard and Jan Mayen" data-alternative-spellings="SJ" data-relevancy-booster="0.5">Svalbard and Jan Mayen</option>
          <option value="Swaziland" data-alternative-spellings="SZ weSwatini Swatini Ngwane">Swaziland</option>
          <option value="Sweden" data-alternative-spellings="SE Sverige" data-relevancy-booster="1.5">Sweden</option>
          <option value="Switzerland" data-alternative-spellings="CH Swiss Confederation Schweiz Suisse Svizzera Svizra" data-relevancy-booster="1.5">Switzerland</option>
          <option value="Syrian Arab Republic" data-alternative-spellings="SY Syria سورية">Syrian Arab Republic</option>
          <option value="Taiwan, Province of China" data-alternative-spellings="TW 台灣 臺灣">Taiwan, Province of China</option>
          <option value="Tajikistan" data-alternative-spellings="TJ Тоҷикистон Toçikiston">Tajikistan</option>
          <option value="Tanzania, United Republic of" data-alternative-spellings="TZ">Tanzania, United Republic of</option>
          <option value="Thailand" data-alternative-spellings="TH ประเทศไทย Prathet Thai">Thailand</option>
          <option value="Timor-Leste" data-alternative-spellings="TL">Timor-Leste</option>
          <option value="Togo" data-alternative-spellings="TG Togolese">Togo</option>
          <option value="Tokelau" data-alternative-spellings="TK" data-relevancy-booster="0.5">Tokelau</option>
          <option value="Tonga" data-alternative-spellings="TO">Tonga</option>
          <option value="Trinidad and Tobago" data-alternative-spellings="TT">Trinidad and Tobago</option>
          <option value="Tunisia" data-alternative-spellings="TN تونس">Tunisia</option>
          <option value="Turkey" data-alternative-spellings="TR Türkiye Turkiye">Turkey</option>
          <option value="Turkmenistan" data-alternative-spellings="TM Türkmenistan">Turkmenistan</option>
          <option value="Turks and Caicos Islands" data-alternative-spellings="TC" data-relevancy-booster="0.5">Turks and Caicos Islands</option>
          <option value="Tuvalu" data-alternative-spellings="TV" data-relevancy-booster="0.5">Tuvalu</option>
          <option value="Uganda" data-alternative-spellings="UG">Uganda</option>
          <option value="Ukraine" data-alternative-spellings="UA Ukrayina Україна">Ukraine</option>
          <option value="United Arab Emirates" data-alternative-spellings="AE UAE الإمارات">United Arab Emirates</option>
          <option value="United Kingdom" data-alternative-spellings="GB Great Britain England UK Wales Scotland Northern Ireland" data-relevancy-booster="2.5">United Kingdom</option>
          <option value="United States" data-relevancy-booster="3.5" data-alternative-spellings="US USA United States of America">United States</option>
          <option value="United States Minor Outlying Islands" data-alternative-spellings="UM">United States Minor Outlying Islands</option>
          <option value="Uruguay" data-alternative-spellings="UY">Uruguay</option>
          <option value="Uzbekistan" data-alternative-spellings="UZ Ўзбекистон O'zbekstan O'zbekiston">Uzbekistan</option>
          <option value="Vanuatu" data-alternative-spellings="VU">Vanuatu</option>
          <option value="Venezuela" data-alternative-spellings="VE">Venezuela</option>
          <option value="Vietnam" data-alternative-spellings="VN Việt Nam" data-relevancy-booster="1.5">Vietnam</option>
          <option value="Virgin Islands, British" data-alternative-spellings="VG" data-relevancy-booster="0.5">Virgin Islands, British</option>
          <option value="Virgin Islands, U.S." data-alternative-spellings="VI" data-relevancy-booster="0.5">Virgin Islands, U.S.</option>
          <option value="Wallis and Futuna" data-alternative-spellings="WF" data-relevancy-booster="0.5">Wallis and Futuna</option>
          <option value="Western Sahara" data-alternative-spellings="EH لصحراء الغربية">Western Sahara</option>
          <option value="Yemen" data-alternative-spellings="YE اليمن">Yemen</option>
          <option value="Zambia" data-alternative-spellings="ZM">Zambia</option>
          <option value="Zimbabwe" data-alternative-spellings="ZW">Zimbabwe</option>
        </select>
          </td>
        </tr>
        <tr>
          <td colspan="2">CLICK TO UPDATE
            <input type="submit" name="updateuser" id="updateuser" value="UPDATE" /></td>
        </tr>
      </table>
      <input type="hidden" name="MM_update" value="form1" />
    </form>
    <p>&nbsp;</p>
    </body>
    </html>
    <?php
    mysql_free_result
    ($member);
    ?>
    .........................................................................................................................................
    I've included the html from the page too
    Last edited by cpradio; Sep 10, 2013 at 02:58.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •