Hi,
I am trying to redirect my current php page to a htm page that has content, but I can't seem to get the header function to work...is there another way to get a page to redirect in php? I can do it with a small java script (window.location), but after I get the page launched I need to encode it, so that the users can't cut and paste the weblink and share it with their friends?
Any help you can forward me would appreciated.
Brad
Newbie to PHP: Trying to change url and encode it
Moderator: General Moderators
-
bradsteele
- Forum Newbie
- Posts: 15
- Joined: Fri Jun 17, 2005 10:27 am
-
bradsteele
- Forum Newbie
- Posts: 15
- Joined: Fri Jun 17, 2005 10:27 am
Code: Select all
<?PHP
if(mysql_affected_rows()==0) {
print "Invalid Username and/or Password.";
exit();
}
else {
print "Successfully logged into system. Redirecting you to Math Trek 7, 8 Web Site";
// sleep(5);
?>
//Header("Location: http://www.somewhere.com");
<script language="JavaScript">
window.location = "http://rwa.occdsb.on.ca/mt78/menu.htm"
</script>
<?PHP
}}}
?>- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Code: Select all
<?php
header('Location: your_url.php');
//Other content BELOW the header
?>
Yadda yadda yadda-
bradsteele
- Forum Newbie
- Posts: 15
- Joined: Fri Jun 17, 2005 10:27 am