Skip to content

Commit

Permalink
form-control
Browse files Browse the repository at this point in the history
form-control for update and welcome
  • Loading branch information
ben813 committed Mar 13, 2017
1 parent 65dc28a commit a007aa0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 48 deletions.
77 changes: 34 additions & 43 deletions user_profile_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

?>
<html>

<head>
<title>User Update</title>
<?php require_once('head.php');?>
Expand All @@ -33,51 +32,43 @@
<script>
$("#profile_header").addClass("active");
</script>
<h1>User Update</h1>
<div class="container">
<div class="col-md-4">
<h3>User Update</h3>
<?php
echo '<h2>'.$_GET['user_id'];
echo '<h4>'.$_GET['user_id'].'</h4>';
?>
<form name="frmRegistration" method="post" action="">
<table border="0" width="500" class="demo-table">

<div><?php if(isset($message)) echo $message; ?></div>

<tr><td>Email Address</td>
<td><input type="text" class="demoInputBox" name="email_address" value="<?php echo $user_profile['email_address']; ?>"></td>
</tr>
<tr><td>Name</td>
<td><input type="text" class="demoInputBox" name="name" value="<?php echo $user_profile['name']; ?>"></td>
</tr>
<tr><td>Password</td>
<td><input type="password" class="demoInputBox" name="password" value=""></td>
</tr>
<tr><td>Confirm Password</td>
<td><input type="password" class="demoInputBox" name="confirm_password" value=""></td>
</tr>
<tr><td>Age</td>
<td><input type="number" class="demoInputBox" name="age" value="<?php echo $user_profile['age']; ?>"></td>
</tr>
<tr><td>Country</td>
<td><input type="text" class="demoInputBox" name="country" value="<?php echo $user_profile['country'];?>"></td>
</tr>
<tr><td>City</td>
<td><input type="text" class="demoInputBox" name="city" value="<?php echo $user_profile['city']; ?>"></td>
</tr>
<tr><td>Introduction</td>
<td><textarea name="introduction" rows="5" cols="50" value="<?php echo $user_profile['self_introduction']; ?>"><?php echo $user_profile['self_introduction']; ?></textarea></td>
</tr>
<tr><td>Privacy Setting</td>
<td><select name="privacy">
<option value="public">Public</option>
<option value="friends_only">Friends Only</option>
<option value="private">Private</option>
</select>
</td>
</tr>
</table>
<div><input type="submit" name="submit" value="Update"></div>
<form name="frmRegistration" method="post" action="" role = "form">
<div><?php if(isset($message)) echo "<div class=\"alert alert-danger\">".$message."</div>"; ?></div>
<label>Email Address</label>
<input type="text" class="form-control" name="email_address" value="<?php echo $user_profile['email_address']; ?>">
<label>Name</label>
<input type="text" class="form-control" name="name" value="<?php echo $user_profile['name']; ?>">
<label>Password</label>
<input type="password" class="form-control" name="password" value="">
<label>Confirm Password</label>
<input type="password" class="form-control" name="confirm_password" value="">
<label>Age</label>
<input type="number" class="form-control" name="age" value="<?php echo $user_profile['age']; ?>">
<label>Country</label>
<input type="text" class="form-control" name="country" value="<?php echo $user_profile['country'];?>">
<label>City</label>
<input type="text" class="form-control" name="city" value="<?php echo $user_profile['city']; ?>">
<label>Introduction</label>
<textarea name="introduction" class="form-control" rows="5" cols="50" value="<?php echo $user_profile['self_introduction']; ?>"><?php echo $user_profile['self_introduction']; ?></textarea>
<label>Privacy Setting</label>
<select name="privacy" class="form-control">
<option value="public">Public</option>
<option value="friends_only">Friends Only</option>
<option value="private">Private</option>
</select>
<br/>
<input type="submit" name="submit" value="Update" class="btn btn-primary">
</form>
<h2 class = "btn btn-info"><a href = "logout.php">Sign Out</a></h2>
<a href = "logout.php" class = "btn btn-primary" role="button">Sign Out</a>
<br/>
</div>
</div>
<?php require_once('common_footer.html');?>
</body>

Expand Down
10 changes: 5 additions & 5 deletions welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@
<script>
$("#profile_header").addClass("active");
</script>
<div class="container">
<div class="container">
<h1>Welcome <?php echo $login_session; ?></h1>
<h2 class = "btn btn-info"> <?php echo "<a href = user_profile_update.php?user_id=". $selfID. ">Edit</a>";?></h2>
<?php echo "<a href = user_profile_update.php?user_id=". $selfID. " class = \"btn btn-info\" role=\"button\" >Edit</a>";?>
<div>
<div class="row">

<div class="col-sm-3">
<img src="image5.png" style="width:70%" alt="Image">
</div></div>
Expand Down Expand Up @@ -58,10 +57,11 @@
</tr>
</table>
</div>
<h2 class = "btn btn-info"><a href = "logout.php">Sign Out</a></h2>
<br/>
<a href = "logout.php" role="button" class = "btn btn-info">Sign Out</a>
<br><br>
<?php require_once('common_footer.html');?>
</div>
<?php require_once('common_footer.html');?>
</body>

</html>

0 comments on commit a007aa0

Please sign in to comment.