Hi there,
I'm back once again with a minor question about the script for my site: www.everything.ie
I want to allow people to include html in their ads so that if they type in a web address it will automatically apear as a link that opens a new window. Just like when you click on the above link.
At the moment the only way to make a link appear is by putting in code in the following form, but it is too complicated for most:
<A HREF="http://www.everything.ie/" TARGET="_blank">Surely the best website in the world</a>
This seems to be possible with the script, but its not working:
Here's the bit of script, perhaps one of you can see what's wrong with it?
//
// ============================================================
// formats input fields to accomodate HTML chars and slashes etc.
// ============================================================
//
function format_insert($what,$dontreplace=false) {
if (!get_magic_quotes_gpc()) {
$what = addslashes($what);
}
if (!$dontreplace) $what = strip_tags($what);
return $what;
}
//
// ============================================================
// formats input fields to accomodate HTML chars and slashes etc.
// ============================================================
//
function format_input($what) {
if (get_magic_quotes_gpc()) {
$what = stripslashes($what);
}
$what = htmlentities($what);
return $what;
}
I'd appreciate any help, as always.
Thanks,
Robert