html LINK tag <a href> </a> do not work fine

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

ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

I assue you have remembered to put http:// in the href? i.e.

<a href="http://www.google.com"> google </a>
ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

also try instead of:

$insert = "insert into news (post) values ('$post')";

use

$insert = "insert into news (post) values ('".addslashes($post)."')";
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Code: Select all

<?php
$post = $_POST["news"];
$insert = "insert into news(post) values('$post')";
mysql_db_query("sb", $insert);
?>
Try that.
Also, is the data getting saved correctly? (ie. is it in the db when you check)
Post Reply