close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

insert with capitals but displays lowercase in database

Thread began 2/24/2010 11:43 am by mr hankey | Last modified 3/29/2010 10:29 am by mr hankey | 1550 views | 6 replies |

mr hankey

insert with capitals but displays lowercase in database

hi,

i add a css rule to my data assist insert page to makte it capitals when the user types in a name or post code etc.

it displays on my page as uppercase but when i click insert and look into database or the details page it is lower case.

here is my css code:

input.cap{text-transform: capitalize;}
input.upcase{text-transform: uppercase;}

and on my form input:

<td>First Name:</td>
<td ><input type="text" class="cap" name="UserFirstName" id="UserFirstName" value="" size="32" /></td>

can anyone shed some light on why this is happening, is it something in data assist over riding or is this css code no good?

appreciate this as i want the form to make it uppercase letters for names as looks better on results and details page.

many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

css will only change how the browser displays the text, it does not actually change the true state of the text.


think in terms of a fun house mirror, it will make you look short and squat or tall and thin, but that doesn't mean that you _become_ short and squat or tall and thin.

The css is displaying the text as capitol, but in reality, it is still lowercase.


To physically change the case of the text, you could use the PHP strtoupper function to convert the string to upper case:
<?php echo(strtoupper("this is a lower case string")); ?>

Sign in to reply to this post

mr hankey

hi jason thanks so how would i use this exactly?

where would i add this code and i would want it for my form input field for post code to go to all capitals and names to upper first letter.

thanks again mate appreciate it

Sign in to reply to this post

Jason ByrnesWebAssist

in reality, you shouldn't really worry about how it is stored in the database.

use CSS to change how it displays in the browser.

I was just illustrating for you how to physically change the text, but CSS will do what you want to accomplish without having to muck about with the php code.

Sign in to reply to this post

mr hankey

ok thanks jason, would i just add the same class code to display it with upper case letters on my details page? as at moment it shows as lower case from the db.

thanks again jason.

Sign in to reply to this post

Jason ByrnesWebAssist

no you would need to create a new class since the one from your previous example is for a text box.

Sign in to reply to this post

mr hankey

thanks jason, i noticed in dreamweaver you can in the bindings format it to upper or caps.

thanks for your help

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...