SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2001
    Location
    East Harlem, Spanish Harlem, El Barrio
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <?

    if ((!$fname) || (!$lname)) {
    header("Location: http://localhost/show_login.htm");
    exit;
    }
    else {

    session_start();

    }

    if ($valid != "yes") {
    header("Location: http://localhost/show_login.htm");
    exit;

    } else {

    session_register('valid');

    }


    $db_name = "alumni";
    $table_name = "user";

    $connection = mysql_connect("localhost", "jojo", "camp") or die("Couldn't connect.");

    $db = mysql_select_db($db_name, $connection) or die("Couldn't select database.");

    $sql = "UPDATE $table_name
    SET
    fname = '$fname',
    lname = '$lname',
    grad_year = '$grad_year',
    status = '$status',
    location = '$location',
    email = '$email',
    url = '$url',
    comments = '$comments',
    username = '$username',
    password = '$password',
    occupation = '$occupation',
    interests = '$interests',
    registerdate '$registerdate'
    WHERE mbr_id = '$mbr_id'
    ";

    $result = mysql_query($sql, $connection) or die("Couldn't execute query.");

    ?>


    <HTML>
    <HEAD>
    <TITLE>My Contact Management System: Contact Updated</TITLE>
    </HEAD>
    <BODY>

    <h3>Aluni Management System</h3>
    <h2><em>Modify Alumni - Alumni Updated</em></h2>
    <P>The following information was successfully updated in <? echo "$table_name"; ?></p>
    <table cellspacing=3 cellpadding=5>

    <tr>
    <th>NAME & OTHER INFORMATION</th>
    <th>PERSONAL INFORMATION</th>
    </tr>

    <tr>
    <td valign=top>
    <P><STRONG>First Name/STRONG><BR>
    <? echo "$fname"; ?></P>

    <P><STRONG>Last Name/STRONG><BR>
    <? echo "$lname"; ?></P>

    <P><STRONG>Graduation Year/STRONG><BR>
    <? echo "$grad_year"; ?></P>

    <P><STRONG>Status/STRONG><BR>
    <? echo "$status"; ?></P>

    <P><STRONG>Location/STRONG><BR>
    <? echo "$location"; ?></P>

    <P><STRONG>E-mail/STRONG><BR>
    <? echo "$email"; ?></P>

    <P><STRONG>URL/STRONG><BR>
    <? echo "$url"; ?></P>
    </td>

    <td valign=top>
    <P><STRONG>Comments/STRONG><BR>
    <? echo "$comments"; ?></P>

    <P><STRONG>Username/STRONG><BR>
    <? echo "$username"; ?></P>

    <P><STRONG>Password/STRONG><BR>
    <? echo "$password"; ?></P>

    <P><STRONG>Occupation/STRONG><BR>
    <? echo "$occupation"; ?></P>

    <P><STRONG>Interests/STRONG><BR>
    <? echo "$interests"; ?></P>

    <P><STRONG>Registerdate/STRONG><BR>
    <? echo "$registerdate"; ?></P>


    </td>
    </tr>

    <tr>
    <td align=center colspan=2><br>
    <p><a href="alumni_index.php">Return to Main Menu</a></p>

    </TD>
    </TR>
    </TABLE>


    </BODY>
    </HTML>

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is the problem? Is it a syntax error or does it not work the way you'd like it to?

  3. #3
    SitePoint Member
    Join Date
    May 2001
    Location
    East Harlem, Spanish Harlem, El Barrio
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    It does not Update

    It does not actually update the user record.
    Nothing is changed in the database.

    I just checked and it seems that the mbr_id info from the login.php before this
    page is not being posted along with the rest of the info.

    More reading to do, I guess. Thanks.


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
  •