PHP insert into mysql , inserts 1, but prints correctly - KingPin's Forum
KPsDenKPsDen ArmoryImage HostingLegendz text RPGIp DisplayIRCFlash Arcade
Forum
      |        
Register
         Double dragon (Posted By:The_FreeMan - Replies:0 - Views:11)      « »     [epic] post you pic thread [/epic] (Posted By:Ego - Replies:323 - Views:7729)      « »     no wai! (Posted By:shek - Replies:15 - Views:193)      « »     Mangos : Creature, Items, Spells & object ID's (Posted By:KingPin - Replies:36 - Views:27061)      « »     Insurgency Server (Posted By:KingPin - Replies:8 - Views:188)      « »     [Check4SPAM] RE: Top 10 Most Popular iPod Video Tools (Posted By:Isabell - Replies:0 - Views:1)      « »     Leather conversions via .tradein (Posted By:vohrtechs - Replies:18 - Views:509)      « »     Infraction for wowgolds987: Repeated Rule Violaion (Posted By:Texan - Replies:0 - Views:1)      « »     Infraction for wowgolds987: Repeated Rule Violaion (Posted By:Texan - Replies:0 - Views:1)      « »     [Check4SPAM] RE: Re: wow gold (Posted By:wowgolds987 - Replies:0 - Views:1)      « »     
KingPin's Forum
 
K.P.s.N. Register vbBux / KPs Mall Bugs Blogs FAQ Search Today's Posts Mark Forums Read Donate
Go Back   KingPin's Forum > KP's Network Forum > RSS News
Reload this Page PHP insert into mysql , inserts 1, but prints correctly
 


RSS News This is a discussion on PHP insert into mysql , inserts 1, but prints correctly in the RSS News;
Description: 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)." "; ...

Reply
 
LinkBack Thread Tools
PHP insert into mysql , inserts 1, but prints correctly
(#1 (permalink))
Old
jam is Offline
Private
Points: 152, Level: 2 Points: 152, Level: 2 Points: 152, Level: 2
Activity: 0% Activity: 0% Activity: 0%
jam is an unknown quantity at this point
 
jam
Rupees: 161.00
Bank: 500.00
Total Rupees: 661.00
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
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

 
Reply With Quote
Reply

Bookmarks

Tags
correctly, insert, inserts, mysql, php, prints

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Rupees Per Thread View: 1.00
Rupees Per Thread: 15.00
Rupees Per Post: 5.00
Forum Jump



Powered by vBulletin® Version 3.8.0 Beta 1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright 2004-2009 KPsN


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81