473,387 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how can i print an individual field when using the simple perl database sample

1
Using the Simple perl database in Bytes, I have defined my database as follows:
Expand|Select|Wrap|Line Numbers
  1. %fields = (
  2.     ID                 =>        [0,        'Link ID:',                'text'],
  3.     UserName    =>        [1,        'UserName:',            'text'],
  4.     Password     =>        [2,        'Password:',            'text'],
  5.     Level         =>        [3,        'Level:',                    'drop'],
  6.     FullName    =>        [4,        'Full Name:',            'text'],
  7.     Email            =>        [5,        'Email Address',    'text'],
  8.     Location    =>        [6,        'Location',                'text'],
  9.     );
  10.  
I am using check boxes to choose who I will send an email too, and I want to use the email address, but after 10 hours of trying all what I can think of, I'm still stuck. This is probably a simple question, but its got me stumped.
Jan 17 '12 #1
1 1392
RonB
589 Expert Mod 512MB
As written that hash would only hold the info for 1 user. You need to use a hash-of-hashes or an array-of-hashes.

Here's how to access the email address in the hash you posted.
Expand|Select|Wrap|Line Numbers
  1. print $fields{'Email'}[1];
Jan 17 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: NotGiven | last post by:
WHen I use php's mail() function, the recipient sees the hosting userID - NOT GOOD!. Are there any settings I can change or code it a different way? Thanks.
5
by: Andrew James | last post by:
Gentlemen, I'm running into a problem whilst testing the parsing of a language I've created with TPG . It seems that for some reason, TPG balks when I try to parse an expression whose first...
3
by: Laurie | last post by:
I am using Automation in Access 2003 to open a Word Document and fill in some values using bookmarks. It all works perfectly except for one section. I am filling in some values in a previously...
0
by: Robert via DotNetMonster.com | last post by:
I'm doing URL rewriting for my web site, so there is only a single phyiscal web page (Index.aspx). All other web pages I construct dynamically. This is all working fine, but I want the ability to...
1
by: Tor Inge Schulstad | last post by:
Hi. I know that Access has it's limitations, but does anyone have a good strategy for avoiding "unspecified error" when retrieving data from the database. I always close my connections, but the...
0
by: Harry Leboeuf | last post by:
Hello, I'm swicthing van Delphi to VS2005 with c#. I'm missing the quite easy datamodule from delphi and can't find some general examples on how most people are using the xsd datasources. As...
2
by: PengYu.UT | last post by:
Usually assert only print the current function. But I also need to know which function called the current function. Is there anyway to make it print out the whole stack? Thanks, Peng
3
by: ASP Developer | last post by:
I have a variety of pages that use a master page. For some reason when I attempt to copy any of the label text on the screen it seems to highlight most of the screen randomly and I can't simply...
4
by: sonu2die4 | last post by:
Hi, I have the following perl script working for me.I am accesing the database from my perl script using use Net::Telnet(); package. I am not using DBI package.as I stated earlier the following...
0
by: Sandra Osorio | last post by:
Am Using MS Access and got a field which uses a drop list (yes/no field). When I select the “No” option, I’d like to jump into a different field (The name of this field is “fumaba”). How can I jump...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.