<?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>Nancy Fusco &#187; scripts</title>
	<atom:link href="http://nancyfusco.com/wp/index.php/tag/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://nancyfusco.com/wp</link>
	<description></description>
	<lastBuildDate>Sun, 05 Feb 2012 14:47:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>PHP form to email tutorial &#8211; Part 3 &#8211; Javascript validation</title>
		<link>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-3/</link>
		<comments>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-3/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 15:30:28 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=653</guid>
		<description><![CDATA[Here in Part 3 we will add Javascript to verify that a Contact Name was filled in before the form goes over to PHP to be processed. This is called client-side validation, since the checks are taking place within the same web page as the form. Again, it&#8217;s just a quick check, so we&#8217;re not [...]]]></description>
			<content:encoded><![CDATA[<p>Here in Part 3 we will add Javascript to verify that a Contact Name was filled in before the form goes over to PHP to be processed. This is called client-side validation, since the checks are taking place within the same web page as the form.</p>
<p>Again, it&#8217;s just a quick check, so we&#8217;re not going to get too fancy with Javascript. If you want to learn serious detail about Javascript, go thru the tutorials at <a href="http://www.tizag.com/javascriptT/" target="_blank">TiZag</a>.</p>
<p>Let&#8217;s get started &#8211; Open up your html editor and then open up your php form page. You should have this code:<br />
<code>&lt;html&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;form name="adReg" method="POST" action="adaction2.php"&gt;<br />
Contact Name:<br />
&lt;br /&gt;<br />
&lt;input type="text" name="cName"&gt;<br />
&lt;br /&gt;<br />
Notes:<br />
&lt;br /&gt;<br />
&lt;textarea name="notes"&gt;&lt;/textarea&gt;<br />
&lt;br /&gt;<br />
&lt;input type="submit" name="submit" value="Submit"&gt;<br />
&lt;/form&gt;<br />
&lt;/html&gt;</code></p>
<p>Add the script tag <b>in the Head area</b> to designate this will be a block of Javascript code:<br />
<code>&lt;html&gt;<br />
&lt;head&gt;&lt;script type="text/javascript"&gt;&lt;/head&gt;</code><br />
<span id="more-653"></span><br />
When entering Javascript code, we need to comment it out, so add the starting tag for a comment:<br />
<code>&lt;!--</code></p>
<p>Define and name the function we want to use to validate the form next. We will name the function and then set it to <b>true</b> initially. That way we can use if statements to check and return a <b>false</b> if the field is empty.<br />
<code>function validate_form ( )<br />
{<br />
    valid = true;</code></p>
<p>Here we go with the if statement, take note of the naming structure for pointing to the field we want to check (validate) on our form.<br />
<b>document.formName.fieldName.value</b></p>
<p>To check if it contains any entry, we use the double equals sign to ask if that field contains &#8220;<b>ANYTHING</b> &#8221;<br />
<code>    if ( document.adReg.cName.value == "" )<br />
    {</code></p>
<p>And if it is empty, we return a <b>false</b> to the script so it does not process and instead we can display a message box to the user with an error message:<br />
<code>        alert ( "Please fill in your Name." );<br />
        valid = false;<br />
    }</code></p>
<p>Now close out your tags:<br />
<code>}<br />
//--&gt;<br />
&lt;/script&gt;</code></p>
<p>Ok, so we got our Javascript set but how do we tell the Submit button to go check this script before processing it?</p>
<p>We add a line to our Form tag to have the Submit button run our function before &#8220;submitting&#8221; the form:<br />
<code>&lt;form name="adReg" method="POST" onsubmit="return validate_form ( );" action="adaction2.php"&gt;</code></p>
<p>Sure, there are many ways to expand this validation process in Javascript &#8211; adding in an onFocus line to put the cursor back in the missing content field, for example. For this tutorial series, I just wanted to keep to the basics and give you a good foundation for how things are structured, where they go in the overall scheme of code, how the form relates to PHP, and then let you build from there.</p>
<p>For all you ever wanted to know about Javascript check out <a href="http://www.tizag.com/javascriptT/" target="_blank">TiZag&#8217;s Javascript tutorials</a>.</p>
<p>The full form page should now have this code:<br />
<code><br />
<html><br />
<head><br />
<script type="text/javascript">
<--
function validate_form ( )
{
    valid = true;</p>
<p>    if ( document.adReg.cName.value == "" )
    {
        alert ( "Please fill in your Name." );
        valid = false;
    }
}
//-->
</script><br />
</head></p>
<form name="adReg" method="POST" onsubmit="return validate_form ( );" action="adaction2.php">
Contact Name:<br />
</p>
<input type="text" name="cName">
<br />
Notes:<br />
<br />
<textarea name="notes"></textarea><br />
</p>
<input type="submit" name="submit" value="Submit">
</form>
<p></html></p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP form to email tutorial &#8211; Part 2 &#8211; Setting up the PHP</title>
		<link>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-2/</link>
		<comments>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-2/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 15:08:50 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=640</guid>
		<description><![CDATA[In Part 1 we setup the actual contact form using basic html form tags and form elements. Here in Part 2, we are going to setup the PHP code to receive the data (or info) from that contact form. Open up your html editor and create a new PHP page. Enter the following code bits, [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-1/" target="_blank">Part 1</a> we setup the actual contact form using basic html form tags and form elements.</p>
<p>Here in Part 2, we are going to setup the PHP code to receive the data (or info) from that contact form. Open up your html editor and create a new PHP page. Enter the following code bits, in order, within PHP tags.</p>
<p>First thing, define the variables. These will be the names of the fields exactly as they are in your contact form. In our example, we had 1 text input box called <b>cName</b> and 1 text area box called <b>notes</b>.</p>
<p>Let&#8217;s also add a few variables that we will use to send our contact form via email. We don&#8217;t need these over on the contact form, but we want to define them here so our PHP script can use them later on.<br />
<code>// define our variables, the info that we will be gathering from the form and any variables we want to use later in the script<br />
$EmailFrom = "youremail_here@where.com";<br />
$EmailTo = "youremail_here@where.com";<br />
$Subject = "Contact Form";<br />
$cName = Trim(stripslashes($_POST['cName']));<br />
$notes = Trim(stripslashes($_POST['notes'])); </code></p>
<p>It&#8217;s often handy to have the user&#8217;s IP address passed along for troubleshooting if needed, so let&#8217;s add in a variable for that:<br />
<code>$user_ip = ($_SERVER['X_FORWARDED_FOR']) ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];</code></p>
<p>Ok, now that everything&#8217;s defined, let&#8217;s setup what the email message should look like when it&#8217;s received. <span id="more-640"></span> Here we are basically just formatting the look of the message body, making it more readable.<br />
<code>// formatting the data for the email message body<br />
$Body .= "Contact Name: ";<br />
$Body .= $cName;<br />
$Body .= "\n";<br />
$Body .= "Notes: ";<br />
$Body .= $notes;<br />
$Body .= "\n";<br />
$Body .= "Users IP: ";<br />
$Body .= $user_ip;<br />
$Body .= "\n";</code></p>
<p>Here is a quick check to see if a spambot is adding emails to our form. This is just a basic check, so at some point your going to want to make sure your form isn&#8217;t being used by a spammer. I will talk more about this in Part 3 &#8211; validation.</p>
<p>For now, let&#8217;s just do a simple check to see if an extra line or breaking space is being inserted in either the Name text box.<br />
<code>if ( ereg( "[\r\n]", $cName )) ) {</p>
<p>	//if spambot send directly to error page</p>
<p>	print "&lt;meta http-equiv=\"refresh\" content=\"0;URL=error.php\"&gt;" ;</code></p>
<p>Ok, so now that we&#8217;ve used an &#8220;if&#8221; statement to check and re-route to an error page if they are a spammer, what do we do if it&#8217;s ok to send the form? We use the &#8220;else&#8221; statement, like this:<br />
<code>// if all good then send our contact form via email and display the results</p>
<p>} else {</p>
<p>// send email to the address specified above and include the data<br />
$success = mail($EmailTo, $Subject, $Body, "From:youremail_here@where.com");</code><br />
And finally, we display the info that the user entered in the form as confirmation that it was sent and so they have a copy for their records. It also let&#8217;s us say &#8220;Thank you!&#8221; for sending the message:<br />
<code>// display results on page so the user has confirmation of their form details<br />
echo "&lt;h3&gt;Thank you! We have received your message!&lt;/h3&gt;";<br />
echo "&lt;br /&gt;";<br />
echo "&lt;br /&gt;";<br />
echo "&lt;p&gt;Hello ".$cName.", &lt;/p&gt;";<br />
echo "&lt;br /&gt;";<br />
echo "&lt;p&gt;Following are the details of your message:&lt;/p&gt;";<br />
echo "&lt;br /&gt;";<br />
echo "&lt;p&gt;".$cName."&lt;/p&gt;";<br />
echo "&lt;br /&gt;";<br />
echo "&lt;p&gt;Your message was: &lt;/p&gt;";<br />
echo "&lt;p&gt;<i>".$notes."</i>&lt;/p&gt;";<br />
echo "&lt;br /&gt;";<br />
}</code></p>
<p>So, that&#8217;s it! Not too bad right? Remember to type the code snippets above inside PHP tags and to save the file as adaction2.php before testing. If you want to change the name of this file, be sure and go back to your form and edit the form tag so it knows where to send this data:<br />
<code>&lt;form name="adReg" method="POST" action="adaction2.php"&gt;</code></p>
<p>To learn PHP in more detail, check out <a href="http://www.tizag.com/phpT/index.php" target="_blank">TiZag</a> &#8211; many props to TiZag &#8211; I learned more from his tutorials than anywhere on the web.</p>
<p>And to get some additional code samples, check out Steve&#8217;s site <a href="http://www.stevedawson.com/download.php" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP form to email tutorial &#8211; Part 1 &#8211; Setting up the form</title>
		<link>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-1/</link>
		<comments>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-1/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 17:47:43 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=629</guid>
		<description><![CDATA[This weekend I did some volunteer work for a local non-profit by constructing an online form in php that would email from their website. I&#8217;m going to simplify that form and walk thru a tutorial to help you build your own online php forms. Part 1 will walk you thru setting up the actual form [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I did some volunteer work for a local non-profit by constructing an online form in php that would email from their website. I&#8217;m going to simplify that form and walk thru a tutorial to help you build your own online php forms.</p>
<p>Part 1 will walk you thru setting up the actual form to get it ready to be processed by the PHP script. The form just gets the information to the PHP script. </p>
<p><a href="http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-2/" target="_blank">Part 2</a> will be the setup of the receiving PHP script, which will process the info from the form and email it.</p>
<p><a href="http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-3/" target="_blank">Part 3</a> will look at client-side validation with Javascript.</p>
<p>Part 4 we will create a multiple choice input area for the user, and only emailing their selections in the form. We will do this by creating an Array.</p>
<p>Part 5 will create code to also email a confirmation to the user with the info they filled out.</p>
<p>A well designed form will set the stage for easy processing so, with that said, let&#8217;s dive into the form construction. <span id="more-629"></span></p>
<p>Open your html editor, for most it will be Dreamweaver or similar. I use <a href="http://quanta.kdewebdev.org/" target="_blank">Quanta+</a>, an open-source software for Linux. Create a new PHP document.</p>
<p>First, let&#8217;s add the form elements to our web page, take notice that we are defining the name, method, and action:<br />
<code>&lt;html&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;form name="adReg" method="POST" action="adaction2.php"&gt;<br />
&lt;/form&gt;<br />
&lt;/html&gt;</code></p>
<p>name = how we will refer to our form<br />
method = POST &#8211; how we will send our data over to PHP &#8211; this is the transport<br />
action = when a user clicks the Submit button, where the form should send it&#8217;s data.</p>
<p>Now, inside the form tags, let&#8217;s add just two items, keeping it simple for right now:<br />
<code>&lt;form name="adReg" method="POST" action="adaction2.php"&gt;<br />
Contact Name:<br />
&lt;input type="text" name="cName"&gt;<br />
Notes:<br />
&lt;textarea name="notes"&gt;&lt;/textarea&gt;<br />
&lt;/form&gt;</code></p>
<p>Notice again, we have to define the elements in our form so that in our PHP script we know how to refer to them.</p>
<p>All we need to do now is add in the Submit button and a few line breaks for spacing:</p>
<p><code>&lt;html&gt;<br />
&lt;head&gt;&lt;/head&gt;<br />
&lt;form name="adReg" method="POST" action="adaction2.php"&gt;<br />
Contact Name:<br />
&lt;br /&gt;<br />
&lt;input type="text" name="cName"&gt;<br />
&lt;br /&gt;<br />
Notes:<br />
&lt;br /&gt;<br />
&lt;textarea name="notes"&gt;&lt;/textarea&gt;<br />
&lt;br /&gt;<br />
&lt;input type="submit" name="submit" value="Submit"&gt;<br />
&lt;/form&gt;<br />
&lt;/html&gt;</code></p>
<p>Preview your PHP page and you should see this basic form:</p>
<form name="adReg" method="POST" action="adaction2.php">
Contact Name:<br />
</p>
<input type="text" name="cName">
<br />
Notes:<br />
<br />
<textarea name="notes"></textarea><br />
</p>
<input type="submit" name="submit" value="Submit">
</form>
<p>That&#8217;s it! Pretty easy right? Now if you click the Submit button above, it won&#8217;t actually do anything &#8211; yet &#8211; visit back for Part 2 where we will construct the actual PHP code that will take the info from the form we created and send it via email.</p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2009/03/php-form-to-email-tutorial-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP script for calculating shipping based on weight and destination</title>
		<link>http://nancyfusco.com/wp/index.php/2009/02/php-script-for-calculating-shipping/</link>
		<comments>http://nancyfusco.com/wp/index.php/2009/02/php-script-for-calculating-shipping/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 14:20:46 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[web design]]></category>
		<category><![CDATA[Web Projects]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[shopping cart]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=446</guid>
		<description><![CDATA[Developed this php script for one of my clients eCommerce sites. They needed their shopping cart to calculate shipping costs based on the weight of the item and the destination. And all US shipping was to be Free. Best application for this code is in Click Cart Pro version 6+ but here is the stand [...]]]></description>
			<content:encoded><![CDATA[<p>Developed this php script for one of my clients eCommerce sites. They needed their shopping cart to calculate shipping costs based on the weight of the item and the destination. And all US shipping was to be Free.  Best application for this code is in Click Cart Pro version 6+ but here is the stand alone code if you can benefit from it, go for it. I just ask that the credit stays in the comments. Just enclose the following code in php tags:</p>
<p>/* This script is a modification of the default Calculation On Total Item Weight. Script setup for FREE Shipping to all US delivery locations. All other delivery locations, worldwide, are calculated by Price Groups/Zones and Weight of the product. If the specific delivery location is not specified, the closing part of the script will include a flat rate. */</p>
<p>/* Code mods by themonarch with thanks to fazman at the CCP forums for the basic structure http://forum.kryptronic.com/viewtopic.php?id=18218 and this site for excellent php tutorials http://www.tizag.com */</p>
<p>// Definitions</p>
<p>$info = $this-&gt;globals(&#8216;ecom.customship&#8217;);</p>
<p>$method = &#8216;USPS/UPS Standard Shipping&#8217;;</p>
<p>$weight = $info['weight'];</p>
<p>// FREE SHIPPING USA ONLY</p>
<p>if ($info['country'] == &#8216;United States&#8217;) {</p>
<p>$custom = array($method =&gt; &#8217;0.00&#8242;);</p>
<p>// Price Group 1</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;Canada&#8217; || $info['country'] == &#8216;Virgin Islands     British&#8217; || $info['country'] == &#8216;Virgin Islands     US&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;19.99&#8242;);<br />
<span id="more-446"></span><br />
} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;Canada&#8217; || $info['country'] == &#8216;Virgin Islands     British&#8217; || $info['country'] == &#8216;Virgin Islands     US&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;Canada&#8217; || $info['country'] == &#8216;Virgin Islands     British&#8217; || $info['country'] == &#8216;Virgin Islands     US&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;27.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;Canada&#8217; || $info['country'] == &#8216;Virgin Islands     British&#8217; || $info['country'] == &#8216;Virgin Islands     US&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;44.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;90&#8242;) &amp;&amp; ($info['country'] == &#8216;Canada&#8217; || $info['country'] == &#8216;Virgin Islands     British&#8217; || $info['country'] == &#8216;Virgin Islands US&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;84.99&#8242;);</p>
<p>// Price Group 2</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;Mexico&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;23.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;Mexico&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;34.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;Mexico&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;44.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;Mexico&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;64.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;90&#8242;) &amp;&amp; ($info['country'] == &#8216;Mexico&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;118.99&#8242;);</p>
<p>// Price Group 3</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;Australia&#8217; || $info['country'] ==</p>
<p>&#8216;China&#8217; || $info['country'] == &#8216;Hong Kong&#8217; || $info['country'] == &#8216;Japan&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;31.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;Australia&#8217; || $info['country'] ==</p>
<p>&#8216;China&#8217; || $info['country'] == &#8216;Hong Kong&#8217; || $info['country'] == &#8216;Japan&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;48.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;Australia&#8217; || $info['country'] ==</p>
<p>&#8216;China&#8217; || $info['country'] == &#8216;Hong Kong&#8217; || $info['country'] == &#8216;Japan&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;51.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;Australia&#8217; || $info['country'] ==</p>
<p>&#8216;China&#8217; || $info['country'] == &#8216;Hong Kong&#8217; || $info['country'] == &#8216;Japan&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;92.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;91&#8242;) &amp;&amp; ($info['country'] == &#8216;Australia&#8217; || $info['country'] ==</p>
<p>&#8216;China&#8217; || $info['country'] == &#8216;Hong Kong&#8217; || $info['country'] == &#8216;Japan&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;186.99&#8242;);</p>
<p>// Price Group 4</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;Czech Republic&#8217; || $info['country'] == &#8216;Hungary&#8217; || $info['country'] == &#8216;Romania&#8217; || $info['country'] == &#8216;Poland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;27.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;Czech Republic&#8217; || $info['country'] == &#8216;Hungary&#8217; || $info['country'] == &#8216;Romania&#8217; || $info['country'] == &#8216;Poland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;39.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;Czech Republic&#8217; || $info['country'] == &#8216;Hungary&#8217; || $info['country'] == &#8216;Romania&#8217; || $info['country'] == &#8216;Poland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;44.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;Czech Republic&#8217; || $info['country'] == &#8216;Hungary&#8217; || $info['country'] == &#8216;Romania&#8217; || $info['country'] == &#8216;Poland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;84.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;91&#8242;) &amp;&amp; ($info['country'] == &#8216;Czech Republic&#8217; || $info['country'] == &#8216;Hungary&#8217; || $info['country'] == &#8216;Romania&#8217; || $info['country'] == &#8216;Poland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;178.99&#8242;);</p>
<p>// Price Group 5</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;Austria&#8217; || $info['country'] == &#8216;Belgium&#8217; || $info['country'] == &#8216;Denmark&#8217; || $info['country'] == &#8216;Finland&#8217; || $info['country'] == &#8216;France&#8217; || $info['country'] == &#8216;Germany&#8217; || $info['country'] == &#8216;United Kingdom&#8217; || $info['country'] == &#8216;Greece&#8217; || $info['country'] == &#8216;Ireland&#8217; || $info['country'] == &#8216;Netherlands&#8217; || $info['country'] == &#8216;Norway&#8217; || $info['country'] == &#8216;Spain&#8217; || $info['country'] == &#8216;Sweden&#8217; || $info['country'] == &#8216;Liechtenstein&#8217; || $info['country'] == &#8216;Switzerland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;Austria&#8217; || $info['country'] == &#8216;Belgium&#8217; || $info['country'] == &#8216;Denmark&#8217; || $info['country'] == &#8216;Finland&#8217; || $info['country'] == &#8216;France&#8217; || $info['country'] == &#8216;Germany&#8217; || $info['country'] == &#8216;United Kingdom&#8217; || $info['country'] == &#8216;Greece&#8217; || $info['country'] == &#8216;Ireland&#8217; || $info['country'] == &#8216;Netherlands&#8217; || $info['country'] == &#8216;Norway&#8217; || $info['country'] == &#8216;Spain&#8217; || $info['country'] == &#8216;Sweden&#8217; || $info['country'] == &#8216;Liechtenstein&#8217; || $info['country'] == &#8216;Switzerland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;Austria&#8217; || $info['country'] == &#8216;Belgium&#8217; || $info['country'] == &#8216;Denmark&#8217; || $info['country'] == &#8216;Finland&#8217; || $info['country'] == &#8216;France&#8217; || $info['country'] == &#8216;Germany&#8217; || $info['country'] == &#8216;United Kingdom&#8217; || $info['country'] == &#8216;Greece&#8217; || $info['country'] == &#8216;Ireland&#8217; || $info['country'] == &#8216;Netherlands&#8217; || $info['country'] == &#8216;Norway&#8217; || $info['country'] == &#8216;Spain&#8217; || $info['country'] == &#8216;Sweden&#8217; || $info['country'] == &#8216;Liechtenstein&#8217; || $info['country'] == &#8216;Switzerland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;Austria&#8217; || $info['country'] == &#8216;Belgium&#8217; || $info['country'] == &#8216;Denmark&#8217; || $info['country'] == &#8216;Finland&#8217; || $info['country'] == &#8216;France&#8217; || $info['country'] == &#8216;Germany&#8217; || $info['country'] == &#8216;United Kingdom&#8217; || $info['country'] == &#8216;Greece&#8217; || $info['country'] == &#8216;Ireland&#8217; || $info['country'] == &#8216;Netherlands&#8217; || $info['country'] == &#8216;Norway&#8217; || $info['country'] == &#8216;Spain&#8217; || $info['country'] == &#8216;Sweden&#8217; || $info['country'] == &#8216;Liechtenstein&#8217; || $info['country'] == &#8216;Switzerland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);<br />
} elseif (($weight &lt;= &#8217;91&#8242;) &amp;&amp; ($info['country'] == &#8216;Austria&#8217; || $info['country'] == &#8216;Belgium&#8217; || $info['country'] == &#8216;Denmark&#8217; || $info['country'] == &#8216;Finland&#8217; || $info['country'] == &#8216;France&#8217; || $info['country'] == &#8216;Germany&#8217; || $info['country'] == &#8216;United Kingdom&#8217; || $info['country'] == &#8216;Greece&#8217; || $info['country'] == &#8216;Ireland&#8217; || $info['country'] == &#8216;Netherlands&#8217; || $info['country'] == &#8216;Norway&#8217; || $info['country'] == &#8216;Spain&#8217; || $info['country'] == &#8216;Sweden&#8217; || $info['country'] == &#8216;Liechtenstein&#8217; || $info['country'] == &#8216;Switzerland&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>// Price Group 6</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;India&#8217; || $info['country'] == &#8216;Indonesia&#8217; || $info['country'] == &#8216;New Zealand&#8217; || $info['country'] == &#8216;Singapore&#8217; || $info['country'] == &#8216;Taiwan&#8217; || $info['country'] == &#8216;Vietnam&#8217; || $info['country'] == &#8216;Thailand&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;India&#8217; || $info['country'] == &#8216;Indonesia&#8217; || $info['country'] == &#8216;New Zealand&#8217; || $info['country'] == &#8216;Singapore&#8217; || $info['country'] == &#8216;Taiwan&#8217; || $info['country'] == &#8216;Vietnam&#8217; || $info['country'] == &#8216;Thailand&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;India&#8217; || $info['country'] == &#8216;Indonesia&#8217; || $info['country'] == &#8216;New Zealand&#8217; || $info['country'] == &#8216;Singapore&#8217; || $info['country'] == &#8216;Taiwan&#8217; || $info['country'] == &#8216;Vietnam&#8217; || $info['country'] == &#8216;Thailand&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;India&#8217; || $info['country'] == &#8216;Indonesia&#8217; || $info['country'] == &#8216;New Zealand&#8217; || $info['country'] == &#8216;Singapore&#8217; || $info['country'] == &#8216;Taiwan&#8217; || $info['country'] == &#8216;Vietnam&#8217; || $info['country'] == &#8216;Thailand&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;91&#8242;) &amp;&amp; ($info['country'] == &#8216;India&#8217; || $info['country'] == &#8216;Indonesia&#8217; || $info['country'] == &#8216;New Zealand&#8217; || $info['country'] == &#8216;Singapore&#8217; || $info['country'] == &#8216;Taiwan&#8217; || $info['country'] == &#8216;Vietnam&#8217; || $info['country'] == &#8216;Thailand&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>// Price Group 7</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;South Africa&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;South Africa&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;South Africa&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;South Africa&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;91&#8242;) &amp;&amp; ($info['country'] == &#8216;South Africa&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>// Price Group 8</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;Egypt&#8217; || $info['country'] ==</p>
<p>&#8216;Israel&#8217; || $info['country'] == &#8216;Saudi Arabia&#8217; || $info['country'] == &#8216;United Arab Emirates&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;Egypt&#8217; || $info['country'] ==</p>
<p>&#8216;Israel&#8217; || $info['country'] == &#8216;Saudi Arabia&#8217; || $info['country'] == &#8216;United Arab Emirates&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;Egypt&#8217; || $info['country'] ==</p>
<p>&#8216;Israel&#8217; || $info['country'] == &#8216;Saudi Arabia&#8217; || $info['country'] == &#8216;United Arab Emirates&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;Egypt&#8217; || $info['country'] ==</p>
<p>&#8216;Israel&#8217; || $info['country'] == &#8216;Saudi Arabia&#8217; || $info['country'] == &#8216;United Arab Emirates&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;91&#8242;) &amp;&amp; ($info['country'] == &#8216;Egypt&#8217; || $info['country'] ==</p>
<p>&#8216;Israel&#8217; || $info['country'] == &#8216;Saudi Arabia&#8217; || $info['country'] == &#8216;United Arab Emirates&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>// Price Group 9</p>
<p>} elseif (($weight &lt;= &#8217;3&#8242;) &amp;&amp; ($info['country'] == &#8216;Argentina&#8217; || $info['country'] ==<br />
&#8216;Bahamas&#8217; || $info['country'] == &#8216;Bermuda&#8217; || $info['country'] == &#8216;Brazil&#8217; || $info['country'] == &#8216;Chile&#8217;<br />
|| $info['country'] == &#8216;Colombia&#8217; || $info['country'] == &#8216;Jamaica&#8217; || $info['country'] == &#8216;Panama&#8217; || $info['country'] == &#8216;Peru&#8217; || $info['country'] == &#8216;Venezuela&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;7&#8242;) &amp;&amp; ($info['country'] == &#8216;Argentina&#8217; || $info['country'] ==<br />
&#8216;Bahamas&#8217; || $info['country'] == &#8216;Bermuda&#8217; || $info['country'] == &#8216;Brazil&#8217; || $info['country'] == &#8216;Chile&#8217;<br />
|| $info['country'] == &#8216;Colombia&#8217; || $info['country'] == &#8216;Jamaica&#8217; || $info['country'] == &#8216;Panama&#8217; || $info['country'] == &#8216;Peru&#8217; || $info['country'] == &#8216;Venezuela&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;11&#8242;) &amp;&amp; ($info['country'] == &#8216;Argentina&#8217; || $info['country'] ==<br />
&#8216;Bahamas&#8217; || $info['country'] == &#8216;Bermuda&#8217; || $info['country'] == &#8216;Brazil&#8217; || $info['country'] == &#8216;Chile&#8217;<br />
|| $info['country'] == &#8216;Colombia&#8217; || $info['country'] == &#8216;Jamaica&#8217; || $info['country'] == &#8216;Panama&#8217; || $info['country'] == &#8216;Peru&#8217; || $info['country'] == &#8216;Venezuela&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;20&#8242;) &amp;&amp; ($info['country'] == &#8216;Argentina&#8217; || $info['country'] ==<br />
&#8216;Bahamas&#8217; || $info['country'] == &#8216;Bermuda&#8217; || $info['country'] == &#8216;Brazil&#8217; || $info['country'] == &#8216;Chile&#8217;<br />
|| $info['country'] == &#8216;Colombia&#8217; || $info['country'] == &#8216;Jamaica&#8217; || $info['country'] == &#8216;Panama&#8217; || $info['country'] == &#8216;Peru&#8217; || $info['country'] == &#8216;Venezuela&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>} elseif (($weight &lt;= &#8217;91&#8242;) &amp;&amp; ($info['country'] == &#8216;Argentina&#8217; || $info['country'] ==<br />
&#8216;Bahamas&#8217; || $info['country'] == &#8216;Bermuda&#8217; || $info['country'] == &#8216;Brazil&#8217; || $info['country'] == &#8216;Chile&#8217;<br />
|| $info['country'] == &#8216;Colombia&#8217; || $info['country'] == &#8216;Jamaica&#8217; || $info['country'] == &#8216;Panama&#8217; || $info['country'] == &#8216;Peru&#8217; || $info['country'] == &#8216;Venezuela&#8217;)) {</p>
<p>$custom = array($method =&gt; &#8217;25.99&#8242;);</p>
<p>// Default Shipping Cost Any Other Country</p>
<p>} else {</p>
<p>$custom = array($method =&gt; &#8217;55.00&#8242;);</p>
<p>}</p>
<p>// Closing Returns</p>
<p>$this-&gt;globals(&#8216;ecom.customship_response&#8217;,$custom);</p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2009/02/php-script-for-calculating-shipping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add scripts to Gimp</title>
		<link>http://nancyfusco.com/wp/index.php/2009/01/how-to-add-scripts-to-gimp/</link>
		<comments>http://nancyfusco.com/wp/index.php/2009/01/how-to-add-scripts-to-gimp/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 15:59:18 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[graphic design]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[scm]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=126</guid>
		<description><![CDATA[Close Gimp if it&#8217;s running. Download your favorite Gimp scripts from The Gimp Plug-in Registry. Right click the download link(s) and choose &#8220;Save as&#8230;&#8221; Save the file to your scripts folder. If you&#8217;re not sure where your scripts folder is, you can find that by opening GIMP and going to File &#124; Preferences &#124; Folders [...]]]></description>
			<content:encoded><![CDATA[<p>Close Gimp if it&#8217;s running. Download your favorite Gimp scripts from <a href="http://registry.gimp.org/" target="_blank">The Gimp Plug-in Registry</a>. Right click the download link(s) and choose &#8220;Save as&#8230;&#8221;</p>
<p>Save the file to your scripts folder. If you&#8217;re not sure where your scripts folder is, you can find that by opening GIMP and going to File | Preferences | Folders &gt; Scripts. If more than one folder is shown, any of those locations will work.</p>
<p>Once you have saved the file in your scripts folder, the new plug-in(s) will appear under the toolbar item called Script-Fu. If it&#8217;s not showing there, make sure the file is in your scripts folder and that the filename ends with &#8220;.scm&#8221;, not &#8220;.txt&#8221; or &#8220;.scm.txt&#8221;. Some versions of web browsers will append .txt to the end of downloaded files, esp IE. If you choose &#8220;Save as&#8230;&#8221; check to make sure the file type is set to &#8220;All files&#8221;, so that the extension of scm will be retained in the download.</p>
<p>Another way around this is to simply path out to your files in the Scripts folder and change the file extensions to .scm instead of .txt.</p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2009/01/how-to-add-scripts-to-gimp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

