|
PHP insert into mysql , inserts 1, but prints correctly -
January 1st, 2008
in php, why is this? *********
test.php:
<?php
include("includes/get_files.php");
include("includes/parse_html.php");
include("includes/mysql.php");
include("includes/strip.php");
$alines = $html->get_author_lines(1);
$inauthor = " ".join($alines)." ";
$datestriped = print end(explode('***',$inauthor));
print "</br>";
$author = print strip_author("$inauthor");
etc.........
?>
*********
returns:
Published: 12-08-2006
Author: Adam Beazley
when i insert into mysql using:
$query = "INSERT INTO t4d.articles (datetime,author)
VALUES ('$datestriped','$author')";
$result = mysql_query($query);
print mysql_error();
$br = '<br>';
********problem:
1 is inserted in the mysql table columns for: $datestriped and $author!!
why is this?
my data types are varchar(200) null etc...
i have tried everything, these variables print fine in php!
i saved test.php as: utf-8 and tried & other formats, whats going on?
Thanks in advance
Tovia Singer
|