| Return
to Table of Contents
MySQL
Chilisoft
ASP
PHP
Miva
Empresa
Flash / SWF
MySQL
Just send
an e-mail to support to request that your account be setup with an MySQL
database. Be certain to include your domain name in the email.
Once your database
is created, to access it, you will need to use either Telnet
(SSH) or a Perl or PHP
script. Click
here for examples of Perl/PHP use with MySQL.
If
using Telnet (SSH),
from the prompt, type:
mysql -uxxxx -pyyy databasename
where
xxx is a username
yyy is a password
Press Enter.
To receive
help, at the mysql prompt, type:
mysql> help
For additional
help with MySQL, please refer to http://www.mysql.com/doc/T/u/Tutorial.html.
To
connect to mySQL using mySQLPerl Module,
use the following outline to connect and begin querying the mySQL server
from a Perl script. Remember that you cannot connect to your databases
remotely due to security concerns. You can only connect from localhost.
1. Declarations
You must require
the mySQL package for your script to function properly. Do this by including
the following line in your code: use Mysql;
2. Connect to the
Database
Somewhere near the
beginning of your script, you need to make your initial connection to the
database server. Using the following form, substitute your database, username,
and password for the examples to connect successfully.
Mysql->connect('localhost','DATABASENAME','USERNAME','USERPASSWORD');
3. Executing a Query
You are now ready
to begin querying the database server. [Most problems that you may incur
will generally occur due to invalid permission settings for the specified
user.]
To
connect to mySQL through PHP,
use the following outline to connect and begin querying the mySQL server
from within your PHP scripts. Remember that you cannot connect to your
databases remotely due to security reasons. You can only connect to them
from localhost.
1. Connect to the
mySQL Server
Use the following
statement to connect to the database server. Substitute the username, and
password for ones you have created in the WebControl System.
MYSQL_CONNECT('localhost','USERNAME','PASSWORD');
2. Select Your Database
Use the following
statement to select the database you wish to connect to. Make sure you
substitute the example with your database name.
@mysql_select_db("DATABASENAME");
3. Executing A Query
You are now ready
to execute your queries. (Most problems that arise with your scripts will
be due to incorrect permission settings.)
Chilisoft
ASP
Active Server Pages are
an effective way to create web server applications. Active Server
Pages are web pages saved with the file extension “.asp”. The web
server will recognize the file extension, process it and send the results
of the processing to the web client’s browser as an HTML page.
Active Server Pages can be
written in a number of scripting languages such as JScript, PerlScript
and VBScript. An ASP
file can contain text, scripts
and HTML TAGS. The scripts on an ASP page are interpreted on the
server therefore the
browser does not need to
support scripting.
To connect to your MySQL
database using ASP, use the following syntax:
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={MySQL};
SERVER=localhost; DATABASE=your_database_name; UID=your_main_user_id; PWD=your_database_password"
For additional help, please refer to the Chilisoft site at http://chilisoft.com/caspdoc/30html/index.html.
PHP
PHP4 is installed
on all servers
Any web page
you create that uses PHP should be saved with a .php, .php3 or .php4 extension
to be parsed properly.
For additional
help, please visit http://www.php.net.
Miva
Empresa
Miva Empresa is
installed on all of our servers. The Miva engine, Miva Empresa, provides
a platform for the Miva storefront and
custom applications
to run on the Web server. You may use the Miva engine to create dynamic
Web sites that integrate scripting, database, and commerce features. They
can be run on the Web server or your Windows-based PC. This feature is
not to be confused with the popular Miva Merchant storefront software that
runs on top of the Miva engine. Miva Merchant can be purchased and installed
on your hosting plan or server. Miva has an excellent Miva Script reference
manual located at http://www.miva.com/docs/ScriptMan_html/MivaScriptMan.html.
Flash Embedded in HTML
After creating a Flash movie you choose File
> Save As from the top menu to save your movie. Save the file as "Somefilename.fla".
To embed the Flash movie you just made into an
HTML page, you should go back to your Flash program and do the following
steps:
Step 1
Choose File > Open. Open a Flash movie you have created.
Step 2
Choose File > Export Movie.
Step 3
Name the file "somefilename.swf". Choose the location where the file
is to be stored (in your Web folder). Click OK.
Step 4
Open the HTML page where you want to insert your Flash movie. Insert this
code:
<object width="550" height="400">
<param name="movie" value="somefilename.swf">
<embed src="somefilename.swf" width="550" height="400">
</embed>
</object>
|
Note: This is the minimum code you need to
embed a Flash movie in a browser. A broken icon will appear on the Web page if
the user does not have the Flash plug-in installed.
Note: In the code above there is both an
<embed> tag and an <object> tag. This is because the
<object> tag is recognized by Internet Explorer, and Netscape recognizes
the <embed> tag and ignores the <object> tag.
Step 5
Type in the address of the HTML file in your browser and look at your first
Flash movie.
Let the Flash Program do the Work
The code above is the absolute minimum code to
embed Flash movies in HTML pages. It is not recommended to use the minimum
code. There should be a few more attributes added:
- classid is an attribute to the
<object> tag. It tells Internet Explorer to load the ActiveX plug-in
if it is not installed
- pluginspage is an attribute to the
<embed> tag. It displays a link to the Shockwave download page if
Netscape does not have it
The Flash program can add these attributes for
you:
Step 1
Choose File > Publish. Flash will now create the <object>, <param>,
and <embed> tags for you. It will also create the classid and
pluginspage attributes.
Step 2
Open the HTML document that Flash created, view the HTML source and copy the
code into your HTML page where you want your Flash movie.
Step 3
Be sure that you have the "somefilename.swf" in your Web folder.
Step 4
Type in the address of the HTML file in your browser and look at your first
Flash movie. |