Thursday, March 28, 2024

Goodies To Go! Newsletter #345


************************************************************
Goodies to Go ™
July 12, 2005 — Newsletter # 345
 
This newsletter is part of the internet.com
network.
http://www.internet.com
 

************************************************************


Featured this week:
 
*   Goodies Thoughts – Is PHP For You?
*   Q & A Goodies
*   News Goodies
*   Feedback Goodies
*   Windows Tech Goodie of the Week 
*   And Remember This…
 
************************************************************
 

Is PHP For You?
 
Are you one of those people who have given a little thought to PHP but
decided in the end that it’s a language for those computer types who run
their own servers and not really something you want to get into?  If so,
you might want to reconsider.
 
If you’re brand new to web page design, you are probably having enough
fun for now with using HMTL and all of its capabilities.  After a while
though, you will most probably join those legions of others just like
you who have started to include JavaScript into their pages to provide a
new level of interaction between you site and your visitors.
 
All will be going well for another while — your adeptship growing
nicely.  Then you will start to realize that all the interaction is
happening at your visitors computers and you’re missing out on the
game!  When it comes to the need for your site to start learning things
about your visitors, and to provide them with access to much larger
volumes of information that can be held in a few dozen web pages, you
will be wanting to connect files and databases to your pages.  You’ll
want to store information your visitors provide, and show it back to
them later on.  You will want to have server side interactivity.
 
That’s where PHP comes in.  PHP has become the most popular server side
language for the likes of us.  It is supported very widely.  You’ll find
it is available on all the best dressed hosting services.  If you’re not
sure about yours, ask ’em!  If they don’t have it, ask them if they will
be putting it in before you move!!
 
"All well and good," I hear you say, "but I don’t know any PHP."  No
problem.  As usual,, when your need is there, HTML Goodies will be there
to fill it.  We have a new PHP tutorial series being developed for you
— and it is very well und way.  You’ll find it at :

http://www.htmlgoodies.com/beyond/php/
and it’s already over twenty
sections long and still growing!  Don’t let the size fool you into
thinking it’s going to be too hard to learn either.  Dig in and you’ll
be surprised how easy it really is!
 
PHP is for everybody!
 
 
 
 
 

Thanks for Reading!
 
 
 

– Vince Barnes
 
 
 
 
 
************************************************************
 
Q & A Goodies
***********************************
Questions are taken from submissions to our Community
Mentors. You can ask a Mentor a question by going to

http://www.htmlgoodies.com/mentors/
 

Q. I am fairly new to website design and need to design a site in
FrontPage 2002 to sell a book. The book will be sent as an e-mail
attachment after customer has paid through our merchant account.  The
order form when the website is set up will go through to our bank
merchant account on a secure server and the e-mail should be
automatically attached.  Could you direct me to a tutorial somewhere
that gives me information on how to do this?
 
A. The space codes in the problem area are not followed by a semicolon,
whereas the spaces in the areas that are working have the required
semicolon — " ". Add the missing semicolons and you’ll get spaces
instead of code.
 
 

 

    
Q
. II am just curious as to how some web pages get that small icon to
the left of the URL in the Address window when you visit their site. If
someone know how that’s done I sure would like to know.

 
A. That is called a Favicon and you can find out more about it here:
http://www.favicon.com
 
 
 

    
Q. How do you set up a forum?
 
A. Instead of creating one from scratch, you should look into the many
free forums available on the web. If your server supports Active Server
Pages go to http://www.aspin.com and
do a search for "forums". If your server supports PHP, go to
http://www.code4u.com and choose a
site to visit from there.
 
 
 

    
Q. I am looking for JavaScript help in order to pre-select a option in a
select field inside a form.  I am using server-side scripting (PHP) in
order to provide the selected value.
 
A. You could use PHP to create your option tag and select the option you
want that way.  I have a small Help Desk application written in PHP that
I have set up dropdowns to select the date.  I have them default to the
current date.  Here is an example of the dropdown for the
month:
<select name="beg_req_month">
   <?php
   for($i=1;$i<=12;$i++)
        {
         if($i==$prob_month)
           {print "<option value=’" . $i . "’ selected>" . $i .
"</option>n";}
         else
           {print "<option value=’" . $i . "’>" . $i . "</option>n";}
        }
   ?>
   </select>
The variable $prob_month is set to the current month in some previous
code.  For Javascript to set the selected option you would use a
statement like this (which sets the first option tag to selected):
document.form_name.select_name.options[0].selected=true
[Beware of the period following the less than symbol in the "for"
statement above — this is one of the periods inserted as a part of the
technique mentioned in the note at the beginning of this section & does
not belong in the code you execute — Ed.]
 
 
 

 
 
Q. Q. I’m trying to set up an email form.  How do I send form data to an
email address instead of a file?  My email form just brings up outlook;
how do I get it to send email directly?  When I get data to me email
address it is in an attachment with an ".att" extension — what is this
and how do I read it?  How do I get my email form data to be formatted
as text instead of being full of stuff like
"1=on&2=on&3=Better+Management"?
 
A. To get rid of the .att extension (and formatting problems) add
enctype="text/html to the form tag like so:
<form action="mailto:somebody@somewhere.com"
method="post" enctype="text/plain">
NOTE, HOWEVER:
Version 6 (and above) browsers do not support email forms
(action="mailto:… etc.) Instead, it is necessary to use CGI scripts
(PERL, CGI Shell Scripts, PHP etc.)  Alternatively, if your server
supports FrontPage extensions, there is a "WebBot" in FrontPage that
automatically handles sending form data to an email address (as an
option to, or in addition to saving it to a file.) Also, take a look at:

http://www.htmlgoodies.com/articles/emailforms1.html
  and

http://www.htmlgoodies.com/articles/emailformphp.html
 
 
 

    
Q. I have taken over responsibilities for an inhouse intranet site and
when users access a certain page, I want to have a "pop-up" page come up
that gives specific information or instructions, and I would like to
have it close itself after a certain amount of time.  Any suggestions?
 
A. Try using a timer to execute a self.close command. You might find a
free script that does this already at

http://www.javascriptsource.com
or

http://webdeveloper.earthweb.com
, and there are other free script
sites that might have something.
 
 
 

    
Q. How can I force a user to submit a form by clicking the "Submit"
button only and not by using the "Enter" key?
 
A. This script had the desired effect, but not in all browsers. It
worked in Netscape 7 and IE 6, not in Opera 6 and Netscape 4.
<script language="JavaScript">
<!– ;
function showAlert() {
alert("don’t do that");
return false
}
// end hide –>
</script>
<form action="http://yourcgiscript"
method="post" onKeyPress="showAlert()">
<input type="submit" value="default value">
</form>
 
 
 

 

 

 
 
 
News Goodies
***********************************
 
EU Probes Intel’s European Offices
[July 12, 2005] UPDATED: Early-morning raids raise eyebrows amid EU’s
four-year-old antitrust probe of Intel’s business practices.
Read the article:

http://www.internetnews.com/bus-news/article.php/3519531
 

Tech Coalition Seeking Input to Define Spyware
[July 12, 2005] The Anti-Spyware Coalition wants input on its definition
before working on best practices for the industry and end users.
Read the article:

http://www.internetnews.com/security/article.php/3519486
 

Skype Goes Boingo For Wi-Fi

[July 12, 2005] Boingo now offers Skype access across its 18,000
hotspots.
Read the article:
hhttp://www.internetnews.com/wireless/article.php/3519476
 

Microsoft Shifting Adware Approach?
[July 12, 2005] Is Microsoft hot on Claria or soft on adware?
Read the article:

http://www.internetnews.com/ent-news/article.php/3519321
 

IBM Explores BPL in Texas
[July 12, 2005] Big Blue teams with a Texas energy company to test
Broadband over Power Lines.
Read the article:

http://www.internetnews.com/infra/article.php/3519466
 

IBM to Chill Servers With ‘Cool Blue’
[July 12, 2005] Big Blue plans to blast data centers with its server
cooling device designed to save energy.
Read the article:

http://www.internetnews.com/ent-news/article.php/3519316
 

Analysts See Solid Year for Storage
[July 12, 2005] Wall Street analysts expect a strong year for storage
sales with some vendors and technologies faring better than others.
Read the article:

http://www.internetnews.com/storage/article.php/3519416
 

HP Dips Into Dell Personnel
[July 12, 2005] HP skipper Mark Hurd continues his executive overhaul.
Read the article:

http://www.internetnews.com/bus-news/article.php/3519436
 

Domains Gone Mobile
[July 11, 2005] The Internet’s going mobile with a new top-level domain
for devices.
Read the article:

http://www.internetnews.com/wireless/article.php/3519266
 

Ruggedized Pentium Boards for Harsh Environments
[July 11, 2005] Pentium III still is state-of-the-art in embedded
space. 
Read the article:

http://www.internetnews.com/ent-news/article.php/3519286
 
 
 

 
 
 
Feedback Goodies
***********************************
 
Did you ever wish your newsletter was an easy two way communications
medium?  Ploof! It now is!
If you would like to comment on the newsletter or expand/improve on
something you have seen in here, you can now send your input to:
 
mailto:nlfeedback@htmlgoodies.com
 
We already receive a lot of email every day.  This address helps us sort
out those relating specifically to this newsletter from all the rest. 
When you send email to this address it may wind up being included in
this section of the newsletter, to be shared with your fellow readers. 
Please don’t send your questions to this address.  They should be sent
to our mentors: see
http://www.htmlgoodies.com/mentors/
 
 
 
Thanks for all your feedback!
 
 
 
 
 

Windows Tech Goodie of the Week 
***********************************
 
Running Microsoft Access Stored Queries from ASP.NET
 
While you won’t get the performance benefits you do with SQL Server, you
can use stored queries in Microsoft Access to move the query text out of
your ASP.NET code. In addition to helping you get used to the idea of
stored procedures, it might also help lessen your vulnerability to SQL
injection attacks.
 
 

*** AND ***
 

Retrieving the First N Records from a SQL Query
 
There are often times when retrieving results from a database that you
only are interested in displaying the first N records from the resulting
query.
In this article we’ll look at both ROWCOUNT and TOP and see when to use
each one. Read on to learn more!
 
 

*** AND ***
 
Hosting Indigo Web Services
 
In the second article of his series on Indigo web services, Chris Peiris
explains how to host an Indigo web service and examines the IIS, self
hosting, and Windows Activation Service hosting options. He then
provides step-by-step instructions and sample code for an IIS-hosted and
self-hosted Indigo web service.
 
 
 
 
 
 
 
 
 
 

And Remember This ...
***********************************
 
On this day in…
 

1862 Rolling Stones Make Their Debut
 
The Rolling Stones give their first public performance on this day in
1962 at the Marquee Club in London.  Mick Jagger had run into his old
school friend, Keith Richards, and invited him to join his band, known
as Little Boy Blue and the Blue Boys.  At the time, Jagger was a student
at the London School of Economics and Richards was an art student. 
Jagger and his band frequently jammed with a band known as Blues, Inc.
(which included Brian Jones.)  Blues, Inc were to play the gig at the
Marquee, but some of the members were scheduled to appear on a radio
show at the same time.  Jagger got a group together to replace Blues,
Inc. that included himself, guitarists Richards and Jones, Bass player
Dick Taylor and drummer Mick Avory (later with the Kinks.)  He named the
band the Rolling Stones after a line in a song from Muddy Waters.  About
a year later Bill Wyman joined to replace Taylor and Charlie Watts
replaced Avory.
 
 
 
Today was also the day that in: 1543 King Henry VIII married
Catherine Parr (#6 & the last); 1812 General Hull led US forces
in invasion of Canada; 1862 the US Congress authorized the Medal
of Honor; 1909 the 19th amendment to the US Constitution was
passed (granting the power to tax incomes); 1920 Lithuania became
an independent republic with the signing of a treaty with the USSR;
1934
the prison on Alcatraz Island in San Francisco Bay was
abandoned; 1948 six RAF deHavilland Vampire jets became the first
jets to cross the Atlantic; 1951 a mob tried to prevent a black
family from moving into all-white Cicero, Illinois; 1957 Dwight
Eisenhower became the first US President to fly in a helicopter; 1960
the USSR launched Sputnik 5 with two dogs aboard; 1966 a record
10.5 inches of rain fell in one day in Sandusky, Ohio; 1966 Race
riots in Chicago, Illinois; 1967 Blacks riot in Newark, New
Jersey – 26 killed, 1,500 injured & more than 1,000 arrested; 1970
Janis Joplin made her debut; 1982 the US Federal Emergency
Management Agency promised that survivors of a nuclear war would still
get their mail (uh-huh!); 1984 New York’s Geraldine Ferraro
became the US’ first major party female Vice Presidential candidate;
 

Born today were: in 1730 pottery designer and manufacturer Josiah
Wedgwood; 1817 naturalist and author Henry David Thoreau; 1854
Kodak camera inventor George Eastman; 1884 Italian artist Amedeo
Modigliani; 1895 lyricist Oscar Hammerstein II (worked with
Richard Rogers); 1895 architect and geodesic dome inventor R.
Buckminster Fuller; 1908 comedian Milton Berle; 1917
painter Andrew Wyeth; 1937 comedian Bill Cosby; 1943
singer Christie McVie; 1948 exercise guru & ? Richard Simmons;
1951
actress Cheryl Ladd; 1956 actress Mel "Mary Ellen"
Harris; 1964 actress Judi Evans;

 

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Popular Articles

Featured