View Single Post
Old 30th June 2008, 10:09 AM   #4 (permalink)
TygerTyger
Lumberjack and OK
 
Join Date: Aug 2004
Posts: 833
Code:
echo "<a href='news_content.php?id=$id&amp;header=".str_replace(' ', '_', $hpagesheader)."' title='$hpagesheader'>";


Don't forget when you're getting something from the database you will need to change it back again, replacing underscores with spaces, notice the order in str_replace has been switched.

Code:
$hpageswhatever = mysql_real_escape_string(str_replace('_', ' ', $_POST['hpagesheader']));
TygerTyger is offline   Reply With Quote