PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Guy
Forum Commoner
Posts: 53 Joined: Sun Jan 12, 2003 3:34 am
Post
by Guy » Thu Apr 10, 2003 9:56 am
I'm trying to redirect a page using header()
Code: Select all
<?php
header("Location: ../index.php?msg=User does not exists: $UserName")
?>
but I only get the first part of the returned string
when requeting msg (only User)
how can I get it all?
thanks
Guy
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Thu Apr 10, 2003 10:15 am
You can't have spaces in the text like that unless they are urlencoded, try something like:
Code: Select all
$msg = urlencode('User does not exists: '.$UserName);
header('Location: ../index.php?msg='.$msg);
Mac