Log in

View Full Version : Strange text allignment in update form...



Johan Beijar
03-07-2008, 10:15 AM
Dear all,

I have encountered a strange problem which I need help with.

I have form that let me update a record in the database and it works well except for the fact that the text, or part of the text, is shown in the end of the form-field (right side of the inputfield). I need to use the Delete-button to get the text to the left side of the input form.

The text shown in the form is retrieved via an SQL-statement from the My SQL DB and I use PHP.

Does anyone know why this is the case and what I should do about it. The objective is ofcourse to have it alligned to the left in the input field. I have tried with text allign: left but it doesn't help.

Thank you,

//Johan Beijar

alexjewell
03-07-2008, 01:34 PM
First of all, it's text-align: left;. I don't know if you accidentally left the dash out, but that could cause an issue.

The other thing is, I don't think this is a PHP problem. I'm assuming it's an HTML/CSS problem. Thus, I'll need to see your code before I can adequately answer your question.

Johan Beijar
03-07-2008, 03:36 PM
Hi,

Thank you for your reply.

I use the following code:



<?
$produpd = trim($_GET['productid']);
$produpdarray = mysql_query("SELECT brandid, username, productname, productnumber, producttype, gender, currency, price, recpriceretail, prodpic, mancountry, productdescription FROM products WHERE productid = ".$produpd." ");

$prup = mysql_fetch_array( $produpdarray );

?>
<tr>
<td>Price</td>
<td><input type="text" name="Price" style="text-align: left;" value="
<? echo $prup['price']; ?>"></td> ><br></td>
</tr>

I appriciate any help...

//Johan Beijar

alexjewell
03-08-2008, 02:58 PM
Can you explain this part:


</td> ><br></td>

Why is there a space and an end arrow? And why do you close the <td> twice?