<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Herself&#039;s Webtools &#187; cgi</title>
	<atom:link href="http://herselfswebtools.com/category/cgi/feed" rel="self" type="application/rss+xml" />
	<link>http://herselfswebtools.com</link>
	<description>Scripts, HowTos, Templates, Plugins, Widgets, Tips</description>
	<lastBuildDate>Fri, 18 Nov 2011 15:47:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to convert your old Perl-CGI scripts to work in your blog using PHP</title>
		<link>http://herselfswebtools.com/2008/06/how-to-convert-your-old-perl-cgi-scripts-to-work-in-your-blog-using-php.html</link>
		<comments>http://herselfswebtools.com/2008/06/how-to-convert-your-old-perl-cgi-scripts-to-work-in-your-blog-using-php.html#comments</comments>
		<pubDate>Mon, 23 Jun 2008 10:00:40 +0000</pubDate>
		<dc:creator>Linda MacPhee-Cobb</dc:creator>
				<category><![CDATA[cgi]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://herselfswebtools.com/?p=240</guid>
		<description><![CDATA[The original TimesToCome site was created in 1997. The web has changed a great deal since then but my scripts hadn&#8217;t. I just hacked my blogs to use the PERL scripts. Converting them to work in your blog without using PERL or CGI is actually quite simple. The first thing to do is convert your [...]]]></description>
			<content:encoded><![CDATA[<p>The original <a href="http://timestocome.com">TimesToCome site</a> was created in 1997.  The web has changed a great deal since then but my scripts hadn&#8217;t.  I just hacked my blogs to use the PERL scripts.  Converting them to work in your blog without using PERL or CGI is actually quite simple.</p>
<p>The first thing to do is convert your old CGI scripts to PHP. Your forms will remain the same except for the name of the script they are calling. ( &lt;form method=&#8221;post&#8221; action=&#8221;new-script-url&#8221;&gt; )  I found that <a href="http://www.evolt.org/article/User_Friendly_Forms_in_PHP/20/60144/index.html">User Friendly Forms in PHP</a>, and <a href="http://www.onlamp.com/pub/a/php/2004/08/26/PHPformhandling.html">PHP Form Handling</a> gave me enough information to convert the forms from PERL to PHP.  Most of what works in PERL, works in PHP, you&#8217;ll find very little needs to be changed. ( <a href="http://www.amazon.com/gp/search?ie=UTF8&amp;keywords=1932111093&amp;tag=tim01-20&amp;index=blended&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">&#8216;PHP Black Book&#8217;</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=tim01-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> is the best book I&#8217;ve found so far. )</p>
<p>Once  you have a working PHP form you need to incorporate it into your blog.  To do this you need to create a page template.  The easiest way is to copy an existing page template in your theme.  The archives.php page usually works well.</p>
<p>Remove the archives information from the page.  I deleted everything after &lt;div id=&#8221;content&#8221; class=&#8221;pages&#8221;&gt; down to the matching &lt;/div&gt; tag for that division.  Your template may be slightly different.</p>
<p>Now copy and paste your PHP form &#8211; everything between &lt;body&gt; and &lt;/body&gt; into that space between &lt;div id=&#8221;content&#8221; class=&#8221;pages&#8221;&gt; and &lt;/div&gt;.</p>
<p>Rename the page to something useful, and don&#8217;t forget to change the &#8216;Template Name: xxxx &#8216; in the template.</p>
<p>Now log into your WordPress or other blog.  Create a new page, name it something useful.  Then go to the templated drop down menu (&#8216;Templates&#8217;) and select your newly created template from the menu.  Save and publish.</p>
<p>If you wish to use multiple pages for your form just create multiple pages.  If you wish it to reload the same page when the script runs, call yourself in the action= and place a hidden check that lets you know if this page is being loaded or if the form is filled out and submitted.</p>
<p>Put the hidden check if form submitted in the form:</p>
<p>&lt;input type=&#8221;hidden&#8221; name=&#8221;submit_check&#8221; value=&#8221;1&#8243; /&gt;</p>
<p>The check for it in the part of the form you do your calculations:<br />
if ($_POST['submit_check'] == 1 ) { /*do something*/ }</p>
<p>See example: <a href="http://herselfsrecipes.com/calorie-calculator">Calorie calculator</a><br />
Download example: <a href="/files/calories.txt">Calories example php form in a WP blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://herselfswebtools.com/2008/06/how-to-convert-your-old-perl-cgi-scripts-to-work-in-your-blog-using-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CGI &amp; PERL</title>
		<link>http://herselfswebtools.com/2007/03/cgi-perl.html</link>
		<comments>http://herselfswebtools.com/2007/03/cgi-perl.html#comments</comments>
		<pubDate>Tue, 13 Mar 2007 12:00:00 +0000</pubDate>
		<dc:creator>Linda MacPhee-Cobb</dc:creator>
				<category><![CDATA[cgi]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[useful sites]]></category>

		<guid isPermaLink="false">http://timestocome.org/webtools/2007/03/cgi-perl.html</guid>
		<description><![CDATA[I found CGI to be quite confusing to begin. I had thought CGI was a language. CGI (Common Gateway Interface) is a way for information to get passed to and from webpages from computer programs. You may use any computer language. Usually C or PERL is used. You need CGI permission from your web hosting [...]]]></description>
			<content:encoded><![CDATA[<p>I found CGI to be quite confusing to begin.  I had thought CGI was a language.  CGI (Common Gateway Interface) is a way for information to get passed to and from webpages from computer programs.  You may use any computer language.  Usually C or PERL is used. You need CGI permission from your web hosting company to use CGI scripts on your website.  They are major security risks and not all hosting companies are set up to deal with the security risks. Remember to chmod after you upload your scripts to 755.</p>
<p>PERL (Practical Extraction and Replacement Language) is a scripting language.  It is good for small tasks you need done and it is particularly suited to parsing text, sorting, and finding and replacing files and text. You can use PERL for interactive user web pages or for website maintenance.  There are several scripts on this site for doing just that.</p>
<p><a href="http://www.perl.com/pub/a/language/info/software.html">Obtain Perl here</a></p>
<p>Off site tutorials<br />
<a href="http://www.cgi101.com/book/">A CGI Tutorial</a><br />
<a href="http://www.lies.com/begperl/">Beginner&#8217;s Guide to CGI Scripting with Perl</a><br />
Perl Communities<br /><a href="http://perl.com">O&#8217;Reilly Perl Pages</a><br />
<a href="http://perlmonks.org">Perl Monks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://herselfswebtools.com/2007/03/cgi-perl.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

