Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending a quote to a html file

Status
Not open for further replies.

Kennya1

Programmer
Joined
Apr 14, 2002
Messages
15
Location
US
If I want to send the following to an HTML file

$m = '<A HREF="mailto:youxrname@aol.com">
youxrname@aol.com</A>');
header("Location: message.html?message=" . $m);

The message.html file sees it as

\"mailto:youxrname@aol.com\">youxrname@aol.com</A></font>

How do i get rid of the slashes
 
Oops it sees it as

\"mailto:youxrname@aol.com\">youxrname@aol.com</A>
 
Oops 2


One Last time
<A HREF=\"mailto:youxrname@aol.com\">
youxrname@aol.com</A>

How do I get rid of the slashes
 
Try:
Code:
header("Location: message.html?message=" . urlencode($m));
or
Code:
header("Location: message.html?message=" . htmlentities($m));
 
Kennya1:
It looks to me like you're trying to send both content and a "Location" header, in that order.

First, all headers must be sent before all content. Unless you are using PHP's output control functions.

Second, a "Location" header immediately bounces the browser to the location specified. There's no point trying to send content, too, as the user will never see it.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top