Sponsored Content
Full Discussion: perl and html
Top Forums Shell Programming and Scripting perl and html Post 83856 by cbkihong on Tuesday 20th of September 2005 09:32:04 AM
Old 09-20-2005
Quote:
Originally Posted by marcpascual
print "Content-type: text/html\n\n";
print "<base href=\"https://www.i.ph/signup_check.php\">";
print $content;
And, what are you trying to do with these code, as the <base> exists outside the following content (probably a complete HTML document)?

Quote:
my first problem is "agreement" above is a checkbox, im not sure how to deal with it but i did what is obvious, boolean (ofcourse im wrong, the code isnt working).
This is not a Web development forum. You can find lots of examples about HTML at places like http://www.htmlhelp.com and http://www.w3schools.com. But to ensure the checkbox will always submit a sensible value, I will always include a "value" attribute to the <INPUT type="checkbox">. Of course, there is no single standard to send the value of the checkbox control. What is more important is that the POST form you submit matches the way the form is parsed at the server side (probably PHP in your case). Your PHP may not need the value if it just checks whether the "agreement" parameter exists (i.e. isset($_POST['agreement'])) without regard to its value, or it may actually expect some value as second validation. Likewise I can't tell without seeing how your server is going to process this.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl: Variable input via HTML

I am completely new to perl and am just going over the tutorials right now. What I am trying to attempt is to take the input from the HTML (in a form) and use those variables in a perl script. I've looked everywhere for a simple example on how to do this and cannot find it or do not understand... (5 Replies)
Discussion started by: douknownam
5 Replies

2. Shell Programming and Scripting

HTML parsing by PERL

i have a HTML report file..its in attachment(a part of the whole report is attached..name "input html.doc").also its source is attached in "report source code.txt" i just want to seperate the datas like in first line it should be.. NHTEST-3848498958-NHTEST-10.2-no-baloo a and so on for whole... (3 Replies)
Discussion started by: avik1983
3 Replies

3. Shell Programming and Scripting

Perl + Korn + HTML

I have a perl script that prints up the html code and executes a few korn scripts to populate the web code. Disclaimer === I can throw together some korn scripts pretty quick. This code changes pretty frequently. I don't know enough about perl to do everything I need. One day maybe I'll get... (4 Replies)
Discussion started by: i9300
4 Replies

4. Shell Programming and Scripting

Converting html to pdf perl

Hi All, I have a requirement of converting an html form into pdf using perl. The html form contains images, tables and css implementation. I tried using various perl modules but failed to achive the target. I succeeded in generating a pdf from the html file using... (2 Replies)
Discussion started by: DILEEP410
2 Replies

5. Shell Programming and Scripting

How to put html frames in for loop in perl?

Hi, I have to insert html frames in for loop. Here is the code. for($k=0;$k<3;$k++) { print<<HTML; <html> <head> <title> HTML Horizontal Frames </title> </head> <frameset cols="25%,75%"> <frame src="a.html"> <frame src="b.html"> </frameset> (0 Replies)
Discussion started by: vanitham
0 Replies

6. Shell Programming and Scripting

HTML Encoded characters -- Perl

Hello all I have a string like " Have Fun for the rest of the day !. I will meet you tomorrow!" ! is the HTML Equivalent of ! symbol. From the above string, i would like to remove only the HTML encoded special characters. Output should be like " Have Fun for the rest of the day... (4 Replies)
Discussion started by: vasuarjula
4 Replies

7. Shell Programming and Scripting

Embedding HTML in Perl script

My webpage is hosted from perlscript(homepage.pl), i want to add piece of html code in the footer of the homepage. I simply pasted the html code at the end of the perl script as below... ======================================================== close(OUTSQL); ... (4 Replies)
Discussion started by: paventhan
4 Replies

8. UNIX for Dummies Questions & Answers

Writing an HTML file in perl

I'm writing a perl script that writes an html file. use Tie::File; my ($dir) = @ARGV; open (HTML,">","$dir/file.html") || die $!; #-----Building HTML file--------------------------- print HTML "<!DOCTYPE html> <html> <head> <title>Output</title> <link... (3 Replies)
Discussion started by: jrymer
3 Replies

9. Shell Programming and Scripting

Editing path in a HTML file using Perl

Hello I want to replace the path to which a hyperlink points to. I have a html file <TABLE BORDER CELLPADDING=7, border=0><TR><td>Jun-10-2013_03_19_07_AM</td><td>Ank_Insert_1</td><td><b>FAILED: 1</b></td><td><A ... (14 Replies)
Discussion started by: ankurk
14 Replies
GET(1)							User Contributed Perl Documentation						    GET(1)

NAME
lwp-request, GET, HEAD, POST - Simple WWW user agent SYNOPSIS
lwp-request [-aeEdvhx] [-m method] [-b <base URL>] [-t <timeout>] [-i <if-modified-since>] [-c <content-type>] [-C <credentials>] [-p <proxy-url>] [-o <format>] <url>... DESCRIPTION
This program can be used to send requests to WWW servers and your local file system. The request content for POST and PUT methods is read from stdin. The content of the response is printed on stdout. Error messages are printed on stderr. The program returns a status value indicating the number of URLs that failed. The options are: -m <method> Set which method to use for the request. If this option is not used, then the method is derived from the name of the program. -f Force request through, even if the program believes that the method is illegal. The server might reject the request eventually. -b <uri> This URI will be used as the base URI for resolving all relative URIs given as argument. -t <timeout> Set the timeout value for the requests. The timeout is the amount of time that the program will wait for a response from the remote server before it fails. The default unit for the timeout value is seconds. You might append "m" or "h" to the timeout value to make it minutes or hours, respectively. The default timeout is '3m', i.e. 3 minutes. -i <time> Set the If-Modified-Since header in the request. If time it the name of a file, use the modification timestamp for this file. If time is not a file, it is parsed as a literal date. Take a look at HTTP::Date for recogniced formats. -c <content-type> Set the Content-Type for the request. This option is only allowed for requests that take a content, i.e. POST and PUT. You can force methods to take content by using the "-f" option together with "-c". The default Content-Type for POST is "applica- tion/x-www-form-urlencoded". The default Content-type for the others is "text/plain". -p <proxy-url> Set the proxy to be used for the requests. The program also loads proxy settings from the environment. You can disable this with the "-P" option. -H <header> Send this HTTP header with each request. You can specify several, e.g.: lwp-request -H 'Referer: http://other.url/' -H 'Host: somehost' http://this.url/ -C <username>:<password> Provide credentials for documents that are protected by Basic Authentication. If the document is protected and you did not specify the username and password with this option, then you will be prompted to provide these values. The following options controls what is displayed by the program: -u Print request method and absolute URL as requests are made. -U Print request headers in addition to request method and absolute URL. -s Print response status code. This option is always on for HEAD requests. -S Print response status chain. This shows redirect and autorization requests that are handled by the library. -e Print response headers. This option is always on for HEAD requests. -d Do not print the content of the response. -o <format> Process HTML content in various ways before printing it. If the content type of the response is not HTML, then this option has no effect. The legal format values are; text, ps, links, html and dump. If you specify the text format then the HTML will be formatted as plain latin1 text. If you specify the ps format then it will be for- matted as Postscript. The links format will output all links found in the HTML document. Relative links will be expanded to absolute ones. The html format will reformat the HTML code and the dump format will just dump the HTML syntax tree. -v Print the version number of the program and quit. -h Print usage message and quit. -x Extra debugging output. -a Set text(ascii) mode for content input and output. If this option is not used, content input and output is done in binary mode. Because this program is implemented using the LWP library, it will only support the protocols that LWP supports. SEE ALSO
lwp-mirror, LWP COPYRIGHT
Copyright 1995-1999 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Gisle Aas <gisle@aas.no> libwww-perl-5.65 2003-01-27 GET(1)
All times are GMT -4. The time now is 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy