# \[Php\] Creating a News System

**URL:** <https://forum.kirupa.com/t/php-creating-a-news-system/182553>\
**Category:** programming\
**Created:** [March 19, 2006, 11:39am UTC](https://forum.kirupa.com/t/php-creating-a-news-system/182553 "2006-03-19T11:39:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaxza](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zaxza/32/2227_2.png) [@Zaxza](https://forum.kirupa.com/u/Zaxza)\
**Post date:** [March 19, 2006, 11:39am UTC](https://forum.kirupa.com/t/php-creating-a-news-system/182553/1 "2006-03-19T11:39:57Z")

</div>

\*\*[U][SIZE=1][COLOR=Black][http://codewalkers.com/tutorials.php?show=5](http://codewalkers.com/tutorials.php?show=5)

[/COLOR][/SIZE][/U]\*\*[SIZE=1]I’ve just finished this tutorial. And have realised that the’\<img src=’ tag and ‘\<a href=’ tag don’t work properly. In the html a ‘’ symbol incerts itself before a ’ " ’ symbol.

e.g. \<img src=“images/logo.gif”\>

and before a link this happens…

Type this in the field \<a href=“[http://www.yoursite.com](http://www.yoursite.com)”\>

Outcome = [http://www.mysite.com/“http://www.yoursite.com”](http://www.mysite.com/%22http://www.yoursite.com%22)

Is there a simple way to stop this, or should i try to make a BB Code for it?  
[/SIZE]

---

<div class="post-metadata">

**Author:** ![mlk](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mlk](https://forum.kirupa.com/u/mlk)\
**Post date:** [March 19, 2006, 12:49pm UTC](https://forum.kirupa.com/t/php-creating-a-news-system/182553/2 "2006-03-19T12:49:17Z")

</div>

have you tried outputing ‘"’ instead of the ‘quotes’ character ? ( " )

---

<div class="post-metadata">

**Author:** ![mlk](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mlk](https://forum.kirupa.com/u/mlk)\
**Post date:** [March 19, 2006, 12:50pm UTC](https://forum.kirupa.com/t/php-creating-a-news-system/182553/3 "2006-03-19T12:50:01Z")

</div>

have you tried outputing ‘"’ instead of the ‘quotes’ character ? ( " )

---

<div class="post-metadata">

**Author:** ![Sliker\_Hawk](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Sliker\_Hawk](https://forum.kirupa.com/u/Sliker_Hawk)\
**Post date:** [March 19, 2006, 1:35pm UTC](https://forum.kirupa.com/t/php-creating-a-news-system/182553/4 "2006-03-19T13:35:57Z")

</div>

For the purposes of this thing, I’ll call the input field $input.  
Type in input field: \<a href=“[http://www.yoursite.com](http://www.yoursite.com)”\>

In PHP, type this after receiving the field (in post or whatever) and before echoing it:  
$input = stripslashes($input);

Outcome should be \<a href=“[http://www.yoursite.com](http://www.yoursite.com)”\>

… If I understand you.

---

<div class="post-metadata">

**Author:** ![Zaxza](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zaxza/32/2227_2.png) [@Zaxza](https://forum.kirupa.com/u/Zaxza)\
**Post date:** [March 19, 2006, 2:48pm UTC](https://forum.kirupa.com/t/php-creating-a-news-system/182553/5 "2006-03-19T14:48:23Z")

</div>

> [@Sliker\_Hawk](#):
>
> For the purposes of this thing, I’ll call the input field $input.  
> Type in input field: \<a href=“[http://www.yoursite.com](http://www.yoursite.com)”\>
> 
> In PHP, type this after receiving the field (in post or whatever) and before echoing it:  
> $input = stripslashes($input);
> 
> Outcome should be \<a href=“[http://www.yoursite.com](http://www.yoursite.com)”\>
> 
> … If I understand you.

Thanks for your help…  
I tried this and managed to get rid of the red bit below… [SIZE=1][COLOR=Silver][http://www.mysite.com/\“http://www.yoursite.com[/COLOR][COLOR=Red]\”](http://www.mysite.com/%5C%22http://www.yoursite.com%5B/COLOR%5D%5BCOLOR=Red%5D%5C%22)

[SIZE=2][COLOR=Black]But the rest still appears…[/COLOR][/SIZE]  
[/COLOR][/SIZE]
