how to get this data back on the other page


hi,
i want to send a data by using href. like this sample.aspx?data=14 but i don’t know how to get this data back on the other page?

Use strData = Request(“data”)

if you used method = “post”, you would use request.form to retrieve the data.

Request.QueryString[“data”]

use method=”post”

sp code in a text file


I need to write asp code in a text file ( .txt extension) . How do i make it work?

You can use notepad to write the code and save the textfile as .asp or .txt for safekeeping.

Thanx for reply but i need a way to make asp engine parse the text file as asp file.

you need to configre your server to use ASP for .txt extensions

Yes, Unless you have access to configure the server this is impossible.

Powerful language – PHP


Hi,

I am very much fond of doing programming in PHP, as I find, that this language is a powerful language for creating dynamic web content. form processing, sessions, databases, XML, and graphics. With the technical support provided by the cpwebhosting team, I have launched lot of websites in PHP, and I am very much satisfied with my programmers, who have done a great job for me.

Manish

customizing storefront


Hi,

We can easily customize our storefront, Let us assume that your storefront is in English, first of all download 2 documents that are there in the webshell file management system.

Path: /yourdomain.com/catalog/includes/languages/english.php
Path: /yourdomain.com/catalog/includes/languages/english/default.php

Now, Open default.php using WebShell or NotePad:

define(‘TEXT_MAIN’, ‘This is a demonstration online-shop, <b>any products purchased will not be

delivered nor billed</b>. Any information seen on these products are to be treated

fictional.<br><br>If you wish to download this sample shop, or to contribute to this project,

please visit the <a href=”http://oscommerce.com”><u>support site</u></a>. This shop is based on

<font color=”#f0000″><b>’ . PROJECT_VERSION . ‘</b></font>.’);

define(‘TABLE_HEADING_NEW_PRODUCTS’, ‘New Products For %s’);
define(‘TABLE_HEADING_UPCOMING_PRODUCTS’, ‘Upcoming Products’);
define(‘TABLE_HEADING_DATE_EXPECTED’, ‘Date Expected’);

if ($category_depth == ‘products’ || $HTTP_GET_VARS
[‘manufacturers_id’]) {
define(‘HEADING_TITLE’, ‘Let’s See What We Have Here’);
define(‘TABLE_HEADING_IMAGE’, ”);
define(‘TABLE_HEADING_MODEL’, ‘Model’);
define(‘TABLE_HEADING_PRODUCTS’, ‘Product Name’);
define(‘TABLE_HEADING_MANUFACTURER’, ‘Manufacturer’);
define(‘TABLE_HEADING_QUANTITY’, ‘Quantity’);
define(‘TABLE_HEADING_PRICE’, ‘Price’);
define(‘TABLE_HEADING_WEIGHT’, ‘Weight’);
define(‘TABLE_HEADING_BUY_NOW’, ‘Buy Now’);
define(‘TEXT_NO_PRODUCTS’, ‘There are no products to list in this category.’);
define(‘TEXT_NO_PRODUCTS2’, ‘There is no product available from this manufacturer.’);
define(‘TEXT_NUMBER_OF_PRODUCTS’, ‘Number of Products: ‘);
define(‘TEXT_SHOW’, ‘<b>Show:</b>’);
define(‘TEXT_BUY’, ‘Buy 1 ”);
define(‘TEXT_NOW’, ” now’);
define(‘TEXT_ALL’, ‘All’);
} elseif ($category_depth == ‘top’) {
define(‘HEADING_TITLE’, ‘What’s New Here?’);
} elseif ($category_depth == ‘nested’) {
define(‘HEADING_TITLE’, ‘Categories’);
}
?>

Page “heading title” can be easily modified. But do the following when you are editing the document:
1. Make copies of english.php and default.php in a separate folder before editing the source

code. This way, if you inadvertently mess up the syntax you can always start over with the

untouched file. Failure to do so could destroy your cart.

  1. You can insert some HTML tags like <b> or <font> in between the ‘ ‘ where the text resides.

For example: define(‘TEXT_SHOW’, ‘<b>Show:</b>’);

  1. When you are done editing any PHP file, upload it back where you got it from and refresh your

storefront page to see the changes. In WebShell make sure the properties of the PHP file are

marked as “Executable” on the right hand side.

Protect php source code


hi,
Does any one have a better idea to protect PHP files so that you can distribute a ‘release’ without the customer being able to read the source files. There are tools on the internet which costs money, BUT your are dependant on their software and if its not open source, its not trustworthy.

Try PHP Encoder to protect, encrypt and encode your PHP source code assets. Includes encryption, protection, security and obfuscation.

Statements in .htaccess resulting in 500 error


Hi,

Whenever a php script requires write access to a file or directory, you have to chmod that directory (or file) to 777 (or 666 for files) on most servers. This is because on most servers apache and php runs as user ‘nobody’.
Although giving world write access will make it possible to use the script, it also means a security hole, which can be used by hackers.

To avoid this security hole some ISP’s install phpsuexec on their servers. Using phpsuexec php runs under your own username on the server. This removes the necessity to make files and folders world writable. Instead you can just use 755 for folders (the default) and 644 for files (also the default).

But using phpsuexec will result in an error 500 (internal server error) for some statements in .htaccess.

For this, you need to make sure, that whenever you are using files with (or without) an extension different then the normal extension for that filetype you can use ForceType in your .htaccess file to make it clear to the server how to handle that file (or all the files in the folder) (this works on servers without phpsuexec).

??? ForceType application/x-httpd-php

However, when your server uses phpsuexec this will result in an internal server error. To solve this you can simply use SetHandler instead of ForceType, so your .htaccess-file becomes:

??? SetHandler application/x-httpd-php

On a server without phpsuexec it is possible to use the php_value statement in a .htaccess-file to change settings of php (actually overwrite the settings from php.ini).

On a sever with phpsuexec this will also result in a server error. To solve this you can use a php.ini file which you put in the same folder as where you would have put your .htaccess file. In that php.ini file you can change all the php values. You only have to put the values you want to modify in that file. Let me give one example if you want to set the short_open_tag to Off you would have used short_open_tag? = off in your .htaccess file. Using a php.ini file this results in:

[php]

short_open_tag = Off

MySQL – Priviledges


Most of web developers are now using PHP with MySQL,

Each user role involves a fixed set of privileges on specific database:

Role: Set of privileges:
read select
read/write select, insert, delete, update
dba select, insert, update, drop, create, alter, index

Hosting mysql php web


cpwebhosting.net does provide the Hosting facility with PHP MySQL.
With PHP and MySQL database, you can store information on the web and then you can include that information on your websites.
With the use of PHP MySQL I have been doing lot of things, my websites are being hosted on the http://www.cpwebhosting.net like Banner Rotation, Databases, Forums, Websites.
* Banner Rotation. On this site, where each banner is, a PHP script is called. This opens a database and picks a random banner from it to show the visitor. It also counts the number of times the banner has been viewed and could, with a few changes, track clicks too. To add, change or edit the banners all I have to do is change the database and the script will pick the correct banners for all the pages on the site.
* Forums. Hundreds of forums (message boards) on the internet are run using PHP and MySQL. These are much more efficent than other systems that create a page for each message and offer a wide variety of options. All the pages in the forum can be updated by changing one script.
* Databases. One quite obvious example is sites which get all there information from a database. For example Script Avenue is run by a few scripts, which gain all their information from a large database. All the different script categories can be accessed in one script by just changing the URL to access a different part of the database.
* Websites. If you have a large website and you want to change the design it can take a very long time to update and upload all the pages. With PHP and MySQL your whole website could be just one or two PHP scripts. These would access a MySQL database to get the information for the pages. To update the website’s design you would just have to change one page.

CGI Scripts


Web pages can be executed as CGI scripts. CGI scripts are executables that will execute on the server to produce dynamic and interactive web pages.

Cpwebhosting.net does provide CGI capabilities which offers preinstalled, ready to run, guest-books, page-counters, and chat-forums solutions written in CGI scripts.

The use of CGI is most common on Unix or Linux servers.