473,734 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to check for all the fields in user registrations perl script

236 New Member
Hi All,

I modified the user registration script, but not sure how to make it check for each variable in terms of preventing junk registration and invalid characters?
Two codes below :
a) html
b) perl script (print and inserting into database)

Cheers...
Andrew

a) html
=====
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//SoftQuad//DTD HTML 3.2 + extensions for HoTMetaL PRO 3.0(U) 19961211//EN"
  2.  "hmpro3.dtd">
  3. <HTML>
  4. <HEAD>
  5. <TITLE></TITLE></HEAD>
  6. <BODY>
  7. <FORM ACTION="/cgi-bin/acctman2.pl" METHOD="POST">
  8. <CENTER>
  9. <TABLE BORDER="0" WIDTH="400">
  10. <TR>
  11. <TD ALIGN="CENTER">
  12. <TABLE BORDER="0" CELLPADDING="5" BGCOLOR="#FF8000">
  13. <TR>
  14. <TD><INPUT TYPE="CHECKBOX" NAME="agree" VALUE="agree"></TD>
  15. <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>I agree to the Terms 
  16. and Conditions above.</B></FONT></TD></TR></TABLE><BR></TD></TR>
  17. <TR>
  18. <TD>
  19. <HR SIZE="2" NOSHADE="NOSHADE"></TD></TR>
  20. <TR>
  21. <TD ALIGN="CENTER">
  22. <TABLE BORDER="0" WIDTH="350" NOWRAP="NOWRAP">
  23. <TR>
  24. <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>Customer Information</B></FONT><BR><FONT
  25. SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FF0000"><B>Fields marked 
  26. with an asterisk<BR>are required input fields.</B></FONT><BR><BR></TD></TR>
  27. <TR>
  28. <TD><INPUT TYPE="TEXT" NAME="fname">
  29. <FONT SIZE="-1" FACE="verdana, arial, helvetica">First Name *</FONT></TD></TR>
  30. <TR>
  31. <TD><INPUT TYPE="TEXT" NAME="lname">
  32. <FONT SIZE="-1" FACE="verdana, arial, helvetica">Last Name *</FONT></TD></TR>
  33. <TR>
  34. <TD><INPUT TYPE="TEXT" NAME="email">
  35. <FONT SIZE="-1" FACE="verdana, arial, helvetica">E-Mail Address *</FONT></TD></TR></TABLE>
  36. <TABLE BORDER="0" WIDTH="350" NOWRAP="NOWRAP">
  37. <TR>
  38. <TD><BR><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>Choose a User 
  39. Name</B></FONT><BR><INPUT TYPE="TEXT" NAME="username"> 
  40. <FONT SIZE="-1" FACE="verdana, arial, helvetica">User Name</FONT>  
  41. <FONT SIZE="-1" FACE="arial, helvetica"><BR><BR><B>Choose a Password</B></FONT><BR>
  42.  
  43. <INPUT TYPE="password" NAME="pwd">     
  44. <FONT SIZE="-1" FACE="verdana, arial, helvetica">Password</FONT><BR><INPUT
  45. TYPE="password" NAME="pwd2"> <FONT SIZE="-1" FACE="verdana, arial, helvetica">Verify
  46.   Password</FONT></TD></TR></TABLE><BR><BR><INPUT
  47. TYPE="SUBMIT" NAME="process" VALUE="Submit My Order"><INPUT
  48. TYPE="RESET" NAME=""></TD></TR>
  49. <TR>
  50. <TD>
  51. <HR SIZE="2" NOSHADE="NOSHADE"></TD></TR></TABLE></CENTER></FORM></BODY></HTML>
  52.  

b) perl script
=========
Expand|Select|Wrap|Line Numbers
  1. #!c:\perl\bin\perl.exe 
  2. #!/usr/bin/perl 
  3. ############################################ 
  4. ##                                        ## 
  5. ##     Account Manager LITE User Signup   ## 
  6. ##          by SiteInteractive.com        ## 
  7. ##    http://siteinteractive.com/contact  ## 
  8. ##                                        ## 
  9. ##             version:  1.09             ## 
  10. ##       last modified:  07/24/2002       ## 
  11. ##        copyright (c) 1998 - 2002       ## 
  12. ##                                        ## 
  13. ##    latest version is available from    ## 
  14. ##        http://SiteInteractive.com      ## 
  15. ##                                        ## 
  16. ############################################ 
  17. # Copyright 1998 Elite Host.  All Rights Reserved. 
  18. # TERMS OF USE  
  19. # 1. Account Manager is for licensed customers 
  20. # only. Customer may use Account Manager as many 
  21. # times as customer wishes, as long as customer owns or runs the web 
  22. # site that Account Manager is installed on.  Account 
  23. # Manager may not under any circumstances be sold 
  24. # or redistributed without the written consent of CGI Script Center and 
  25. # its owner Diran Alemshah. 
  26. # 2. CGI Script Center, at its own discresion, will decide if any terms  
  27. # of the this agreement have been violated by customer. Upon written e- 
  28. # mailed notification to Customer of Terms of Use violations, CGI 
  29. # Script Center may revoke customer's license to use Account Manager. 
  30. # In that event, Customer agrees to any and all of the following: 
  31. # a) Customers found in violation of this agreement, found reselling or 
  32. # redistributing Account Manager, or making  
  33. # Customers Members Area ID and password public to anyone in any  
  34. # manner will forfeit their Members area password and all rights to  
  35. # future versions of Account Manager. 
  36. #  
  37. # b). Customer will no longer be licensed to run any version of  
  38. # Account Manager.  
  39. # Indemnification 
  40. # 1. Customer agrees that it shall defend, indemnify, save and hold 
  41. # CGI Script Center, Elite Web Design and marketing, and any 
  42. # persons affiliated with either company, harmless from any and all 
  43. # demands, liabilities, losses, costs and claims, including reasonable 
  44. # attorney's fees asserted against CGI Script Center, its agents, its 
  45. # customers, officers and employees, that may arise or result from any 
  46. # service provided or performed or agreed to be performed or any product 
  47. # sold by customer, its agents, employees or assigns. Customer agrees to 
  48. # defend, indemnify and hold harmless CGI Script Center, its agents, 
  49. # its cusomters, officers, and employes,against 
  50. # liabilities arising out of; a) any injury to person or property caused 
  51. # by an products sold or  otherwise distributed in connection with CGI 
  52. # Script Center products; (b) any material supplied by customer 
  53. # infringing or allegedly infringing on the proprietary rights of a 
  54. # third party; c) copyright infringement and (d) any defective products 
  55. # sold to customer from CGI Script Center products. 
  56. # This program may not be distributed in whole or part, freely, for pay,  
  57. # or any other form of compensation. 
  58. ##################################################  ############### 
  59. # This version designed for Win32 systems (NT).  If you require 
  60. # a Unix version, please contact cgi@elitehost.com 
  61. ##################################################  ############### 
  62.  
  63.  
  64. ##################################################  ############ 
  65. # EDIT USER CONFIGURATIONS BELOW 
  66. ##################################################  ############ 
  67.  
  68. # apache is in d DRIVE!!! not C
  69.  
  70. #require "d:/program files/apache software foundation/apache2.2/cgi-bin/config.pl"; 
  71.  
  72. # This completes this portion of your Account Manager setup 
  73. ##################################################  ############ 
  74. # DO NOT EDIT BELOW THIS LINE 
  75. ##################################################  ############ 
  76.  
  77. use CGI; 
  78. use CGI::Carp qw(fatalsToBrowser); 
  79. use DBD::mysql;
  80. use DBI;
  81.  
  82. my $query = CGI->new; 
  83.  
  84. unless ($CGI::VERSION >= 2.47) {  
  85.    error('Your version of CGI.pm is too old. You must have verison 2.47 or higher to use this script.') 
  86.  
  87.  
  88. #SECTION B
  89. #=========================================
  90. #Database initialization and initial query
  91. my ($dbh, $data_source);  
  92. my $mysql_server_name   = 'localhost';  
  93. my $mysql_database_name = 'test';  
  94. my $mysql_user_name     = 'root';  
  95. my $mysql_password      = 'mysql1';  
  96.  
  97. my $data_source = 'DBI:mysql:' . $mysql_database_name . ':' . $mysql_server_name;  
  98. my $dbh = DBI->connect( $data_source, $mysql_user_name, $mysql_password, {RaiseError=>1}) ||  die "$DBI::errstr";   
  99.  
  100.  
  101.  
  102.  
  103. #important line to pass email address from html to perl
  104. my $agree_field = $query->param("agree") || 'Annonymous'; 
  105. my $first_name = $query->param("fname") || 'Annonymous'; 
  106. my $last_name = $query->param("lname") || 'Annonymous'; 
  107. my $email_address = $query->param("email") || 'Annonymous'; 
  108. my $user_name = $query->param("username") || 'Annonymous'; 
  109. my $password = $query->param("pwd") || 'Annonymous'; 
  110.  
  111.  
  112. # End of Database initial Query
  113. #==========================================
  114.  
  115. print $query->header(), 
  116.       $query->start_html(-title=>'Input Successful'), 
  117.       $query->p('Thanks for registrating your particulars with us!'), 
  118.       $query->p("You Agree? : $agree_field:"),
  119.       $query->p("Your First Name : $first_name"),
  120.       $query->p("Your last Name : $last_name"), 
  121.       $query->p("Your email address: $email_address"), 
  122.       $query->p("Your username : $user_name"), 
  123.       $query->p("Your Password : $password"), 
  124.       $query->end_html; 
  125.  
  126. sub error { 
  127.    print $query->header(), 
  128.          $query->start_html(-title=>'Error'), 
  129.          shift, 
  130.          $query->end_html; 
  131.    exit(0); 
  132.  
  133.  
  134. my $sql = $dbh->prepare(qq{SELECT * FROM user_reg}); 
  135.    $sql->execute(); 
  136.  
  137. while (my @data = $sql->fetchrow_array()) { 
  138.  
  139.       # Print the date from the first two columns in the table 
  140.       #print $data[0], "\t", $data[1], "<br>"; 
  141.        print $data[0], "\t", $data[1], "\t", $data[2], "\t", $data[3], "\t", $data[4], "\t", $data[5], "<br>";  
  142.  
  143. 1;
  144.  
  145.  
  146.  $sql = $dbh->prepare(qq{insert into user_reg(agree_field, first_name, last_name, email_address, user_name, password) values ( "$agree_field", "$first_name", "$last_name", "$email_address", "$user_name", "$password") } );  
  147.    $sql->execute() or die "$dbh->errstr\n";;  
  148.  
  149. $sql = $dbh->prepare(qq{SELECT * FROM user_reg});  
  150.  $sql->execute(); 
  151.  
  152.  
  153. while (my @data = $sql->fetchrow_array()){  
  154.  
  155.       # Print the date from the first four columns in the table  
  156.       print $data[0], "\t", $data[1], "\t", $data[2], "\t", $data[3], "\t", $data[4], "\t", $data[5], "<br>";  
  157.  
  158. }
  159. 1;
  160.  
  161.  
Oct 20 '08 #1
82 10043
numberwhun
3,509 Recognized Expert Moderator Specialist
As far as checking the input information, you won't be able to really prevent "junk" information, but you will instead want to check the format of what has been entered. ie: Check that the email address is in the correct format. Check that where you expected two numbers, two numbers were entered, etc. Check that fields where things were to be selected (either by check boxes, radio buttons or dropdowns), that a selection or selections were made.

For the valid email address, you could do as many sites to and send a verification email that they need to respond to in an appropriate manner to get verified and complete registration.

How you do it is up to you, but it all depends on how anal you want to be about your data.

Regards,

Jeff
Oct 20 '08 #2
KevinADC
4,059 Recognized Expert Specialist
For an email address I recommend you use the Email::Valid module. For the rest of your form fileds its hard to say, only you can define what "preventing junk registration and invalid characters" means to you and your particular requirements.

The general method is to use regular exressions to evaluate the form field data

Expand|Select|Wrap|Line Numbers
  1. if ($data =~ /\W/) {
  2.     $data has at least one non-word character so we consider it bad
  3. }
  4.  
So the first thing you do is determine what your form field data should be then you write some code that tests those assumptions. If a form field should only be digits:

Expand|Select|Wrap|Line Numbers
  1. if ($var =~ /\D/) {
  2.    bad.. it has a non digit somewhere
  3. }
  4. if ($var =~ /^\d+$/) {
  5.    good... digits beginning to end (this is better validation than above)
  6. }
  7.  
Oct 20 '08 #3
eWish
971 Recognized Expert Contributor
I would suggest that you look at CPAN for a module to help you if you are not good with regular expressions.

FormValidator:: Simple
Data::FormValid ator


--Kevin
Oct 20 '08 #4
happyse27
236 New Member
Hi Kevin,

Thanks. Is there any reference site to show what is the details and how to call and interface to the modules you recommended.?


Cheers...
Andrew
Oct 21 '08 #5
KevinADC
4,059 Recognized Expert Specialist
Hi Kevin,

Thanks. Is there any reference site to show what is the details and how to call and interface to the modules you recommended.?


Cheers...
Andrew
Click on the links and read the documentation.
Oct 21 '08 #6
happyse27
236 New Member
Click on the links and read the documentation.
Hi Kevin,

Understand, I read the documentation but still dont understand it.

Is there any step by step reference sites and any examples? Or I just cut and paste certain segment to integrate to my existing scripts. Or I just package it into a module and try to incorporate into perl package manager?

Appreciate your kind enlightenment.


Cheers...
Andrew
Oct 22 '08 #7
happyse27
236 New Member
Hi Kevin / All,

I managed to try out email::valid package to check if the email address is valid from the directed website of your recommendation, but it seemed that the perl package manager always got this error when I tried to install the package.

And html error gave below and the script is pasted below.

Kindly enlighten what can be done...


Cheers...
Andrew

html error
=======
Software error:
Can't locate Email/Valid.pm in @INC (@INC contains: C:/perl/site/lib C:/perl/lib .) at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2.pl line 88.
BEGIN failed--compilation aborted at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2.pl line 88.

For help, please send mail to the webmaster (admin@gateway. 2wire.net), giving this error message and the time and date of the error.


latest perl script(added use email::valid package, see last 2 lines)
=============== =============== ======
Expand|Select|Wrap|Line Numbers
  1.  
  2. #!c:\perl\bin\perl.exe 
  3. #!/usr/bin/perl 
  4. ############################################ 
  5. ##                                        ## 
  6. ##     Account Manager LITE User Signup   ## 
  7. ##          by SiteInteractive.com        ## 
  8. ##    http://siteinteractive.com/contact  ## 
  9. ##                                        ## 
  10. ##             version:  1.09             ## 
  11. ##       last modified:  07/24/2002       ## 
  12. ##        copyright (c) 1998 - 2002       ## 
  13. ##                                        ## 
  14. ##    latest version is available from    ## 
  15. ##        http://SiteInteractive.com      ## 
  16. ##                                        ## 
  17. ############################################ 
  18. # Copyright 1998 Elite Host.  All Rights Reserved. 
  19. # TERMS OF USE  
  20. # 1. Account Manager is for licensed customers 
  21. # only. Customer may use Account Manager as many 
  22. # times as customer wishes, as long as customer owns or runs the web 
  23. # site that Account Manager is installed on.  Account 
  24. # Manager may not under any circumstances be sold 
  25. # or redistributed without the written consent of CGI Script Center and 
  26. # its owner Diran Alemshah. 
  27. # 2. CGI Script Center, at its own discresion, will decide if any terms  
  28. # of the this agreement have been violated by customer. Upon written e- 
  29. # mailed notification to Customer of Terms of Use violations, CGI 
  30. # Script Center may revoke customer's license to use Account Manager. 
  31. # In that event, Customer agrees to any and all of the following: 
  32. # a) Customers found in violation of this agreement, found reselling or 
  33. # redistributing Account Manager, or making  
  34. # Customers Members Area ID and password public to anyone in any  
  35. # manner will forfeit their Members area password and all rights to  
  36. # future versions of Account Manager. 
  37. #  
  38. # b). Customer will no longer be licensed to run any version of  
  39. # Account Manager.  
  40. # Indemnification 
  41. # 1. Customer agrees that it shall defend, indemnify, save and hold 
  42. # CGI Script Center, Elite Web Design and marketing, and any 
  43. # persons affiliated with either company, harmless from any and all 
  44. # demands, liabilities, losses, costs and claims, including reasonable 
  45. # attorney's fees asserted against CGI Script Center, its agents, its 
  46. # customers, officers and employees, that may arise or result from any 
  47. # service provided or performed or agreed to be performed or any product 
  48. # sold by customer, its agents, employees or assigns. Customer agrees to 
  49. # defend, indemnify and hold harmless CGI Script Center, its agents, 
  50. # its cusomters, officers, and employes,against 
  51. # liabilities arising out of; a) any injury to person or property caused 
  52. # by an products sold or  otherwise distributed in connection with CGI 
  53. # Script Center products; (b) any material supplied by customer 
  54. # infringing or allegedly infringing on the proprietary rights of a 
  55. # third party; c) copyright infringement and (d) any defective products 
  56. # sold to customer from CGI Script Center products. 
  57. # This program may not be distributed in whole or part, freely, for pay,  
  58. # or any other form of compensation. 
  59. ##################################################  ############### 
  60. # This version designed for Win32 systems (NT).  If you require 
  61. # a Unix version, please contact cgi@elitehost.com 
  62. ##################################################  ############### 
  63.  
  64.  
  65. ##################################################  ############ 
  66. # EDIT USER CONFIGURATIONS BELOW 
  67. ##################################################  ############ 
  68.  
  69. # apache is in d DRIVE!!! not C
  70.  
  71. #require "d:/program files/apache software foundation/apache2.2/cgi-bin/config.pl"; 
  72.  
  73. # This completes this portion of your Account Manager setup 
  74. ##################################################  ############ 
  75. # DO NOT EDIT BELOW THIS LINE 
  76. ##################################################  ############ 
  77.  
  78. use CGI; 
  79. use CGI::Carp qw(fatalsToBrowser); 
  80. use DBD::mysql;
  81. use DBI;
  82. use Email::Valid;
  83.  
  84.  
  85. my $query = CGI->new; 
  86.  
  87. unless ($CGI::VERSION >= 2.47) {  
  88.    error('Your version of CGI.pm is too old. You must have verison 2.47 or higher to use this script.') 
  89.  
  90.  
  91. #SECTION B
  92. #=========================================
  93. #Database initialization and initial query
  94. my ($dbh, $data_source);  
  95. my $mysql_server_name   = 'localhost';  
  96. my $mysql_database_name = 'test';  
  97. my $mysql_user_name     = 'root';  
  98. my $mysql_password      = 'mysql1';  
  99.  
  100. my $data_source = 'DBI:mysql:' . $mysql_database_name . ':' . $mysql_server_name;  
  101. my $dbh = DBI->connect( $data_source, $mysql_user_name, $mysql_password, {RaiseError=>1}) ||  die "$DBI::errstr";   
  102.  
  103.  
  104.  
  105.  
  106. #important line to pass email address from html to perl
  107. my $agree_field = $query->param("agree") || 'Annonymous'; 
  108. my $first_name = $query->param("fname") || 'Annonymous'; 
  109. my $last_name = $query->param("lname") || 'Annonymous'; 
  110. my $email_address = $query->param("email") || 'Annonymous'; 
  111. my $user_name = $query->param("username") || 'Annonymous'; 
  112. my $password = $query->param("pwd") || 'Annonymous'; 
  113.  
  114.  
  115. # End of Database initial Query
  116. #==========================================
  117.  
  118. print $query->header(), 
  119.       $query->start_html(-title=>'Input Successful'), 
  120.       $query->p('Thanks for registrating your particulars with us!'), 
  121.       $query->p("You Agree? : $agree_field:"),
  122.       $query->p("Your First Name : $first_name"),
  123.       $query->p("Your last Name : $last_name"), 
  124.       $query->p("Your email address: $email_address"), 
  125.       $query->p("Your username : $user_name"), 
  126.       $query->p("Your Password : $password"), 
  127.       $query->end_html; 
  128.  
  129. sub error { 
  130.    print $query->header(), 
  131.          $query->start_html(-title=>'Error'), 
  132.          shift, 
  133.          $query->end_html; 
  134.    exit(0); 
  135.  
  136.  
  137. my $sql = $dbh->prepare(qq{SELECT * FROM user_reg}); 
  138.    $sql->execute(); 
  139.  
  140. while (my @data = $sql->fetchrow_array()) { 
  141.  
  142.       # Print the date from the first two columns in the table 
  143.       #print $data[0], "\t", $data[1], "<br>"; 
  144.        print $data[0], "\t", $data[1], "\t", $data[2], "\t", $data[3], "\t", $data[4], "\t", $data[5], "<br>";  
  145.  
  146. 1;
  147.  
  148.  
  149.  $sql = $dbh->prepare(qq{insert into user_reg(agree_field, first_name, last_name, email_address, user_name, password) values ( "$agree_field", "$first_name", "$last_name", "$email_address", "$user_name", "$password") } );  
  150.    $sql->execute() or die "$dbh->errstr\n";;  
  151.  
  152. $sql = $dbh->prepare(qq{SELECT * FROM user_reg});  
  153.  $sql->execute(); 
  154.  
  155.  
  156. while (my @data = $sql->fetchrow_array()){  
  157.  
  158.       # Print the date from the first four columns in the table  
  159.       print $data[0], "\t", $data[1], "\t", $data[2], "\t", $data[3], "\t", $data[4], "\t", $data[5], "<br>";  
  160.  
  161. }
  162. 1;
  163.  
  164. #Let's see if the email_address conforms to the RFC822 specification
  165. print (Email::Valid->address('$email_address') ? 'yes' : 'no') "<br>";
  166.  
  167.  
Oct 22 '08 #8
KevinADC
4,059 Recognized Expert Specialist
It appears the module is not succesfully installed. And if it was this line will not work:

Expand|Select|Wrap|Line Numbers
  1. Email::Valid->address('$email_address')
Don't put scalars inside of single-quotes, there is no variable interpolation inside of single-quotes. You should almost never quote a scalar unless you are making a new string, better to write it like this:

Expand|Select|Wrap|Line Numbers
  1. Email::Valid->address($email_address)
But you first need to make sure the module is in fact installed.
Oct 22 '08 #9
numberwhun
3,509 Recognized Expert Moderator Specialist
You need to learn to understand the errors that Perl is providing to you. This error is typical of a Perl module not being found in the path that is present in the @INC array.

Regards,

Jeff
Oct 22 '08 #10

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

Similar topics

3
7856
by: Jason Miles | last post by:
Hi, I wrote this little script to check to see if our Lotus Notes servers are running, and from the command line it works fine if I type perl notescheck.pl When I invoke the script from a web page I get an error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
4
3580
by: Craig | last post by:
I have an Access 2000 database that has a table 'tblCourse' and a table 'tblRegistration'. They are linked via a Primary key 'CourseID' in 'tblCourse' to a foreign key 'CourseID' in the tblRegistration, this is a one to many relationship. The Primary key in the tblRegistration is RegistrationID. When I construct a query that has 'CourseID' and then e.g. "CountRegistrationID:
7
14158
by: Perks | last post by:
Hi. I am trying to find out if it is possible to open a pdf file from within PHP, and parse its contents in order to extract all form fieldnames that might have been previously setup within the pdf itself. I want to find this out so that I can then generate a HTML form with all required questions, which when submitted, will generate a fdf / xfdf file, using the techniques from the following tutorial
19
108002
Frinavale
by: Frinavale | last post by:
Filtering user input is extremely important for web programming. If input is left unfiltered users can input malicious code that can cripple your website. This article will explain how to make sure that the user only submits a number to your .NET web application and also demonstrate how to add JavaScript to your ASPX pages. Upon popular demand, I have added a section that also covers how to use a validator control to check if a text box...
6
3320
by: Anshul | last post by:
I want to check through perl whether javascript is enabled or disabled in mozilla browser. If it is disabled I want to display a message to user to enable it. What code can I use please help. I tried "navigator.javaEnabled() but it is in javascript again. If javascript will be disabled so browser can neither read this code even. Thanks
4
2132
by: plumba | last post by:
Let me explain.... I have a form (most of which you guys have helped me with!!). The initial problem I was having is that it was holding the data in the fields after submit, I resolved this by putting the whole form in a set of <div> tags and the form now collapses after they click submit. Perfect!! But, have set some mandatory fields using java, and I need to it validate the these fields before it collapses the form - otherwise it says...
22
6034
by: owlice | last post by:
Greetings! I thought I'd add a little something to a web site, a "tip of the week," and wanted it automated so that if I get hit by a truck (or, more likely, am forgetful), the tip is updated automatically. I learned enough Perl (read: just enough) to code a script that does what I want it to do. Now the question is: how to get it to run automatically. I would like the program to be invoked when someone, anyone, hits my homepage. I...
5
2055
by: patelxxx | last post by:
I have a FORM with allows user to input their name and then user clicks submit which this goes to my .cgi script. Can someone check this .cgi script as the results are not being displayed as expected. My post_it.cgi: #!C:/perl/bin/perl.exe print "Content-type:text/html\n\n"; @values = split(/&/,$ENV{'QUERY_STRING'}); foreach $i(@values) {
1
6850
by: polycom | last post by:
Hi, I am coding a mysql health check script. The logic is to execute the commands (only once)show status,show slave status,show variables and fetch the variable name and value in a hash refer or any other fetch machanism and dynamically use the values to do calculation like the following threhold values($uptime > 10800) && (Handler_read_rnd_next > 4000) && ((100-(((Handler_read_rnd_next + Handler_read_rnd) / (##Handler_read_rnd_next +...
0
8776
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9236
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.