Click to See Complete Forum and Search --> : php links


Robotochan
06-11-2005, 12:53 PM
im begining php and i'd liek to know how to make a link to a page

is this the correct thing to do, i think i need somthign before it because it isn't working

("Location:www.domain.com")

how do i make that work so that when that line is exectuted it opens that page.

Scleppel
06-11-2005, 01:29 PM
<?php
header('Location: http://www.domain.com/');
?>

Robotochan
06-11-2005, 02:37 PM
thank you

Robotochan
06-11-2005, 02:42 PM
actually it didn't work, im getting this error message

Warning: Cannot modify header information - headers already sent by (output started at e:\domains\t\tonesettings.co.uk\user\htdocs\mailer.php:5) in e:\domains\t\tonesettings.co.uk\user\htdocs\mailer.php on line 48

Scleppel
06-11-2005, 02:45 PM
You can't have any output before this, eg. blank lines, whitespace, echoed text. Or you can put ob_start(); at the very top of your file (also with no output before it) and that should let you put the header anywhere, i think.