diff --git a/css/edit-prefered-location.css b/css/edit-prefered-location.css
index 2b33f6f4f631c4a6f7f29dfdfcff5ff0d0aa9bb0..7884ac9040225b3d68f76d319be398c5703517c5 100644
--- a/css/edit-prefered-location.css
+++ b/css/edit-prefered-location.css
@@ -36,7 +36,7 @@ table, th, td, tr{
 	width: 20%;
 }
 
-#locationinput{
+.locationinput{
 	 display: none;
 	 width: 100%;
 	 height: 100%;
diff --git a/js/edit-prefered-location.js b/js/edit-prefered-location.js
index 4fe430b1396a497fcf8abe3f78f3cfc49fb4643b..5338cebd365d5ca80917cf2c9524b53ad7d1f21a 100644
--- a/js/edit-prefered-location.js
+++ b/js/edit-prefered-location.js
@@ -1,9 +1,9 @@
-var textHidden = false;
-function hideMe(){
+function hideMe(i){
+	var textHidden = false;
 	textHidden = !textHidden;
-	var textBox = document.getElementById("locationtext");
-	var inputBox = document.getElementById("locationinput");
-	var image = document.getElementById("imageeditsave");
+	var textBox = document.getElementById("locationtext"+i);
+	var inputBox = document.getElementById("locationinput"+i);
+	var image = document.getElementById("imageeditsave"+i);
 	
 	if(textHidden){
 		textBox.setAttribute("style","display:none");
@@ -17,5 +17,4 @@ function hideMe(){
 		textBox.innerHTML = inputBox.value;
 		image.src = "../img/pencil.png";
 	}
-
 }
\ No newline at end of file
diff --git a/view/edit-prefered-locations.php b/view/edit-prefered-locations.php
index 0dbd655909bafa8e9814438b9b48f587b022fbd0..891b182b21f5e22f82717a60a65974cbf345f2a9 100644
--- a/view/edit-prefered-locations.php
+++ b/view/edit-prefered-locations.php
@@ -7,7 +7,7 @@
 	</head>
 	<body>
 		<div class = "container">
-			<h1>EDIT PREFERED LOCATION</h1>
+			<h1>EDIT PREFERED LOCATIONS</h1>
 			<?php
 				include "../model/user.php";
 				$user = new User;
@@ -28,19 +28,19 @@
 							<tr>
 								<td class="tabno">'.$i.'</td>
 								<td class="tabloc">
-									<div  id="locationtext">'.$row["location"].'</div>
-									<input id="locationinput" type="text">
+									<div  id="locationtext'.$i.'">'.$row["location"].'</div>
+									<input class="locationinput" id="locationinput'.$i.'" type="text">
 								</td>
 								<td class="tabact">
 									<div class="addset" align="center">
 										<div class="editsavebox">
-											<button onClick=hideMe() class="editsave">
-												<img src="../img/pencil.png" class="editsavebutton" id="imageeditsave">
+											<button onClick=hideMe('.$i.') class="editsave">
+												<img src="../img/pencil.png" class="editsavebutton" id="imageeditsave'.$i.'">
 											</button>
 										</div>
 										<div>
 											<button onClick=f() class="delete">
-												<img src="../img/delete.png" class="deletebutton">
+												<img src="../img/delete.png" class="deletebutton" id="imagedelete'.$i.'">
 											</button>
 										</div>
 									</div>