Gary B
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Gary B
-
-
I have the following columns in a MySQL database table:
StoryHeadline [varchar]
StoryByline [varchar]
StoryText [text]
In the database, the text appears correctly. In a previous page, when I use row["StoryHeadline"] the output appears correctly.
However, on my new page, where I'm using the ID from the previous page to pull just one specific row's data, I get the letter 'r' for output of all three of these fields. Here's the code:
Setting the variables: $Headline = row["StoryHeadline"]; $ByLine = row["StoryByline"]; $StoryText = row["StoryText"]; Assembling the overall output: $StoryRecap = $Headline . '<br />by' . $ByLine . ' ' . $TimeLine . '<br /><br />' . $StoryText;
Then when printing to the page:
<?php echo $StoryRecap; ?>
What I actually end up seeing:
Quoter
by r Tue Jul 02, 1:01 am
rHow do I get my correct data to display? Thanks!
Data is coming out of MySQL as 'r' on my PHP page
in PHP
Posted
@niche when I try to just echo row["StoryHeadline"], I also get an 'r' but when I run the query directly on the database, the text appears correctly.