Hey guys, I have a problem here. As you see in this image, every time I echo the id related to the subject ID, the input value text will always align to the center.
How can I make it alignment to left?
I have use text-align: left
in most cases , putting it to div, form, input
.
Nothing works. Any solution for this?
Here's an example of my code:
<input class="form-control" placeholder="Subject ID" name="subId" type="text" style="width: 300px; padding:0px; text-align:left;" value="
<?php
$sql = "SELECT subjectId FROM subjects WHERE id = $id";
$result = $conn->query($sql);
while ($row = $result->fetch_assoc()) {
echo $row['subjectId'];
}?>">
EDITED: Modify Page
As you can see from the Modify Page, when I want to modify a content let's say to modify Subject ID and Subject Name. I pressed Modify and it will href to id=1 and the next page Modify Page 2 will get the id by using GET method.
However, the text input value of the <input>
does not align to the left for user friendly purposes. How can i make it align to the left once I clicked the modify button?
I echoed the value of the id and name inside the input value