473,756 Members | 8,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to prompt user that registration field is wrong or keyed in

236 New Member
Hi All,

In perl script(item b below) where we check if html registration form are filled in properly without blank with the necessary fields, how to prompt users that the field are incomplete or blank and then go back to main page(item a below user registration html page) always, something like goggle or msn login page function...


Thanks and Best Rgds,
Andrew

a) script called from user registration 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-if.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.  
  53.  
b) account management perl script(probably need to focus on if statement below)
----------------------------------------------------
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. use Email::Valid;
  82.  
  83.  
  84. my $query = CGI->new; 
  85.  
  86. unless ($CGI::VERSION >= 2.47) {  
  87.    error('Your version of CGI.pm is too old. You must have verison 2.47 or higher to use this script.') 
  88.  
  89.  
  90. #SECTION B
  91. #=========================================
  92. #Database initialization and initial query
  93. my ($dbh, $data_source);  
  94. my $mysql_server_name   = 'localhost';  
  95. my $mysql_database_name = 'test';  
  96. my $mysql_user_name     = 'root';  
  97. my $mysql_password      = 'mysql1';  
  98.  
  99. my $data_source = 'DBI:mysql:' . $mysql_database_name . ':' . $mysql_server_name;  
  100. my $dbh = DBI->connect( $data_source, $mysql_user_name, $mysql_password, {RaiseError=>1}) ||  die "$DBI::errstr";   
  101.  
  102.  
  103.  
  104.  
  105. #important line to pass email address from html to perl
  106. my $agree_field = $query->param("agree") || 'Annonymous'; 
  107. my $first_name = $query->param("fname") || 'Annonymous'; 
  108. my $last_name = $query->param("lname") || 'Annonymous'; 
  109. my $email_address = $query->param("email") || 'Annonymous'; 
  110. my $user_name = $query->param("username") || 'Annonymous'; 
  111. my $password = $query->param("pwd") || 'Annonymous'; 
  112.  
  113.  
  114. #Newly added 14th nov 08
  115. if ($agree_field == Annonymous)
  116. {
  117.    print $query->header(), 
  118.       $query->start_html(-title=>'annonymous'), 
  119.       $query->p('Please kindly agree to the terms and condition below!'), 
  120.       $query->p("You Agree? : $agree_field:"),
  121.       $query->end_html;
  122. }
  123. elsif ($agree_field != Annonymous)
  124. {
  125.      $query->start_html(-title=>'annonymous'), 
  126.       $query->p('Please kindly agree to the terms and condition below!'), 
  127.       $query->p("You Agree? : $agree_field:"),
  128.       $query->end_html;
  129. }
  130.  
  131.  
  132.  
  133.  
  134. # End of Database initial Query
  135. #==========================================
  136.  
  137. print $query->header(), 
  138.       $query->start_html(-title=>'Input Successful'), 
  139.       $query->p('Thanks for registrating your particulars with us!'), 
  140.       $query->p("You Agree? : $agree_field:"),
  141.       $query->p("Your First Name : $first_name"),
  142.       $query->p("Your last Name : $last_name"), 
  143.       $query->p("Your email address: $email_address"), 
  144.       $query->p("Your username : $user_name"), 
  145.       $query->p("Your Password : $password"), 
  146.       $query->end_html; 
  147.  
  148. sub error { 
  149.    print $query->header(), 
  150.          $query->start_html(-title=>'Error'), 
  151.          shift, 
  152.          $query->end_html; 
  153.    exit(0); 
  154.  
  155.  
  156.  
  157. my $sql = $dbh->prepare(qq{SELECT * FROM user_reg}); 
  158.    $sql->execute(); 
  159.  
  160. while (my @data = $sql->fetchrow_array()) { 
  161.  
  162.       # Print the date from the first two columns in the table 
  163.       #print $data[0], "\t", $data[1], "<br>"; 
  164.        print $data[0], "\t", $data[1], "\t", $data[2], "\t", $data[3], "\t", $data[4], "\t", $data[5], "<br>";  
  165.  
  166. 1;
  167.  
  168.  
  169.  $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") } );  
  170.    $sql->execute() or die "$dbh->errstr\n";;  
  171.  
  172. $sql = $dbh->prepare(qq{SELECT * FROM user_reg});  
  173.  $sql->execute(); 
  174.  
  175.  
  176. while (my @data = $sql->fetchrow_array()){  
  177.  
  178.       # Print the date from the first four columns in the table  
  179.       print $data[0], "\t", $data[1], "\t", $data[2], "\t", $data[3], "\t", $data[4], "\t", $data[5], "<br>";  
  180.  
  181. }
  182. 1;
  183.  
  184. #Let's see if the email_address conforms to the RFC822 specification
  185. print (Email::Valid->address($email_address) ? 'yes' : 'no');
  186.  
  187.  
  188.  
  189.  
Nov 14 '08 #1
9 4242
Icecrack
174 Recognized Expert New Member
The answer you are looking for is in Javascript, you may do it in perl but it takes time and processing power (even if its little)

and i don't see where you are checking if all the fields are entered in your code part b.
Nov 19 '08 #2
happyse27
236 New Member
Hi Sirs,

Thanks for big help. I found this website and made modifications and it works.

Instead of using html, just use .pl scripts to generate html and having conditions to generate same login page... Time for expansion on this module... Cheers...

Cheers...
http://www.extropia.co m/tutorials/perl_cgi/form_processor. html

Thanks and Best Rgds,
Andrew
Expand|Select|Wrap|Line Numbers
  1. #!c:/perl/bin/perl.exe
  2.  
  3. #!/usr/local/bin/perl
  4.  
  5.  
  6. print "Content-type: text/html\n\n";
  7. print qq!
  8.   <HTML>
  9.   <HEAD>
  10.   <TITLE>Testing Form Input</TITLE>
  11.   </HEAD>
  12.   <BODY>
  13.   <FORM METHOD = "POST" ACTION = "fp.cgi">
  14.   <CENTER>
  15.   <TABLE BORDER = "1">
  16.   <TR>
  17.   <TH>First Name</TH>
  18.   <TD><INPUT TYPE = "text"
  19.                 NAME = "f_name"></TD>
  20.   </TR>
  21.  
  22.   <TR>
  23.   <TH>Last Name</TH>
  24.   <TD><INPUT TYPE = "text"
  25.                 NAME = "l_name"></TD>
  26.   </TR>
  27.  
  28.   <TR>
  29.   <TH>Email</TH>
  30.   <TD><INPUT TYPE = "text"
  31.                 NAME = "email"></TD>
  32.   </TR>
  33.  
  34.   </TABLE>
  35.   <P>
  36.   <INPUT TYPE = "SUBMIT">
  37.   </CENTER>
  38.   </FORM>
  39.   </BODY>
  40.   </HTML>!;
  41.  
  42.  
Nov 20 '08 #3
happyse27
236 New Member
Hi all,

I was working on this perl codes(see section b below) to create html user registration page...

But the first 3 rows first name to email address is highlighted yellow, so is the mobile_no, the Office phone, office phone 2 and house no. The rest are all white, not sure where in the code below indicates yellow or white?

And the code did not show red(helvetica) font in the row as it is(see section a below)

Section a
===========
Expand|Select|Wrap|Line Numbers
  1.  
  2.   <TR>
  3.   <TH>First Name *</TH>
  4.   <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B><INPUT TYPE = "text"
  5.                 NAME = "f_name"></B></FONT></TD>
  6.   </TR>
  7.  
  8.  
Section b - Total Code
=============== ==
Expand|Select|Wrap|Line Numbers
  1.  
  2.   <HTML>
  3.   <HEAD>
  4.   <TITLE>Testing Form Input</TITLE>
  5.   </HEAD>
  6.   <BODY>
  7.   <FORM METHOD = "POST" ACTION = "fp.cgi">
  8.   <CENTER>
  9.   <TABLE BORDER = "1">
  10.  
  11.   <TR>
  12. <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>Customer Information</B></FONT><BR><FONT
  13. SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FF0000"><B>Fields marked 
  14. with an asterisk<BR>are required input fields.</B></FONT><BR><BR></TD></TR>
  15.  
  16.  
  17.  
  18.   <TR>
  19.   <TH>First Name *</TH>
  20.   <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B><INPUT TYPE = "text"
  21.                 NAME = "f_name"></B></FONT></TD>
  22.   </TR>
  23.  
  24.   <TR>
  25.   <TH>Last Name *</TH>
  26.   <TD><INPUT TYPE = "text"
  27.                 NAME = "l_name"></TD>
  28.   </TR>
  29.  
  30.   <TR>
  31.   <TH>Email Address *</TH>
  32.   <TD><INPUT TYPE = "text"
  33.                 NAME = "Email_Address"></TD>
  34.   </TR>
  35.  
  36.   <TR>
  37.   <TH>Username</TH>
  38.   <TD><INPUT TYPE = "text"
  39.                 NAME = "Username"></TD>
  40.   </TR>
  41.  
  42.   <TR>
  43.   <TH>Password *</TH>
  44.   <TD><INPUT TYPE = "text"
  45.                 NAME = "Password"></TD>
  46.   </TR>
  47.  
  48.   <TR>
  49.   <TH>Confirm Password *</TH>
  50.   <TD><INPUT TYPE = "text"
  51.                 NAME = "Confirm_Password"></TD>
  52.   </TR>
  53.  
  54.   <TR>
  55.   <TH>Mobile Phone</TH>
  56.   <TD><INPUT TYPE = "text"
  57.                 NAME = "Mobile_Phone"></TD>
  58.   </TR>
  59.  
  60.   <TR>
  61.   <TH>Company Name</TH>
  62.   <TD><INPUT TYPE = "text"
  63.                 NAME = "Company_Name"></TD>
  64.   </TR>
  65.  
  66.   <TR>
  67.   <TH>Office Phone</TH>
  68.   <TD><INPUT TYPE = "text"
  69.                 NAME = "Office_Phone"></TD>
  70.   </TR>
  71.  
  72.   <TR>
  73.   <TH>Office Phone 2</TH>
  74.   <TD><INPUT TYPE = "text"
  75.                 NAME = "Office_Phone_2"></TD>
  76.   </TR>
  77.  
  78.   <TR>
  79.   <TH>House Phone</TH>
  80.   <TD><INPUT TYPE = "text"
  81.                 NAME = "House_Phone"></TD>
  82.   </TR>
  83.  
  84.   <TR>
  85.   <TH>Fax No.</TH>
  86.   <TD><INPUT TYPE = "text"
  87.                 NAME = "Fax_No"></TD>
  88.   </TR>
  89.  
  90.   <TR>
  91.   <TH>Address</TH>
  92.   <TD><INPUT TYPE = "text"
  93.                 NAME = "Address"></TD>
  94.   </TR>
  95.  
  96.   <TR>
  97.   <TH>Office_Address</TH>
  98.   <TD><INPUT TYPE = "text"
  99.                 NAME = "Office_Address"></TD>
  100.   </TR>
  101.  
  102.   <TR>
  103.   <TH>Mailing Address (Please ignore if it is same as home address or office address</TH>
  104.   <TD><INPUT TYPE = "text"
  105.                 NAME = "Mailing_Address"></TD>
  106.   </TR>
  107.  
  108.   <TR>
  109.   <TH>Company Card Verify?</TH>
  110.   <TD><INPUT TYPE = "text"
  111.                 NAME = "CNV"></TD>
  112.   </TR>
  113.  
  114.  
  115.   <TR>
  116.   <TD><INPUT TYPE="CHECKBOX" NAME="agree" VALUE="agree"></TD>
  117.   <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>I agree to the Terms 
  118.   and Conditions above.</B></FONT></TD></TR></TABLE><BR></TD>
  119.   </TR>
  120.  
  121.  
  122.   </TABLE>
  123.   <P>
  124.   <INPUT TYPE = "SUBMIT">
  125.   </CENTER>
  126.   </FORM>
  127.   </BODY>
  128.   </HTML>
  129.  
Nov 21 '08 #4
Icecrack
174 Recognized Expert New Member
I had the same thing happen to me on now most of my projects,

simple answer its google desktop.

and for the red font you must post this in HTML / CSS,
Nov 23 '08 #5
happyse27
236 New Member
Hi all,

I tried to do 1 thing, that is to put a html rectangle shape to redirect to another webpage when i print the html output below.... But it gives me error below...



Error
-------
Software error:
syntax error at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2-if.pl line 405, near "$query"
syntax error at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2-if.pl line 405, near "396px"
syntax error at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2-if.pl line 405, near "169px"
syntax error at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2-if.pl line 405, near "150px"
syntax error at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2-if.pl line 405, near "31px"
Not enough arguments for index at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2-if.pl line 405, near "index:"
syntax error at D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2-if.pl line 405, near "index:"
Execution of D:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/acctman2-if.pl aborted due to compilation errors.

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


Expand|Select|Wrap|Line Numbers
  1.  
  2. # End of Database initial Query
  3. #==========================================
  4.  
  5.  
  6. print "<HTML>";
  7. print "<BODY>";
  8. print "<FORM>";
  9. print "<CENTER>";
  10. print "<table border='3' CELLPADDING='5' WIDTH='270' BGCOLOR='#FF8000'>";
  11. print "<tr>";
  12.  
  13. print $query->header(), 
  14.       $query->start_html(-title=>'Input Successful'), 
  15.       $query->p('Thanks for registrating your particulars with us!'), 
  16.       $query->p("You Agree? : agree_field:"),
  17.       $query->p("Your First Name : $first_name"),
  18.       $query->p("Your Last Name : $last_name"), 
  19.       $query->p("Your Email Address: $email_address"), 
  20.       $query->p("Your Username : $user_name"), 
  21.       $query->p("Your Mobile Phone : $mobile_phone"),
  22.       $query->p("Your Company Name : $company_name  "), 
  23.       $query->p("Your Office Phone : $office_phone"),
  24.       $query->p("Your Office Phone 2 : $office_phone2"),
  25.       $query->p("Your House Number : $house_number"),
  26.       $query->p("Your Fax Number : $fax_number"),
  27.       $query->p("Your House Address : $house_address"),
  28.       $query->p("Your Office Address : $office_address"),
  29.       $query->p("Your Mailing Address : $mailing_address"),
  30.       $query->p("Your Certify : $certify"),
  31.       $query->p("Your MonthNum : $MonthNum"),
  32.       $query->p("Your MonthA : $MonthA"),
  33.       $query->p("Your Year : $Year"),
  34.       $query->p("Your Month : $Month"),
  35.       $query->p("Your Day : $Day"),
  36. $query->p("<body bgcolor="#FFFFFF" text="#000000">"),
  37. $query->p("<div id="bv_Shape1" style="position:absolute;left:396px;top:169px;width:150px;height:31px;z-index:0" align="center">"),
  38. $query->p("<a href="http://127.0.0.1/cgi-bin/cards2.pl"><img src="bv01016.gif" id="Shape1" align="top" alt="" title="" border="0" width="150" height="31"></a></div>"),
  39.  
  40.  
  41.       $query->end_html; 
  42.  
  43.  
  44.  
  45. print "</tr></table>";
  46. print "</CENTER>";
  47. print "</FORM>";
  48. print "</BODY>";
  49. print "</HTML>";
  50.  
  51.  
  52. sub error { 
  53.    print $query->header(), 
  54.          $query->start_html(-title=>'Error'), 
  55.          shift, 
  56.          $query->end_html; 
  57.    exit(0); 
  58.  
  59.  
Dec 23 '08 #6
KevinADC
4,059 Recognized Expert Specialist
these lines appear to be the problem:

Expand|Select|Wrap|Line Numbers
  1. $query->p("<body bgcolor="#FFFFFF" text="#000000">"),
  2. $query->p("<div id="bv_Shape1" style="position:absolute;left:396px;top:169px;width:150px;height:31px;z-index:0" align="center">"),
  3. $query->p("<a href="http://127.0.0.1/cgi-bin/cards2.pl"><img src="bv01016.gif" id="Shape1" align="top" alt="" title="" border="0" width="150" height="31"></a></div>"),
  4.  
  5.  
You have double-quotes inside of double-quoted strings. Example:

Expand|Select|Wrap|Line Numbers
  1. $query->p("<body bgcolor="#FFFFFF" text="#000000">"),
  2.  
Could be written as:

Expand|Select|Wrap|Line Numbers
  1. $query->p(qq{<body bgcolor="#FFFFFF" text="#000000">}),
  2.  
Same with the other lines
Dec 23 '08 #7
happyse27
236 New Member
Hi All,

I think the above example is wrong... I tried below new example with
Expand|Select|Wrap|Line Numbers
  1. $query->start_html(-title=>'Input Successful', -head=>Link({-rel=>'next',
  2.                           -href=>'http://127.0.0.1/cgi-bin/cards2.pl'})
  3.  
),
... But it does not give me any button to click. And on the webpage it only showed this message
"noStatus: 302 Found Location: http://127.0.0.1/cgi-bin/cards2.pl "

Code is below... Kindly assist... thanks...

I am just trying to insert this code or equivalent as an html shape into the main perl script... Thanks in advance.
Expand|Select|Wrap|Line Numbers
  1.   <body bgcolor="#FFFFFF" text="#000000">
  2. <div id="bv_Shape1" style="position:absolute;left:396px;top:169px;width:150px;height:31px;z-index:0" align="center">
  3. <a href="http://127.0.0.1/cgi-bin/cards2.pl"><img src="bv01016.gif" id="Shape1" align="top" alt="" title="" border="0" width="150" height="31"></a></div>
  4.  
Andrew


Expand|Select|Wrap|Line Numbers
  1.  
  2. print $query->header(), 
  3.       $query->start_html(-title=>'Input Successful', -head=>Link({-rel=>'next',
  4.                           -href=>'http://127.0.0.1/cgi-bin/cards2.pl'})
  5.                          ),
  6.  
  7.  
  8.       $query->p('Thanks for registrating your particulars with us!'), 
  9.  
  10.       $query->p("You Agree? : agree_field:"),
  11.       $query->p("Your First Name : $first_name"),
  12.       $query->p("Your Last Name : $last_name"), 
  13.       $query->p("Your Email Address: $email_address"), 
  14.       $query->p("Your Username : $user_name"), 
  15.       $query->p("Your Mobile Phone : $mobile_phone"),
  16.       $query->p("Your Company Name : $company_name  "), 
  17.       $query->p("Your Office Phone : $office_phone"),
  18.       $query->p("Your Office Phone 2 : $office_phone2"),
  19.       $query->p("Your House Number : $house_number"),
  20.       $query->p("Your Fax Number : $fax_number"),
  21.       $query->p("Your House Address : $house_address"),
  22.       $query->p("Your Office Address : $office_address"),
  23.       $query->p("Your Mailing Address : $mailing_address"),
  24.       $query->p("Your Certify : $certify"),
  25.       $query->p("Your MonthNum : $MonthNum"),
  26.       $query->p("Your MonthA : $MonthA"),
  27.       $query->p("Your Year : $Year"),
  28.       $query->p("Your Month : $Month"),
  29.       $query->p("Your Day : $Day"),
  30.  
  31.       $query->end_html; 
  32.  
  33.  
  34.  
Dec 23 '08 #8
happyse27
236 New Member
Hihi Kevin,

Thanks! your code worked!! Sorry I missed out your reply, saw it in the nick of time

I modified to below and it worked... But I am trying to find out the one in comments worked or not?

#$query->start_html(-title=>'Input Successful', -head=>Link({-rel=>'next',

-href=>'http://127.0.0.1/cgi-bin/cards2.pl'})),


Thanks and Best Rgds,
Andrew

Expand|Select|Wrap|Line Numbers
  1. print $query->header(), 
  2.       #$query->start_html(-title=>'Input Successful', -head=>Link({-rel=>'next', 
  3.  
  4. -href=>'http://127.0.0.1/cgi-bin/cards2.pl'})),
  5.  
  6.       $query->start_html(-title=>'Input Successful'),
  7.       $query->p('Thanks for registrating your particulars with us!'), 
  8.  
  9.       $query->p("You Agree? : agree_field:"),
  10.       $query->p("Your First Name : $first_name"),
  11.       $query->p("Your Last Name : $last_name"), 
  12.       $query->p("Your Email Address: $email_address"), 
  13.       $query->p("Your Username : $user_name"), 
  14.       $query->p("Your Mobile Phone : $mobile_phone"),
  15.       $query->p("Your Company Name : $company_name  "), 
  16.       $query->p("Your Office Phone : $office_phone"),
  17.       $query->p("Your Office Phone 2 : $office_phone2"),
  18.       $query->p("Your House Number : $house_number"),
  19.       $query->p("Your Fax Number : $fax_number"),
  20.       $query->p("Your House Address : $house_address"),
  21.       $query->p("Your Office Address : $office_address"),
  22.       $query->p("Your Mailing Address : $mailing_address"),
  23.       $query->p("Your Certify : $certify"),
  24.       $query->p("Your MonthNum : $MonthNum"),
  25.       $query->p("Your MonthA : $MonthA"),
  26.       $query->p("Your Year : $Year"),
  27.       $query->p("Your Month : $Month"),
  28.       $query->p("Your Day : $Day"),
  29.       $query->p(qq{<body bgcolor="#FFFFFF" text="#000000">}), 
  30. $query->p(qq{<div id="bv_Shape1" 
  31.  
  32. style="position:absolute;left:396px;top:169px;width:150px;height:31px;z-index:0" 
  33.  
  34. align="center">}), 
  35. $query->p(qq{<a href="http://127.0.0.1/cgi-bin/cards2.pl"><img src="bv01016.gif" 
  36.  
  37. id="Shape1" align="top" alt="" title="" border="0" width="150" height="31"></a></div>}), 
  38.  
  39.  
  40.       $query->end_html; 
  41.  
Dec 23 '08 #9
KevinADC
4,059 Recognized Expert Specialist
Sorry, I don't even know what the Link attribute is used for. I suspect its something left over from older versions of HTML but I'm not sure. What do you think it should do?

Edit....

OK, I just remembered what Link is for. I don't think you can use it to link to another perl script though. So once again, what is your intention and what do you think it should do?
Dec 23 '08 #10

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

Similar topics

2
2419
by: migue | last post by:
way below newbie level: I know nothing about .Net. Have a VB6 client-server application (business app, inventory, purchasing, invoicing, etc.) and am considering converting it to VB.Net at a customer's request. The goal is to have access to the application from remote locations without the need to install anything on the client. Question 1: How will the user's desktop experience change using .Net vs. VB? i.e. will
6
14596
by: Paul Deverson | last post by:
I'm a newbie to MySQL and am really confused about when I should be using the Command Line Client and when the DOS prompt. I'm using Windows XP and I've just installed MySQL 4.1.10. I can use the Command Line Client to logon as 'root'. It prompts me for a password and then I can create databases, etc. from the mysql prompt. However, if I wanted to logon as a different user, I'm not sure how to do it.
7
19315
by: Petesman | last post by:
I am trying to make a prompt that will ask the user for some input... If I just use var input = prompt("dafa") everything works fine but the box is put in the top left corner of the window. I need it to be centered so... I was doing some research on the net (never really used much JavaScript before) and was reading the only way to do this is by making your own custom prompt. In my attempts of doing so I came up with this code below. The...
4
1917
by: R Bolling | last post by:
Hi, I have a table where two fields will make up the primary key. In a few cases the second field will be blank. When I try to append the existing data into the keyed table I get the message that it cannot append a null value into the keyed field. Is there any way to set this up to allow the nulls in that second field? Thanks for any assistnace with this.
2
1396
by: brucedodds | last post by:
This post is for senior developers. I'm an Access contractor. This morning I see a listing for a position that seems to require development of a self-modifying database. The application may need to provide an interface for the user to add fields and possibly tables on the fly, with automated form and report modification and generation. I have never done this. While I have worked on projects where this might have been useful, it has...
2
1356
by: James G via AccessMonster.com | last post by:
Hi I have a textbox (Final Flat) that contains a default value of zero. The other 2 textboxes (Final rate and Final Minimum) always have a numeric value in them. What i want to do is this......whenever the (Final Flat) is keyed in, then delete the values in the Final Rate and Final Minimum...........how would i go about doing this?......thank you! --
1
2375
by: Chris | last post by:
novice question here... I am building a registration form while learning Asp.Net. I am having trouble passing data between "dynamically"-added server controls. To simplify, I have a single Registration.aspx page that contains 2 panels. Each panel is loaded with a user control during Page_Load(): protected Panel panel1; protected Panel panel2;
3
2273
by: Steven | last post by:
I am using VC++ 6.0 to build a windows based application, however, my application allows user to input command arguments in the dos prompt windows. I want to have a warning message for user if they have input the wrong arguments. How can I write text to the dos prompt windows if user input the wrong arguments? Thanks in advance. Steven.
3
6224
by: satishknight | last post by:
Hi, Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
0
9456
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
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,...
1
9846
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
9713
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
8713
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
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
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.