Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Easy Date   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 05-14-2006, 09:42 PM   #1 (permalink)
Inactive
 
Join Date: 05-14-06
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

BBarton is liked by many
Question on creating form

I have a simple form that asks for a persons name and email address to sign up for a newsletter. In my newsletter script, when you want to insert a persons name in a mailing, you use a variable string such as [[FIRSTNAME]].
The problem is that if a person types in their name uncapitalized, thats exactly how the script outputs it. So in some of my mailings it starts like this:
mike, or Dear mike, - very unprofessional. How can I have my form capitalize the name input field before submitting it to my newsletter script regardless of what the user inputs. I have searched all the input attributes to no avail. I suspect it will have to be manipulated with Javascript. Any help will be appreciated.
BBarton is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 05-15-2006, 10:31 AM   #2 (permalink)
Contributing Member
 
exam's Avatar
 
Join Date: 04-20-06
Posts: 333
iTrader: 0 / 0%
Latest Blog:
None

exam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web proexam is a highly respected web pro
If you can use php, try this:
$name = ucfirst($name);
exam is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-15-2006, 10:40 AM   #3 (permalink)
Inactive
 
Mrblogs's Avatar
 
Join Date: 03-29-06
Posts: 548
iTrader: 0 / 0%
Mrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really nice
Send a message via MSN to Mrblogs Send a message via Yahoo to Mrblogs
Are you using PHP?

If so, then Exam's method will work, or using ucwords($name) would, as that would capitalise the first letter of every word (for instance if their first name is hyphenated)
Mrblogs is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-15-2006, 08:07 PM   #4 (permalink)
Inactive
 
Join Date: 05-14-06
Posts: 2
iTrader: 0 / 0%
Latest Blog:
None

BBarton is liked by many
Ok, but how is it implemented?

My server does have php installed. I understand All I have to do is save the web page with the php extension. Here is the code for my form:

<html>
<form action="http://www.automatic-responder.net/cgi-bin/aptires/addforme.cgi" method="post">
<table border="0" cellspacing="3">
<tr><td align="left">
Your Name:</td><td>
<input type="text" name="nametoadd"
size="14">
</td></tr><tr><td align="left">
Your E-mail:</td><td>
<input type="text" name="emailtoadd" size="14"></td></tr>
<center><input type=hidden name=reference value="eauf"><input type=hidden name=onfailure value="http://www.igoldmines.com/ga/"><input type=hidden name=onsuccess value="http://www.igoldmines.com/ga/etypage1.htm"> <tr><td colspan="2" align="center"><p align="center"><input type="submit" value="Subscribe!"></p>
</td></tr>
</table>
<input type="hidden" name="username" value="bbarton">
</form></center>

</html>

How do I implement the code in this form?
Thanks!
BBarton is offline  
Add Post to del.icio.us
Reply With Quote
Old 05-16-2006, 03:08 AM   #5 (permalink)
Inactive
 
Mrblogs's Avatar
 
Join Date: 03-29-06
Posts: 548
iTrader: 0 / 0%
Mrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really niceMrblogs is just really nice
Send a message via MSN to Mrblogs Send a message via Yahoo to Mrblogs
Ahh.. it looks like you want to do the ucwords in the CGI code really then.

The addorme.cgi script is what will require it.

Which is most likely perl, and I'm not too up on Perl script handling.

You could implement the function in Javascript but then it would only work if the user's browser has javascript enabled.
Mrblogs is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form question white10 Coding Forum 2 07-06-2007 11:50 AM
Contact Form and Go To Url Question popstalin Coding Forum 2 02-07-2007 10:36 AM
Form question cachemony Web Design Lobby 1 06-16-2006 09:47 AM
help creating a form I like pie Coding Forum 5 05-12-2006 02:28 AM
form question pcs802 Coding Forum 1 06-01-2004 09:58 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 08:41 AM.
© Copyright 2008 V7 Inc