<?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; web design</title>
	<atom:link href="http://nancyfusco.com/wp/index.php/category/tutorials/web-design/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>How to add a button to jEdit for Infoviewer preview in browser</title>
		<link>http://nancyfusco.com/wp/index.php/2011/10/how-to-add-button-to-jedit-for-infoviewer-preview-in-browser/</link>
		<comments>http://nancyfusco.com/wp/index.php/2011/10/how-to-add-button-to-jedit-for-infoviewer-preview-in-browser/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 15:48:28 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[add button]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[infoviewer]]></category>
		<category><![CDATA[jedit]]></category>
		<category><![CDATA[preview in browser]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=1127</guid>
		<description><![CDATA[Now that you&#8217;ve got jEdit and Infoviewer working together to use Firefox to preview your web pages or code, it gets tedious quite quickly to go all the way thru the menu&#8217;s just to load a page. So, let&#8217;s setup a button on the toolbar in jEdit to launch our preview. Open jEdit and go [...]]]></description>
			<content:encoded><![CDATA[<p>Now that you&#8217;ve got<a title="How to launch firefox from jedit" href="http://nancyfusco.com/wp/index.php/2011/10/how-to-launch-firefox-preview-from-jedit/"> jEdit and Infoviewer working together to use Firefox to preview your web pages or code</a>, it gets tedious quite quickly to go all the way thru the menu&#8217;s just to load a page.</p>
<p>So, let&#8217;s setup a button on the toolbar in jEdit to launch our preview.</p>
<p>Open jEdit and go to Utilities | Global Options</p>
<p><img class="aligncenter size-full wp-image-1128" title="add-button-infoviewer-1" src="http://nancyfusco.com/wp/wp-content/uploads/2011/10/add-button-infoviewer-1.png" alt="" width="484" height="339" /></p>
<p>Select Toolbar from the left menu and then click the Add button at the bottom.</p>
<p><img class="aligncenter size-full wp-image-1130" title="add-button-infoviewer-3" src="http://nancyfusco.com/wp/wp-content/uploads/2011/10/add-button-infoviewer-3.png" alt="" width="576" height="86" /></p>
<p>You will now see all the options for this new button. Here is how I have mine setup:</p>
<div id="attachment_1129" class="wp-caption aligncenter" style="width: 632px"><a href="http://nancyfusco.com/wp/wp-content/uploads/2011/10/add-button-infoviewer-2.png" target="_blank"><img class="size-full wp-image-1129" title="add-button-infoviewer-2" src="http://nancyfusco.com/wp/wp-content/uploads/2011/10/add-button-infoviewer-2.png" alt="" width="622" height="442" /></a><p class="wp-caption-text">click for fullsize image</p></div>
<p>Now, when I click the &#8220;Internet&#8221; or Globe icon, my current page will load in Firefox directly from jEdit!</p>
<p><img class="aligncenter size-full wp-image-1131" title="add-button-infoviewer-4" src="http://nancyfusco.com/wp/wp-content/uploads/2011/10/add-button-infoviewer-4.png" alt="" width="544" height="256" /></p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2011/10/how-to-add-button-to-jedit-for-infoviewer-preview-in-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to launch Firefox preview from jEdit</title>
		<link>http://nancyfusco.com/wp/index.php/2011/10/how-to-launch-firefox-preview-from-jedit/</link>
		<comments>http://nancyfusco.com/wp/index.php/2011/10/how-to-launch-firefox-preview-from-jedit/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 14:57:37 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[infoviewer]]></category>
		<category><![CDATA[jedit]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[set external browser]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=1121</guid>
		<description><![CDATA[jEdit is my code editor of choice. I&#8217;m running it on Windows 7. Here&#8217;s some quick instructions for setting up the preview of your code or web pages to launch Firefox instead of  jEdit&#8217;s own internal browser. First, install the InfoViewer plugin from within jEdit. Open jEdit choose Plugins &#124; Plugin Options under InfoViewer &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>jEdit is my code editor of choice. I&#8217;m running it on Windows 7. Here&#8217;s some quick instructions for setting up the preview of your code or web pages to launch Firefox instead of  jEdit&#8217;s own internal browser.</p>
<p>First, install the InfoViewer plugin from within <a title="jEdit Text Editor" href="http://www.jedit.org/" target="_blank">jEdit</a>.</p>
<p>Open jEdit choose Plugins | Plugin Options under InfoViewer | Choose Browser check the box &#8220;Use internal&#8230;&#8221;, then tick the box &#8220;External Browser&#8221;  and set the path below:</p>
<p>c:\Program Files\Mozilla Firefox\firefox.exe $u</p>
<p>Apply it.</p>
<p>Now, when you want to load the current page/file into Firefox, choose Plugins | InfoViewer | Open current buffer with browser</p>
<p><img class="aligncenter size-full wp-image-1122" title="info-viewer-settings" src="http://nancyfusco.com/wp/wp-content/uploads/2011/10/info-viewer-settings.png" alt="Firefox as browser in jEdit Infoviewer" width="628" height="465" /></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2011/10/how-to-launch-firefox-preview-from-jedit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to batch process images with Gimp</title>
		<link>http://nancyfusco.com/wp/index.php/2011/08/how-to-batch-process-images-with-gimp/</link>
		<comments>http://nancyfusco.com/wp/index.php/2011/08/how-to-batch-process-images-with-gimp/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 00:17:03 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[graphic design]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[batch images]]></category>
		<category><![CDATA[gimp batch images]]></category>
		<category><![CDATA[how to resize batch of images]]></category>
		<category><![CDATA[image batch processing]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=1102</guid>
		<description><![CDATA[Let&#8217;s walk thru how to use David&#8217;s Batch Processor add on for Gimp to batch process images in a snap! We&#8217;re going to focus on batch resizing of an entire directory of images but there are a lot of options available in David&#8217;s Batch Processor, such as turn, blur, color, resize, crop, sharpen, and rename. [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s walk thru how to use David&#8217;s Batch Processor add on for Gimp to batch process images in a snap! We&#8217;re going to focus on batch resizing of an entire directory of images but there are a lot of options available in David&#8217;s Batch Processor, such as turn, blur, color, resize, crop, sharpen, and rename. It will take some getting used to on all of the fine details under each tab but well worth the learning curve.</p>
<p>You can download and find install/troubleshooting information on <a href="http://members.ozemail.com.au/~hodsond/dbp.html" target="_blank">David&#8217;s Batch Processor here</a>. You can also send David a donation from that page if you want to send the good karma back.</p>
<p>Once you get it all installed, let&#8217;s get started! Open Gimp. On the main window menu bar you will go to Filters | Batch Process</p>
<p><img class="aligncenter size-full wp-image-1103" title="batch-process-images-1" src="http://nancyfusco.com/wp/wp-content/uploads/2011/08/batch-process-images-1.png" alt="" width="603" height="475" /></p>
<p>Try to reign in your excitement when you see all the options tabs in this window. I&#8217;ll never admit to spending many a late nerdy nights trying out the options to &#8220;just see what happens&#8221;.</p>
<p>Ok, let&#8217;s add the directory of files we want to batch resize.  Click the Add Files button.</p>
<p><img class="aligncenter size-full wp-image-1104" title="batch-process-images-2" src="http://nancyfusco.com/wp/wp-content/uploads/2011/08/batch-process-images-2.png" alt="" width="398" height="512" /></p>
<p>You can select individual images or the whole range depending on which one&#8217;s you want to apply the resizing to. I usually click the top image, hold down the SHIFT button, scroll, and click the last image to select them all. If you want to select just individual images, use CTRL-ALT and click the one&#8217;s you want to add.</p>
<p>Once you have them selected, click Add.</p>
<p><img class="aligncenter size-full wp-image-1106" title="batch-process-images-3" src="http://nancyfusco.com/wp/wp-content/uploads/2011/08/batch-process-images-3.png" alt="" width="649" height="370" /></p>
<p>So. You clicked Add right. And it looked like nothing happened. You will need to click the Close button to close this window.</p>
<p><img class="aligncenter size-full wp-image-1107" title="batch-process-images-4" src="http://nancyfusco.com/wp/wp-content/uploads/2011/08/batch-process-images-4.png" alt="" width="309" height="64" /></p>
<p>You will now see your added files in the list. To resize all the images in the list, click the RESIZE tab.</p>
<p><img class="aligncenter size-full wp-image-1111" title="batch-process-images-5" src="http://nancyfusco.com/wp/wp-content/uploads/2011/08/batch-process-images-5.png" alt="" width="402" height="512" /></p>
<p>Again, lots of options. For the purpose of this tutorial we&#8217;re going to keep it simple. Resizing can be relative to the input image size or an absolute size. Check the ENABLE button to &#8220;turn on&#8221; Resizing and  check the box KEEP ASPECT locks the x and y sliders to the same value.  Set the X and Y to .20, this will resize the images to 20% of their original size.</p>
<p><img class="aligncenter size-full wp-image-1110" title="batch-process-images-6" src="http://nancyfusco.com/wp/wp-content/uploads/2011/08/batch-process-images-6.png" alt="" width="399" height="510" /></p>
<p>While it&#8217;s tempting to click the Start or Test button&#8217;s now, WAIT &#8211; we haven&#8217;t finished our settings! Click the Output tab and in the drop down area, choose JPG. You can modify the settings here as you&#8217;d like, increasing the Quality will increase each individual file size but sometimes that&#8217;s a good trade off. I went with a medium setting of 75.</p>
<p><img class="aligncenter size-full wp-image-1113" title="batch-process-images-7" src="http://nancyfusco.com/wp/wp-content/uploads/2011/08/batch-process-images-7.png" alt="" width="406" height="510" /></p>
<p>Almost there so let&#8217;s click on the most confusing tab ever, the Rename tab. You&#8217;re just going to have to trust me on this one. If you really want to make yourself crazy, just try and figure out what clicking the Source Dir button does. I&#8217;m not going to torture you, so click the Select Dir and choose the same folder where the original images are. I like to add a prefix to my file names so they will be listed together, as you can see here a &#8220;t-&#8221; will be added to the original filename when it is resized.</p>
<p><img class="aligncenter size-full wp-image-1115" title="batch-process-images-8" src="http://nancyfusco.com/wp/wp-content/uploads/2011/08/batch-process-images-8.png" alt="" width="402" height="513" /></p>
<p>Ignore what the path says after &#8220;Original:&#8221;. Honestly, you&#8217;ll drive yourself crazy trying to sort it. This is easily the most frustrating tab as one errant click here will generate a long and hard to understand error message. If I get that error, I usually close the batch processor and try again.</p>
<p>Click Start and the image batch processing will run until it&#8217;s complete. You&#8217;ve now got a whole set of original files and a whole set of resized images. Well done!</p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2011/08/how-to-batch-process-images-with-gimp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>Inline HTML CSS style formatting for the P tag</title>
		<link>http://nancyfusco.com/wp/index.php/2009/02/inline-html-style-formatting-for-the-p-tag/</link>
		<comments>http://nancyfusco.com/wp/index.php/2009/02/inline-html-style-formatting-for-the-p-tag/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 15:41:06 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=475</guid>
		<description><![CDATA[Sure, using stylesheets is the way to go, but what about those times when you just need to format some text inline. For example, whenever I list something on eBay, the &#8220;Description&#8221; box will allow for fancy html / css markup but you have to do it by hand. And no linking to a css. [...]]]></description>
			<content:encoded><![CDATA[<p>Sure, using stylesheets is the way to go, but what about those times when you just need to format some text inline. For example, whenever I list something on eBay, the &#8220;Description&#8221; box will allow for fancy html / css markup but you have to do it by hand. And no linking to a css. It&#8217;s simply a matter of putting all the css within the html P tag, like this:</p>
<pre>
<code>&lt;p style="color:#05058E; font-family:sans-serif;
font-size: 22px; font-weight: bold;
letter-spacing: 4px; line-height: 1.2em;"&gt;
Your text here.
&lt;/p&gt;</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2009/02/inline-html-style-formatting-for-the-p-tag/feed/</wfw:commentRss>
		<slash:comments>0</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>Peek-a-boo display bug in IE</title>
		<link>http://nancyfusco.com/wp/index.php/2009/01/peek-a-boo-display-bug-in-ie/</link>
		<comments>http://nancyfusco.com/wp/index.php/2009/01/peek-a-boo-display-bug-in-ie/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 03:20:47 +0000</pubDate>
		<dc:creator>Nancy</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://nancyfusco.com/wp/?p=110</guid>
		<description><![CDATA[There is a pesky display bug that will render a &#8220;peek-a-boo&#8221; effect when you layer div containers in CSS. When this bug is at it&#8217;s best, content that should stream after a previous div container, instead partially hides behind it. This is how my home page displays without the position: relative in the post div [...]]]></description>
			<content:encoded><![CDATA[<p>There is a pesky display bug that will render a &#8220;peek-a-boo&#8221; effect when you layer div containers in CSS. When this bug is at it&#8217;s best, content that should stream after a previous div container, instead partially hides behind it. This is how my home page displays without the position: relative in the post div tag:</p>
<p><a href="http://nancyfusco.com/wp/wp-content/uploads/2009/01/peek-a-boo-ie.jpg"></a><a href="http://nancyfusco.com/wp/wp-content/uploads/2009/01/peek-a-boo-ie2.jpg"><img class="alignnone size-full wp-image-114" title="peek-a-boo-ie2" src="http://nancyfusco.com/wp/wp-content/uploads/2009/01/peek-a-boo-ie2.jpg" alt="peek-a-boo-ie2" width="313" height="137" /></a></p>
<p>A pretty simple fix by adding in the position: relative; to the containing div tag, as in the stylesheet for my blog:</p>
<p>.post{<br />
position: relative;<br />
margin: 10px 0;<br />
padding: 11px 11px 0;<br />
background: url(images/bg_post.jpg) no-repeat;<br />
}</p>
<p>Nice thing about this tweak &#8211; It doesn&#8217;t break how Firefox/Mozilla renders the page. It just makes IE play nice with your div layout.</p>
]]></content:encoded>
			<wfw:commentRss>http://nancyfusco.com/wp/index.php/2009/01/peek-a-boo-display-bug-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

