CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Perl beginner - I need help please

 

First page Previous page 1 2 3 4 5 Next page Last page  View All


mhx
Enthusiast / Moderator

May 30, 2001, 6:56 AM

Post #51 of 123 (7166 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,


In Reply To
Well, Iíve decided that my page IS gonna re-direct to another page (ExampleÖThank You page). After someone presses ďForm SubmissionĒ I still want a message to pop up (on the Form page).

Iím assuming that since my page will be re-directing that Iíll be able to get this message to appear?

The following dating site has a good example of the pop-up message Iím talking about.
If you scroll to the bottom of the screen youíll see the Form buttons (Search Current Ads) Iím talking about.
Blinddate.com

Ok, now I know what you want. I've had a look at the source of the site you've linked to. It's the solution I thought of first when reading your last post, but then it occurred to me that it would behave exactly like it does on that page. But if you want it that way, perfect! Have you had a look at the source yet, or do you need some explanation?

In Reply To
Well, if I ever decide to integrate my html within a .cgi document then canít I just do all my html formatting in say, Dreamweaver and then cut and paste it into my .cgi document (ExampleÖ <<ENDHTML Ö ENDHTML)?

That's usually the bad way, nevertheless it's a possible way. It's bad because it's nearly impossible to read the resulting mixture of HTML and Perl. The good way is to use the CGI package instead of HTML, or at least to put the HTML code into a perl library and access it through library calls. But I don't want to be too confusing right now... As it seems, you don't need it at the moment.

In Reply To
What is AFAIK?

It's a popular term usually used in forums/newsgroups to save typing and means as far as I know. There are a lot more of these explained here. You seem to know as much of these hacker abbreviations as I know english idioms. Wink

Happy HTMLing and CGIing,
Marcus



JennyW
journeyman

May 30, 2001, 10:10 AM

Post #52 of 123 (7164 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Marcus! : )

In Reply To
Ok, now I know what you want. I've had a look at the source of the site you've linked to. It's the solution I thought of first when reading your last post, but then it occurred to me that it would behave exactly like it does on that page. But if you want it that way, perfect! Have you had a look at the source yet, or do you need some explanation?

Yes, Iíve had a look at the source. Actually, I have an example of that style of a Form at this linkÖ
Just scroll to the bottom of the page. There should be a button that says, print msg. When you press it the word ďmessageĒ displays.

http://jennyw.netfirms.com/form_test_05_29_01.html

Iíve tried to take the code for this form and put it in my Email sending Form (which is on the same page), but have been unsuccessful.

In Reply To
>>Well, if I ever decide to integrate my html within a .cgi document then canít I just do all my html formatting in say, Dreamweaver and then cut and paste it into my .cgi document (ExampleÖ <<ENDHTML Ö ENDHTML)?
>That's usually the bad way, nevertheless it's a possible way. It's bad because it's nearly impossible to read the resulting mixture of HTML and Perl.

Do you mean itís impossible for the .cgi program to produce results OR itís just difficult to read as a programmer?

Thanks,
Jenny



mhx
Enthusiast / Moderator

May 30, 2001, 11:35 AM

Post #53 of 123 (7161 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hiho!


In Reply To
Yes, Iíve had a look at the source. Actually, I have an example of that style of a Form at this link
Just scroll to the bottom of the page. There should be a button that says, print msg. When you press it the word message displays.
http://jennyw.netfirms.com/form_test_05_29_01.html
Iíve tried to take the code for this form and put it in my Email sending Form (which is on the same page), but have been unsuccessful.

I'm not sure if you merged the code correctly. This is what you have (slightly compressed):

Code
<form ...> 
<input type="SUBMIT" value="Form Submission" name=SUBMIT style="...">
</form>
...
<form id=form1 name=form1>
<input type = "button" value = "print msg"
onclick = "msg.style.display = 'block'"
id=button1 name=button1>
</form>

This is on the dating page:

Code
<INPUT TYPE=BUTTON NAME=QuickSearchButton 
onclick="submit();disableQuickButtons();"
VALUE="Search Current Ads">

Try to replace the submit button in the first form on your page with the following code:

Code
<input type=button value="Form Submission" name=SUBMIT style="..." 
onclick="msg.style.display='block';submit();">

If you're lucky, it'll work and the text 'message' will disappear.
The submit(); function simulates a click on a submit button. It's important that this is contained in the onClick handler.

In Reply To
Do you mean itís impossible for the .cgi program to produce results OR itís just difficult to read as a programmer?

I mean it's difficult for the programmer. If you have to maintain software that has several 10,000 lines of code as I have to, you'll care a lot about readability. Crazy

Bye,
Marcus




JennyW
journeyman

May 30, 2001, 6:23 PM

Post #54 of 123 (7154 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus!

I still have a few problems.

I implemented the code, but now my ďSubmit Once! Form ValidationĒ code isnít working.

If you forgot what the Submit Once! Form Validation isÖ

http://

Hereís what I didÖ
red = new code. for pop up message.
purple = submit once form validation scripting.

<form action="cgi-bin/alphamail_new.cgi" method="POST" id=form1 name=form1 onSubmit="submitonce(this)">

Ö

<input type="button" value="Form Submission" name=SUBMIT style="background-color: #333333; color: #FFFFFF; font-family: Arial; font-size: 8pt; border-style: solid" onclick="msg.style.display='block';submit();">
</form>

<div id="msg" style = "display:none"><font color="#FFFFFF">Thank you!</font></div>

So, right now the words Thank You are displaying when Form Submission is selected. However, my Submit Once! Form Validation script isnít working anymore.

What do you think could be the problem?

Thanks,
Jenny



mhx
Enthusiast / Moderator

May 30, 2001, 9:49 PM

Post #55 of 123 (7152 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

yeah, I've got another idea. (And I forgot what the Submit Once! Form Validation was...) Just put the old submit button back in, and add msg.style.display='block'; before submitonce() in the onSubmit handler. This will look like

Code
<form action="cgi-bin/alphamail_new.cgi" method="POST" 
onSubmit="msg.style.display='block';submitonce(this)">

BTW, I don't think id and name of the form are of any importance, so I took them out.
If this shouldn't work, well, I've got a bunch of other ideas, but I think it'll work this way.

Bye,
Marcus



JennyW
journeyman

May 31, 2001, 6:45 PM

Post #56 of 123 (7140 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus!

First, I just wanna stress how much I appreciate your help! I am serious, you have helped me so much and I just want to let you know that I really appreciate it.

Ok, I tried your code, but was unsuccessful. My Submit Once! Form Validation still wonít work, but everything else works great!

Hereís my new urlÖ

http://jennyw.netfirms.com/form_test_05_31_01.html

Hereís what I adjustedÖ
Adjustments = purple

<form action="cgi-bin/alphamail_new.cgi" method="POST" onSubmit="msg.style.display='block'; "submitonce(this)">

Ö

<input type="SUBMIT" value="Form Submission" name=SUBMIT style="background-color: #333333; color: #FFFFFF; font-family: Arial; font-size: 8pt; border-style: solid" onclick="msg.style.display='block';submit();">
</form>

<div id="msg" style = "display:none"><font color="#FFFFFF">Thank you!</font>
</div>

Do you have any other ideas as to what I could adjust?

In Reply To
BTW, I don't think id and name of the form are of any importance, so I took them out.
If this shouldn't work, well, I've got a bunch of other ideas, but I think it'll work this way.

Why are id and name not necessary?

Thanks again Marcus.
Jenny



mhx
Enthusiast / Moderator

May 31, 2001, 11:53 PM

Post #57 of 123 (7137 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

Good message: I can tell you why it didn't work! Smile
Bad message: It's only that you made a typo... Shocked

If you compare what I posted and what you put in the code, you'll notice an additional double quote:

Code
onSubmit="msg.style.display='block'; "submitonce(this)"

Since the HTML parser only uses the text surrounded by double quotes for onSubmit, it doesn't call the submitonce() function with your code. In fact, this is actually an HTML error, but today's browser are very failsoft, which is not always an advantage.
(Just to avoid confusion on the double quote thing: The parser first recognizes onSubmit=, then scans the first quoting character. This may be either a single or a double quote. Now, it simply searches for the next occurrence of that quote character, and treats the text in between as code to call when someone hits the Submit button.)
So, the solution is simple, just remove the red double quote from the onSubmit expression.

In Reply To
Why are id and name not necessary?

They are only neccessary if you want to access the form by its name or id, which you never do in your page. Every tag inside the form knows implicitly to which form it belongs, the form itself keeps track of which cgi script to call, and the only function that could use the name of the form is the submitonce() function, but you pass this as a parameter, which is a placeholder for the current object (in this case, the form), so the submitonce function also knows about your form. No need to name it. Wink

Since I wanted to be sure it'll work now I've tested the page locally on my machine. Without the quote it works, what shall I say, great! Have fun trying!

Bye,
Marcus



JennyW
journeyman

Jun 1, 2001, 5:33 PM

Post #58 of 123 (7127 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hiee!

Itís great! It works! Thanks!!!

In Reply To
Since I wanted to be sure it'll work now I've tested the page locally on my machine

Hereís my url..
Jennyís almost complete email Form

What do you mean when you write locally?
Do you mean you have your own server, like Apache on your computer?


Iím gonna have more questions for you very soon.

Thanks again,
Jenny



mhx
Enthusiast / Moderator

Jun 1, 2001, 11:41 PM

Post #59 of 123 (7123 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

In Reply To
What do you mean when you write locally?
Do you mean you have your own server, like Apache on your computer?

Yes. (That's a simple one...)

In Reply To
Iím gonna have more questions for you very soon.

I can't await to answer them. SmileCoolWink

Bye,
Marcus




JennyW
journeyman

Jun 2, 2001, 11:50 AM

Post #60 of 123 (7112 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus! Howís the weekend going?

When you receive an auto-reply from my Form my name comes up like this in the recipients inbox:


Code
themustache@hotmail....

I donít like that. I want it to come up like thisÖ


Code
Jenny W

So, I attempted to solve the problem.
I went in my .cgi script with the

Code
sub SendAutoReply {

and made an adjustment.

Hereís what was in my final .cgi script, which you helped me editÖ


Code
print MAIL "From: $YourEmail\n";

And I changed it to the followingÖ


Code
print MAIL "From: Jenny W\n";

Now, my Form still works, but if someone selects auto-reply, my email name will look like this in their inboxÖ


Code
Jenny.W@netfirms.com

I donít want it to look like that. I just wantÖ


Code
Jenny W



Do you know how I can fix this problem?

Thanks,
Jenny



mhx
Enthusiast / Moderator

Jun 2, 2001, 1:59 PM

Post #61 of 123 (7109 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,


In Reply To
Howís the weekend going?

Fine, thanks. Just came back home from playing pool with, well, Jenny. (Not you actually...)

In Reply To
Do you know how I can fix this problem?

Yes, that's pretty easy. Don't change your SendAutoReply function, undo the changes you made. Go a bit to the top, where $YourEmail is defined and change it to:

Code
$YourEmail = 'Jenny W <themustache@hotmail.com>';

This will make your name appear in (most) mail programs instead of your address, but will leave the opportunity to the receiver to reply to the address. If you don't want this, I guess you'll have to get a dummy account somewhere. At least I don't know how to get around this, since I'm not sendmail expert...

Hope your weekend is as fine as mine,

Marcus




JennyW
journeyman

Jun 2, 2001, 2:48 PM

Post #62 of 123 (7109 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus,

My weekend is good so far. Iím spending a Ďlil too much time on the computer, but soon Iím gonna get off for a bit.

I made the $YourEmail change you mentioned and it worked perfectly. Thank you.

Hereís the url for my Form page.

Iím gonna go dive into another area of .cgi.

I want to make a poll on a page that changes dynamically.

For example:
I want the user to place a vote and then I want that same page to refresh showing the current poll statistics.

I've been looking for some Perl scripts that can do this, but all the scripts Iíve seen have the user place a vote and then be brought to a new page to view the results.
I donít like this. After the user votes I want the results to be placed exactly where the voting was done.

Do you know a place where I can get a simple script that does this?

If youíre unsure itís totally fine, Iím sure Iíll eventually find one!

Thanks,
Jenny

P.S. You should play pool with this Jenny Ė Iím not the best, but I do ok!



mhx
Enthusiast / Moderator

Jun 3, 2001, 10:57 AM

Post #63 of 123 (7104 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,


In Reply To
Iím spending a Ďlil too much time on the computer,

Really? Smile


In Reply To
Do you know a place where I can get a simple script that does this?

I've been thinking about a voting script for my DVD page. I've also done some coding, but I was far from being finished. I took what I had and modified it a bit so - as I hope - it could fit your needs.
It's a very universal script, capable of managing as many polls as you like. You can take a first look at how it looks here.
You don't have to change anything on the script itself, since it is configured by some external files. You need one file called votes.txt, which lists all the polls you like to offer. It looks like this:

Code
[likeperl] 
title = Do you like Perl?
file = likeperl.txt
date = 2001-05-31 13:10:00
state = active

[htmltag]
title = Which is the HTML tag you like most?
file = htmltag.txt
date = 2000-04-30
state = active

[whereisit]
title = Tell us where your Perl is!
file = whereisit.txt
date = 2001-01-01
state = closed

You also need one file for each poll where the voting items and the results are stored. These look like this one:

Code
Perl rules! [34] 
Yeah, I do like Perl! [13]
Ahh, well, Python is fine, too. [4]
Perl sucks! [3]
What the hell is this Perl? [8]

First, let's have a look at the first file. Each poll starts with the Poll ID enclosed in square brackets. This would be likeperl for the first entry. Each of the lines following the Poll ID contains description of the poll.
title is the poll's title.
file is the file where the voting items and results are stored.
date holds the date when the poll was introduced. This is currently only used for sorting the polls from new to old.
state is the state of the poll, which can only be active or closed. You cannot vote for a closed poll.
Now, the other file simply contains one line for each voting item, with the number of votes for this item in square brackets at the end of the line. This file is modified each time a user places a vote.
All you have to do to add a new poll is to add an entry in the votes.txt and add a file containing the voting items, each line ending with [0].
I've put a copy of my cgi-bin directory into my www directory, so you can download all the files. You can browse through these files here.
You'll have to download all the files. The .txt files contain the information listed above. vote.cgi is the cgi-script. voteutil.pm contains utility routines for the script.
The subdirectories Date and Time each contain additional files required by the script. You also have to download these files and put them in exactly the same directories in your cgi-bin.
There are two ways to refer to the script. If you want the list, just refer to the script's URL, which is

Code
cgi-bin/vote.cgi

You can also go directly to a poll by using this URL,

Code
cgi-bin/vote.cgi?vote=likeperl

where I've put likeperl as a placeholder for any Poll ID.
I hope you understand all that I've written here, at least after looking at the files and playing with the script. If you don't understand everything, I don't mind if you ask for details. If you have suggestions, you're also welcome. The script is everything but perfect, I think, because it was hacked in only a few hours. For example I have to look over the files because I always mix up poll and vote. Oooo my english!! I just wanted to poll first if you're interested in the script.

Bye,
Marcus

P.S.:

In Reply To
You should play pool with this Jenny - Iím not the best, but I do ok!

I only play twice a month, so I'm not the best either. Wink



JennyW
journeyman

Jun 4, 2001, 8:52 AM

Post #64 of 123 (7094 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus!

Thanks for all the info on your Poll script.

Before I get into polls, I just found a few old questions I wanted to ask you regarding my email Form.

There are three fields on my FormÖ

Name
Email
Message

All of the fields HAVE to be filled out in order to send the Form. I donít like that feature. I donít think the Name field should be required.

How do I make the Name field optional?

Also,
In the future I want to make a mailing list.
To sign up for the mailing list I only need an Email field.

I want to make another .cgi script that ONLY accepts email addresses (no Name or Message). How can I adjust the .cgi code you helped me with to make it only look for valid Email addresses?

Polls

Your websiteís poll is really good, but unfortunately Iím not really looking for that kind of poll.
Iím looking for a poll similar to the url listed below (after clicking on the link scroll to the bottom right hand corner of the page).

Basically, the user makes a selection on the poll using radio buttons. After my submitting the selection the page refreshes the results are placed in the exact location of where the voting took place.

Hereís the poll I likeÖ

nfl

I found a site that offers a similar poll to the one listed above. Poll

Thanks,
Jenny



mhx
Enthusiast / Moderator

Jun 4, 2001, 3:01 PM

Post #65 of 123 (7089 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

sorry, I got little time at the moment, because I prepare a lecture on wavelets in medical applications which I'm about to do in two days. Quite some work...
But here's what I have:

In Reply To
How do I make the Name field optional?

That's easy. Just find the following line and comment it out, and the script should work even without a name.

Code
if (!$Name || $Name eq ' ') {&DoEmailError;}

But, you could even make it better and instead of the above write:

Code
if (!$Name || $Name eq ' ') {$Name = 'Anonymous';}

So if one doesn't enter a name, the script will automagically assign the name 'Anonymous'. This is better, because $Name is used in some places, and this way it is never left empty.

In Reply To
How can I adjust the .cgi code you helped me with to make it only look for valid Email addresses?

I'd say if you want to set up a mailing list, you should definitely use another script. If you want to check the validity of an email address, here's the URL to go to. It contains links to different versions of a perl script that check if an email address is valid. But beware, it's hardcore regex in Perl.
Concerning the poll stuff, I couldn't really figure out the differences (in general) between the polls. Except for the fact that I was unable to vote on the NFL page. (Which isn't so bad since I know absolutely nothing about football...) I guess you mean the presentation of the poll. Of course, you can take my code as a basis and modify it for your needs. Or you can just search for another resource.
So much for now, hope the little I've posted was of any help.

Bye,
Marcus



JennyW
journeyman

Jun 4, 2001, 5:40 PM

Post #66 of 123 (7086 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus!

In Reply To

Code
 if (!$Name || $Name eq ' ') {$Name = 'Anonymous';}


Thanks! That piece of script worked great! Iím assuming that if I decide I donít even want the word ďAnonymousĒ to display then I just have to comment out the line above?

In Reply To
So if one doesn't enter a name, the script will automagically assign the name 'Anonymous'. This is better, because $Name is used in some places, and this way it is never left empty.


What does the segment in blue mean? $Name is used in some places?

In Reply To
sorry, I got little time at the moment, because I prepare a lecture on wavelets in medical applications which I'm about to do in two days. Quite some work...

Wow, thatís great! Good-luck with that presentation! You probably donít need luck, but Iíll send it your way anyhow. Regardless, Iíll keep my questions to a minimum for the next few days!

In Reply To
But beware, it's hardcore regex in Perl.

What does that mean?

In Reply To
Concerning the poll stuff, I couldn't really figure out the differences (in general) between the polls. Except for the fact that I was unable to vote on the NFL page. (Which isn't so bad since I know absolutely nothing about football...) I guess you mean the presentation of the poll. Of course, you can take my code as a basis and modify it for your needs. Or you can just search for another resource.
So much for now, hope the little I've posted was of any help.

Of course! What was I thinking? Ahhh. Yes, I would love to use your code!

If I use your code is it possible for the poll to have the users select a radio button and then press a submit button to send their vote?

Were you unable to vote on the nfl poll because you donít know anything about football or was the poll broken?

Thanks,
Jenny



mhx
Enthusiast / Moderator

Jun 4, 2001, 11:44 PM

Post #67 of 123 (7082 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

it seems it was a bit late when I was answering yesterday. Smile Well I'll try to be more precise this time.
Concerning the anonymous thing your assumption is right.

In Reply To
What does the segment in blue mean? $Name is used in some places?

As I said, it was late and I didn't find the right words. I meant that the variable $Name is used to insert the name of the form user in the text for both the mail to you and the autoreply mail. If the user doesn't enter a name, nothing is inserted in both mails. It's a matter of taste what solution you choose. So don't hesitate to comment the line out.

In Reply To
Good-luck with that presentation!

Thanks a lot. Reminds me that I gotta get myself working now...

In Reply To
What does that mean?

You know Regular Expressions? Short term for them is regex. A regular expression is used for an abstract description of some part of a text, e.g. an email address. Regular expressions, even short ones, look quite weird to the beginner. And the email checking regex looks even weird to the perl guru (although he may at least be able to recognize it's a regex Wink). To give you a little impression, here's the fast version of the email validation regex (please, don't try to understand and don't ask me to explain):

Code
[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\ 
xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(
\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\04
0\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\
n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\
xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]
*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n
\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\(
[^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*@[
\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\x
ff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040
)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\x
ff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x8
0-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\
n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:"
.\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x8
0-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xf
f][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*|(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-
\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\01
5"]*)*")[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]*(?:(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([
^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)|"[^\\\x80-\xff\
n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]*)*<[\040\t]*
(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015
()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:@[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\
([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:
[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\0
15\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*
(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80
-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\
\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\
037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[
^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[
\040\t]*)*)*(?:,[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80
-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*@[\040\t]*(?:\([^\\\x80-\xff\n\015()]*
(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015
()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|
\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([
^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.
[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\
xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\04
0)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\
xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x
80-\xff\n\015()]*)*\)[\040\t]*)*)*)*:[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff
\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)?(?:[^(\040)<>@,
;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80
-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\01
5()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\
\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\)
)[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\
000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\
xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x
80-\xff\n\015()]*)*\)[\040\t]*)*)*@[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n
\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".
\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80
-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff
][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(
?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015(
)]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\
[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^
\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*>)

Of course you may ask me about regular expressions, I really, really like them, but this monster above is not what I use everyday.

In Reply To
If I use your code is it possible for the poll to have the users select a radio button and then press a submit button to send their vote?

I guess that should be no problem. If you can wait for another 48 hours, I can check this out. You can also have a try yourself, the code shoud be readable as long as you have some Perl experience.

In Reply To
Were you unable to vote on the nfl poll because you donít know anything about football or was the poll broken?

No, having nothing to do with football couldn't have stopped me from voting. I just didn't find a submit button or at least any button to click on. Perhaps they closed the poll...

Bye,
Marcus



JennyW
journeyman

Jun 5, 2001, 7:54 PM

Post #68 of 123 (7077 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus,

Iíll try to keep this straight and simple since youíre busy busy!

I have to go back to my email Form again.

I want the email address field to be optional, but if someone does enter an email address (most will) I still want the .cgi program to decipher if the entered email address is valid.

Do I do something with the following line?


Code
if (!$Email || $Email eq ' ') {&DoEmailError;}


In Reply To
>>If I use your code is it possible for the poll to have the users select a radio button and then press a submit button to send their vote?
>I guess that should be no problem. If you can wait for another 48 hours, I can check this out.

Iíll try to play around with it, but whenever you get the time Iíd appreciate any help you could offer.

I also tried your poll. Its functionality was good, but the only thing I didnít like was that I could make several votes after my initial (first) vote.

Is it possible for the poll to track the users IP address so he/she can only vote once?

And if you have the time - what is a regular expression?


Thanks,
Jenny

P.S. Goodluck with the presentation!



mhx
Enthusiast / Moderator

Jun 6, 2001, 3:38 AM

Post #69 of 123 (7071 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,

In Reply To
I want the email address field to be optional, but if someone does enter an email address (most will) I still want the .cgi program to decipher if the entered email address is valid.

I'll have a look tonight. I think it's a bit more difficult, since you also have to check for the autoreply message to be sent. If someone doesn't enter an address, you can't send him a reply. (I think... Smile) But it should be no problem in general.

In Reply To
Is it possible for the poll to track the users IP address so he/she can only vote once?

Yeah, I think that's possible. It's something I'm also thinking about, and I wish I had the perfect solution. The problem is, most users will not have a static IP address. So each time they dial up to their provider, they may be assigned a new address. Even worse, someone else may get the IP address of someone who already voted. The solution I have in mind right now (it's not yet implemented) is the following. I'll keep track of the IP addresses of the voter and block this address for a certain time, let's say 1-5 minutes. I'm also considering to use a cookie, since then I can be sure that the infomation is on the user's machine. But I need the other approach if the user has turned of cookies. I'm not so sure what I'll do here, but you can be sure that I'll do something, and I'll tell you if I got a solution.

In Reply To
And if you have the time - what is a regular expression?

I'll tell you next time. Just take this as a preface: It one of the coolest features Perl has to offer. There's four things in Perl that make it my favourite language, and that make programming in Perl real fun: regular expressions, hash tables, map & grep. You can do just about anything with these features. I'll tell you more about regexes and perhaps the other things if I'm not dying tonite!

Bye,
Marcus


In Reply To
P.S. Goodluck with the presentation!

Thanks again, in about 6 hours it'll be over...




JennyW
journeyman

Jun 6, 2001, 6:42 AM

Post #70 of 123 (7070 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus! How was the presentation!

In Reply To
>>Is it possible for the poll to track the users IP address so he/she can only vote once?

>Yeah, I think that's possible. It's something I'm also thinking about, and I wish I had the perfect solution. The problem is, most users will not have a static IP address. So each time they dial up to their provider, they may be assigned a new address. Even worse, someone else may get the IP address of someone who already voted.

You bring up some very solid points. You reminded me that my IP address changes each time I log on.

In Reply To
The solution I have in mind right now (it's not yet implemented) is the following. I'll keep track of the IP addresses of the voter and block this address for a certain time, let's say 1-5 minutes. I'm also considering to use a cookie, since then I can be sure that the infomation is on the user's machine. But I need the other approach if the user has turned of cookies. I'm not so sure what I'll do here, but you can be sure that I'll do something, and I'll tell you if I got a solution.

It sounds like you have a few great ideas!

What would happen if I took your .cgi poll script and adjusted it for my index.html page?
Can I put it on my index.html page?


Thanky,
Jenny



mhx
Enthusiast / Moderator

Jun 6, 2001, 1:51 PM

Post #71 of 123 (7063 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,


In Reply To
How was the presentation!

It was just fine, thanks. People were asking lots of questions, which shows to me they were interested and they captured a lot of what I was talking about. At least my parents now know something about Wavelets, X-Ray image compression and ECG signal analysisWink.

In Reply To
What would happen if I took your .cgi poll script and adjusted it for my index.html page?
Can I put it on my index.html page?

Depends on what you want to do. Do you want the poll to appear as a part of your page? I haven't thought of that yet, because the output of the script is quite huge and occupies most of the screen. If you want to link to a poll, just look at my initial poll-related post.
If you prefer to have it as part of your page, well, I guess I'll have to take care of this next time I'm working on the script...
Now, your optional email field. I'm not sure what sendmail will do without a sender email address. I guess it'll insert something. Nevertheless, you should take care of it and enter some dummy address if the user doesn't. Here's the solution I'd recommend: Remove the line

Code
&CheckEmailAddressFormat;

and replace

Code
&SendSubmission; 
&SendAutoReply if exists $in{'WantAutoReply'};

with

Code
if( $Email =~ /^\s*$/ ) { 
$Email = 'dummy@email.com';
&SendSubmission;
}
else {
&CheckEmailAddressFormat;
&SendSubmission;
&SendAutoReply if exists $in{'WantAutoReply'};
}

I guess that should make it work, but I haven't tested it.
But now ... let's go for a short intro on regular expressions. I've just used a regular expression in the above code, and after this, you should be able to understand it.
In short, a regular expression is an abstract description for a set of strings (hope you don't find this too mathematic). You can use regular expressions to check if a string matches certain criteria, or for searching and replacing.
Ahh, I'm telling too much abstract stuff. Here's an example. Let's say you want to test if a string starts with an uppercase 'A'. Use this code:

Code
$string = 'Ahh, yeah!'; 
if( $string =~ /^A/ ) {
...
}

The green thing is the regular expression match operator. Just read it as 'matches'. The red stuff surrounded by slashes is the regular expression. Yes, it's only two characters, and these are easy to explain.
The circumflex is an anchor for the beginning of the string. The 'A' is just the uppercase letter A. You can read the above line: 'if $string matches a string containing the beginning of the string followed by an uppercase A'. This is, of course, true for our string.
If you wouldn't use the circumflex, it would read 'if $string matches a string containing an uppercase A', and this would be true for any string that contains an 'A' anywhere. Now, let's move on to something more complicated:

Code
$string = '12 cm'; 
if( $string =~ /^\d+\s*cm$/ )

That looks weird? It's easy. The '\d' simply means 'any digit', the '+' means 'one or more of the previous', the '\s' means 'any blank character' (spaces, tabs), the '*' means 'zero or more of the previous', and finally the dollar sign is an anchor for the end of the string.
To convert the regex to normal language: 'a string containing the beginning of the string followed by one or more digits followed by zero or more blanks followed by cm followed by the end of the string'. This, again, is absolutely true.
Now, that's only a very, very brief example of what you can do with regular expressions. You can do a great lot more than just this. I have a 300 page book covering nothing but regular expression. It's one of the best books I have actually ('Mastering Regular Expressions' by Jeffrey Friedl, published by O'Reilly).
With what you now know, you should be able to detect the regex in the above code and determine what it does. You should also see why a regex makes sense here. (I'll await your opinion on this)
If you're more interested in regular expression, you should have a look at 'perldoc perlre', or just ask me, or have a look at the 'Regular expressions' section in this forum. But I think what you really need first is good introduction on Perl, just to get the basics. CGI programming will be a lot easier then.
There's a really, really good tutorial on Perl for Windows. I read when I started with Perl and it really helped me getting into it. You should absolutely read it. It's here.
If you got this, you're ready to learn more about Perl's advanced features.
I hope you'll have as much fun reading the tutorial as I had. If you have problems or questions, don't hesitate to ask.

Bye,
Marcus



JennyW
journeyman

Jun 6, 2001, 6:25 PM

Post #72 of 123 (7062 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Marcus! Glad to hear your presentation went well!

You got me thinking and I donít think Iím going to keep the email address on my Form mandatory. You brought up some very important issues in your email yesterday, which really got me thinking.

Wow! Right now regular expressions are a little hard! In time perhaps. However, you explained regular expressions quite well and Iím glad Iím now equipped with the basic info. of understanding their function!

- A .cgi script that just accepts Email Addresses (mailing list) Ė

In Reply To
I'd say if you want to set up a mailing list, you should definitely use another script. If you want to check the validity of an email address, here's the URL to go to. It contains links to different versions of a perl script that check if an email address is valid. But beware, it's hardcore regex in Perl.

When you write beware do you mean that the script could be faulty? Or do you mean it will be difficult to understand?

I went to that url you mentioned above, but Iím not sure which script to download.

The page writesÖ

In Reply To
At the moment, I have only the email address regex program (from Chapter 7 and Appendix B), as it's the most substantive bit of code.
There is an optimized version from Appendix A and the unoptimized version discussed in Chapter 7.

DOS users may find these versions (optimized and unoptimized) easier to download -- the Perl is the same, but the lines end with CR/LF, and the URLs endi with ``.txt''.


What do I download? Iím a little confused.

- Polls -

In Reply To
>>What would happen if I took your .cgi poll script and adjusted it for my index.html page?
Can I put it on my index.html page?
>Depends on what you want to do. Do you want the poll to appear as a part of your page?

Yes. I want the poll to be in the bottom corner of my index.html page. After people vote on the poll and press submit I want the index.html page to refresh and display the results in the place the voting once took place.
I think this script does just thatÖ

http://www.cgi-world.com/pollit.html

Is there anything else I wanted to ask you? Hmmm, canít think of anything right now, but you can bet Iíll keep the questions coming soon!

Thanks so much Marcus!
Jenny



mhx
Enthusiast / Moderator

Jun 6, 2001, 10:34 PM

Post #73 of 123 (7058 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi Jenny,


In Reply To
You got me thinking ...

That's always a good thing. I really like it if I get people thinking. Because that's when they learn most!

In Reply To
When you write beware do you mean that the script could be faulty? Or do you mean it will be difficult to understand?
...
What do I download?

Oooo, I've got to clear this up. First, when I said beware I meant that it's really hard to understand. I absolutely don't think they're faulty, because they're from the same person that wrote the huge book about regexes.
Second, that script (it isn't really a script) does nothing but checking if an email address is valid. You've got to take it, encapsulate it in a subroutine, and use it in a script for mailing lists (which you still have to figure out).
You shouldn't download the DOS version. The other two version do the same, except one is optimized and one isn't. I'd take the optimized version.
Concerning the poll, I think putting it 'in the bottom corner' is quite hard with my poll because of its size. But, well, let's see what I'll do with the script, perhaps I'll add a 'small' option to it. Smile
Here's again something you can do for me: I always try to improve my language skills (not only programming languages). You may have noticed that I use 'concerning this and that, bla bla' (as in the last paragraph) quite often. It's from my english lessons. I really liked it but I've never seen or heard anyone else using it. What I'd really like to know: Does anyone use this? Or is it just that my english teacher used it all the time? Or is there a similar expression that is more commonly used? Thanks!

Bye,
Marcus



JennyW
journeyman

Jun 7, 2001, 7:09 AM

Post #74 of 123 (7056 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hiee!!


In Reply To
Second, that script (it isn't really a script) does nothing but checking if an email address is valid. You've got to take it, encapsulate it in a subroutine, and use it in a script for mailing lists (which you still have to figure out).

What does the part in red mean?

Why canít I just find a script that just parses email addresses? Why do I need that regex? We didnít need one when adjusting the email Form.


In Reply To
I'd take the optimized version.

Out of curiosity, why would you take the optimized version versus the unoptomized version?

In Reply To
Concerning the poll, I think putting it 'in the bottom corner' is quite hard with my poll because of its size. But, well, let's see what I'll do with the script, perhaps I'll add a 'small' option to it.

Can this be solved by just adjusting the Form layout in the html?


In Reply To
Here's again something you can do for me: I always try to improve my language skills (not only programming languages). You may have noticed that I use 'concerning this and that, bla bla' (as in the last paragraph) quite often. It's from my english lessons. I really liked it but I've never seen or heard anyone else using it. What I'd really like to know: Does anyone use this?

Yes, people use concerning this / that. You know how I can tell it sounds fine? Because when I read it, I donít think anything of it. It sounds very normal.

In Reply To
Or is it just that my english teacher used it all the time? Or is there a similar expression that is more commonly used?

Concerning this / that is fine.
You can use lots of other words (or word combinations), like in regards to, regarding this / that, on the subject of, on the topic of, about this / that.
But to tell you the truth I never noticed that you used concerning a lot. If you never told me you were from Germany then I would assume you were from an english country Ė strictly because your writing is good. The more you verbally speak to english people (or any language) the more youíll pick up different ways of saying things. Youíre doing great! How long have you known the english language?

Thanks,
Jenny



mhx
Enthusiast / Moderator

Jun 7, 2001, 12:00 PM

Post #75 of 123 (7050 views)
Re: Perl beginner - I need help please [In reply to] Can't Post

Hi!


In Reply To
What does the part in red mean?
Why canít I just find a script that just parses email addresses? Why do I need that regex? We didnít need one when adjusting the email Form.

Did I say you need the regex? Sorry. You can use it, but actually it's optional. The regex is only needed if you want to be absolutely sure that an email address is a valid email address (except, of course, the regex cannot check if it exists).
With encapsulation in a subroutine I was trying to say that the regex stuff should be moved into a subroutine, so you can use a subroutine call to verify an email address.
Fortunately, you don't have to do this. I figured out someone else has just done it and made a Perl module out of the regex. It's called Email::Valid and is available from CPAN if it should not be installed locally or at netfirms. Usage is very simple:

Code
use Email::Valid; 

my $email = 'mhx@gmx.de';

if( Email::Valid->address( $email ) ) {
print "$email is a valid email address!\n";
}
else {
print "$email is invalid!\n";
}

The red part makes the module available to the script, the green part is used to check the address.

In Reply To
Out of curiosity, why would you take the optimized version versus the unoptomized version?

Because it's optimized (?!) What do you want to hear? I assume the optimized version is faster, therefore I'd prefer it.

In Reply To
Can this be solved by just adjusting the Form layout in the html?

Yes and no. Yes you can adjust the layout of the table I'm using. No, because there's no html. There's another problem that I see right now. If you want to use the poll within another page, you need to either create that whole page dynamically (because its content - the poll results - is dynamic) or embed the poll within a frame, which can be a problem at netfirms (I'm not sure why, but I had difficulties displaying a page that had frames). Did you have a look at the script yet?

In Reply To
How long have you known the english language?

Thanks for the detailed information on my language issue! It just came to my mind as I wrote that I use the expression quite often, and I couldn't think of any replacement just then. Now that I see your examples, they all sound clear and good, perhaps I'll remember some of them and use them from time to time.
To answer your question, I've had english lessons at school for nine years. But I was driving most of my teachers crazy because I was never interested in the topics we were discussing. Unfortunately - for them - I was quite good in the syntax and semantics of the language (which perhaps is because I'm a programmer Smile), so they couldn't give me a bad grade.
I've finished school five years ago and since then, all my english is from TV and www (and reading docs and articles only available in english). And since most programming languages are derived from the english language, it's often easier to write comments in english, too. For me it's easier to write documentation for software I'm working on in english than in german.

Bye,
Marcus


First page Previous page 1 2 3 4 5 Next page Last page  View All
 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives