Jump to content

Recommended Posts

Maybe not a php question but here goes;

 

I have a form field set up where you can edit your user information such as

Name, Address, Email etc

 

But the text is aligned to the right in the field and half of it goes beyond the right edge of the field so it looks as though half of the info is missing.

 

HAs anyone come across it before

 

Heres the code

<p class="grid_2">Name: </p><p class="left"><input class="left" type="text" name="name" maxlength="50" value="
                        <?php
                        if($form->value("name") == ""){
                                echo $session->userinfo['name'];
                        }else{
                                echo $form->value("name");
                        }
                        ?>"><?php echo $form->error("name"); ?></p>

 

Link to comment
https://forums.phpfreaks.com/topic/189238-weird-alignment-of-form-data/
Share on other sites

I think I know why this is happening and it isn't the CSS.

 

When I look at the form field in Code view in Dreamweaver I can see the following line of code the form field;

<?php if($form->value("name") == ""){echo 

 

If you look in the code I submitted in the post below you will see it is part of the php function but it is causing the VALUE of the variable to be pushed over to the right to accommodate the code that you don't actually see in the field when the page is uploaded.

 

Does anyone know how to sort this out im racking my brains.  :confused: :'( ;)

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.