Code: Select all
<tr>
<td class="news"><?php print $news; ?></td>
</tr>Code: Select all
<P>Here is an image</P>
<P><IMG alt=image hspace=0 src="images/wmp_error.png" border=0></P>Any ideas? I can provide more info if needed.
Moderator: General Moderators
Code: Select all
<tr>
<td class="news"><?php print $news; ?></td>
</tr>Code: Select all
<P>Here is an image</P>
<P><IMG alt=image hspace=0 src="images/wmp_error.png" border=0></P>Code: Select all
<table cellpadding="0" cellspacing="0" class="moduletable">
<tr>
<th valign="top">News</th>
</tr>
<tr>
<td>
<?php
include ('config.php');
$sql = "SELECT * FROM JQA_news ORDER by 'id' DESC";
$result = mysql_query($sql);
if ($myrow = mysql_fetch_array($result)) {
do
{
$id=$myrow["id"];
$title=$myrow["title"];
$topicimage=$myrow["topicimage"];
$news=$myrow["news"];
$poster=$myrow["poster"];
$date=$myrow["date"];
?>
<!-- Begin News Table -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tborder">
<tr>
<td rowspan="3"><div align="center"><img class="mosimage" src="images/topics/<?php echo "$topicimage"; ?>" /></div></td>
<td width="81%" height="5" class="newstitle"><?php echo "$title"; ?><hr /></td>
</tr>
<tr>
<td class="tabledescription"><?php print $news; ?></td>
</tr>
<tr>
<td><hr /><span class="postedby">Posted by <?php echo "$poster"; ?> on <?php echo "$date"; ?></span></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<!-- End News Table -->
<?php
}
while ($myrow = mysql_fetch_array($result));
}
?>
</td>
</tr>
</table>Code: Select all
CREATE TABLE `JQA_news` (
`id` int(20) NOT NULL auto_increment,
`title` varchar(50) default NULL,
`topicimage` varchar(100) default NULL,
`news` mediumtext,
`poster` varchar(50) default NULL,
`date` varchar(50) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) TYPE=MyISAM AUTO_INCREMENT=16 ;Code: Select all
Welcome to our site, this is the news system.Code: Select all
<P>Here is an image</P>
<P><IMG alt=image hspace=0 src="images/wmp_error.png" border=0></P>Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
most likely not, here is the code for inserting info to the databaseCode: Select all
/* FIX STRING */
$title = FixString($title);
$topicimage = FixString($topicimage);
$news = FixString($news);
$poster = FixString($poster);
$date = FixString($date);
$sql = "INSERT INTO JQA_news (
title,
topicimage,
news,
poster,
date
$addl_insert_crit ) VALUES (
'$title',
'$topicimage',
'$news',
'$poster',
'$date'
$addl_insert_values )";
if ($sql_debug_mode==1) { echo "<BR>SQL: $sql<BR>"; }
$result = mysql_query($sql,db() );
if ($result == 1) {
echo "<p><DIV align='center'>News Added!</DIV></p>";
} else {
echo ThrowError("9994SQL",$sql);
echo "Error inserting record";
}
//***** END INSERT SQL *****
/*-------------------------------------------------------------------------------
ADD NEW RECORD (CREATING)
-------------------------------------------------------------------------------*/
if (!$post) {//THEN WE ARE ENTERING A NEW RECORD
//SHOW THE ADD RECORD RECORD DATA INPUT FORM
?>
<FORM METHOD="POST" ACTION="<?php echo $thispage; ?>?proc=New&post=yes&<?php echo $pagevars; ?>">
<TABLE ALIGN='center'>
<TR>
<TD>
<B>Title:</B>
</TD>
<TD>
<INPUT type="text" NAME="title" SIZE="20">
</TR>
<TR>
<TD>
<B>Topic:</B>
</TD>
<TD>
<?php
echo "<SELECT NAME=\"topicimage\" SIZE=\"1\">";
include ('config.php');
//******** BEGIN LISTING THE CONTENTS OF JQA_news_topics*********
//CONNECTION STRING
mysql_connect($dbserver, $dbuser, $dbpass)
or die ("UNABLE TO CONNECT TO DATABASE");
mysql_select_db($dbname)
or die ("UNABLE TO SELECT DATABASE");
$sql = "SELECT * FROM JQA_news_topics ORDER by 'topic' ASC";
$result = mysql_query($sql);
if ($myrow = mysql_fetch_array($result)) {
do
{
$topic=$myrow["topic"];
$image=$myrow["image"];
echo "<option value=\"$image\">$topic</option>";
}
while ($myrow = mysql_fetch_array($result));
}
echo "</SELECT>";
?>
</TR>
<TR>
<TD CLASS='TBL_ROW_HDR'>
<B>News:</B>
</TD>
<TD>
<textarea CLASS='TXT_BOX'NAME="news" ROWS="4" cols="35"></TEXTAREA>
</TR>
<TR>
<TD CLASS='TBL_ROW_HDR'>
<B>Poster:</B>
</TD>
<TD>
<INPUT CLASS='TXT_BOX' type="text" NAME="poster" SIZE="20">
</TR>
<TR>
<TD CLASS='TBL_ROW_HDR'>
<B>Date:</B>
</TD>
<TD>
<INPUT CLASS='TXT_BOX' type="text" value="<?php echo date('l, F j, Y') ?> @ <?php echo date('h:i:s A') ?>" NAME="date" SIZE="20" readonly>
</TR>
<TR>
<TD>
</TD>
<TD>
<INPUT CLASS='BUTTON' TYPE="SUBMIT" VALUE="Submit News" NAME="SUBMIT">
<INPUT CLASS='BUTTON' TYPE="RESET" VALUE="Reset" NAME="RESET">
</TD>
</TR>
</TABLE>
<BR>
</FORM>Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]Code: Select all
$news = FixString($news);