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
nikko50
Forum Commoner
Posts: 43 Joined: Thu Apr 08, 2004 6:28 am
Post
by nikko50 » Mon Oct 11, 2004 12:51 pm
twigletmac | Help us, help you. Please use Code: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hello all. Why in the below code does the $message variable only echo the first word "this" on the next page ?? All the rest are chopped off when passing this variable through the url.Code: Select all
$message="this is a test.";
echo "<meta http-equiv=refresh content=0;url=Admin.php?message=$message>";
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Mon Oct 11, 2004 1:05 pm
try [php_man]urlencode[/php_man]()
nikko50
Forum Commoner
Posts: 43 Joined: Thu Apr 08, 2004 6:28 am
Post
by nikko50 » Mon Oct 11, 2004 1:22 pm
OK. Still not working. What am I doing wrong:(
echo "<meta http-equiv=refresh content=0;url=emailAdmin.php?message=',urlencode($message),'>";
Tracy
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Mon Oct 11, 2004 1:29 pm
Example 1. urlencode() example
<?php
echo '<a href="mycgi?foo=', urlencode($userinput), '">';
?>
nikko50
Forum Commoner
Posts: 43 Joined: Thu Apr 08, 2004 6:28 am
Post
by nikko50 » Mon Oct 11, 2004 4:23 pm
I'm sorry but I must be stupid or something. I can't get this to work.Here's what I have so far but the variable will not pass. Please help.
Tracy
echo "<meta http-equiv=refresh content=0;url=emailAdmin.php?message=urlencode($message)>";
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Mon Oct 11, 2004 4:27 pm
Code: Select all
<?
echo "<meta http-equiv=refresh content=0;url=emailAdmin.php?message=',urlencode($message),'>";
?>
Did you fail to see my example?
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Tue Oct 12, 2004 4:52 am
Try using quotes on the meta tag's attribute too:
Code: Select all
echo '<meta http-equiv="refresh" content="0;url=emailAdmin.php?message=',urlencode($message),'">';
Mac