Location: PHPKode > projects > MyTodos > edit-profile.php
<?
###################################################
#Copyright (C) 2002 Lihua Gao (hide@address.com) 
#
#$Id: edit-profile.php,v 1.1 2002/12/05 10:03:33 gaolihua Exp $
#
#This file is part of myTodos.
#
#myTodos is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#myTodos is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with myTodos; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#####################################################
?>
<?
session_start();
require_once("checklogin.php");
require_once("config.php");
include("header.php");
?>

<table cellspacing="0" class="table3">
	<tr class="rowtitle">
		<td><h5>Profile of <?=$_SESSION['firstname']." ".$_SESSION['lastname']?> </h5></td>
	</tr>
	<tr>
    	<td>

         <? 

         $disabled="disabled";
         if (isset($edit)){
            $disabled="";
         }

         $sql = "SELECT * FROM users where usr_email='".$_SESSION['login']."'";
         $result = mysql_query($sql);
         $row = mysql_fetch_array($result, MYSQL_ASSOC);

         ?>

         <FORM  action="edit-profile-action.php" method="POST" name="edit_todo_action" enctype="multipart/form-data" title="TITLE">
         <table>

            <!-- empty line -->
            <TR><TD>&nbsp;</TD></TR>

            <!--TR>
               <TD> usr_id </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?> value="<?echo $row['usr_id']?>" name="usr_id"> </TD>
            </TR-->
            <!--TR>
               <TD> usr_createdate </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?> value="<?echo $row['usr_createdate']?>" name="usr_createdate"> </TD>
            </TR-->
            <!--TR>
               <TD> usr_updatedate </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?> value="<?echo $row['usr_updatedate']?>" name="usr_updatedate"> </TD>
            </TR-->
            <TR>
               <TD> usr_firstname </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_firstname']?>" name="usr_firstname"> </TD>
            </TR>
            <TR>
               <TD> usr_lastname </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_lastname']?>" name="usr_lastname"> </TD>
            </TR>
            <TR>
               <TD> usr_address1 </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_address1']?>" name="usr_address1"> </TD>
            </TR>
            <TR>
               <TD> usr_address2 </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_address2']?>" name="usr_address2"> </TD>
            </TR>
            <TR>
               <TD> usr_address3 </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_address3']?>" name="usr_address3"> </TD>
            </TR>
            <TR>
               <TD> usr_city </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_city']?>" name="usr_city"> </TD>
            </TR>
            <TR>
               <TD> usr_postalcode </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_postalcode']?>" name="usr_postalcode"> </TD>
            </TR>
            <TR>
               <TD> usr_email </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_email']?>" name="usr_email"> </TD>
            </TR>
            <TR>
               <TD> usr_country </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?>  value="<?echo $row['usr_country']?>" name="usr_country"> </TD>
            </TR>
            <!--TR>
               <TD> usr_state </TD>   <TD> <INPUT TYPE="TEXT" <?=$disabled?> value="<?echo $row['usr_state']?>" name="usr_state"> </TD>
            </TR-->
            <!-- empty line -->
            <TR><TD>&nbsp;</TD></TR>

         </table>

         <?
         if (isset($edit)){
         ?>
         <INPUT TYPE="SUBMIT"  name="submit" value="save data">
         <?
         }
         ?>

         </FORM>


      </td>
	</tr>
</table>


<?
include("footer.php");
?>
Return current item: MyTodos