Viewpoint From the Web
Here you will find a collection of my thoughts about software, technology and life in general.
 
 
 
October 2008
M T W T F S S
« Sep    
 12345
6789101112
13141516171819
20212223242526
2728293031  
 
 

Posts Tagged ‘tutorial’

Redirect using PHP

Thursday, 20th December 2007 by Musaul Karim

Redirecting using PHP is very simple. You just need a single line of code in your php page. I’ll split it out to two lines in the example below for the sake of clarity. Create a text file, calling it redirect.php. Add the following content to it:

<?php
$URI = $_REQUEST['to'];
Header ("Location: $URI");
?>

In the above example, we use the ‘to‘ parameter to specify our target URI.

To use this in your pages your link would look like the following:

<a href="http://www.example.com/redirect.php?to=http://www.vftw.com">Visit vftw.com</a>

You’d obviously replace example.com with your own domain, or you can omit it if you are referring it from the same domain.

Make sure there are no spaces or line-breaks before the <?php. If you are modifying the HTTP header, you are not allowed to write the the stream before that line.

Base is the database package that comes with openoffice.org 2.x. It seems quite OK as a desktop database package. But, I’ve found that resources for macro editing in basic for base are quite scarce. This is quite a problem since the editor it comes with doesn’t have intellisense/autocomplete. The uno documentation is way too big to be of any real use as a reference document. So I thought I’ll just write a beginners tutorial for connecting to the base database that is currently open from a form using openoffice.org basic macro. Read the rest of this article »