Results 1 to 4 of 4

Thread: Strange text allignment in update form...

  1. #1
    Join Date
    Mar 2008
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Strange text allignment in update form...

    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

  2. #2
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    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.
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  3. #3
    Join Date
    Mar 2008
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    Thank you for your reply.

    I use the following code:


    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

  4. #4
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Can you explain this part:

    Code:
    </td>	><br></td>
    Why is there a space and an end arrow? And why do you close the <td> twice?
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •