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 » Thu Aug 19, 2004 9:17 am
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 » Thu Aug 19, 2004 9:20 am
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 » Thu Aug 19, 2004 11:49 am
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)