<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1018310" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1018310</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107611</link>
    <description> &lt;p&gt;thanks im busy tonight so I can&#039;t try that but I have thursday, friday and the weekend of to try everything out then.&lt;/p&gt;
&lt;p&gt;Will let you know hoiw it works out&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
 </description>
     <pubDate>Wed, 24 Apr 2002 08:09:55 +0000</pubDate>
 <dc:creator>killmaster</dc:creator>
 <guid isPermaLink="false">comment 1107611 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107572</link>
    <description> &lt;p&gt;That doesn&#039;t look like a correct SQL statement.&lt;/p&gt;
&lt;p&gt;mySQL Docs:&lt;br /&gt;
&lt;a href=&quot;http://www.mysql.com/doc/C/R/CREATE_TABLE.html&quot; class=&quot;bb-url&quot;&gt;6.5.3 CREATE TABLE Syntax&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Try this:&lt;br /&gt;
CREATE TABLE messages(id int(11) DEFAULT 1 AUTO_INCREMENT PRIMARY KEY, poster TEXT, headline TEXT, time TEXT, message LONGTEXT)&lt;/p&gt;
 </description>
     <pubDate>Tue, 23 Apr 2002 18:47:43 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1107572 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107562</link>
    <description> &lt;p&gt;If the create table sql isn&#039;t working then there obviously isn&#039;t going to be a messages table, so thats why the second part won&#039;t work. The create table sql you have seems to be missing a parenthesis. You need one more parenthesis at the end to close the one that started after messages(. So the end should look like:&lt;/p&gt;
&lt;p&gt;message (longtext))&lt;/p&gt;
 </description>
     <pubDate>Tue, 23 Apr 2002 16:21:04 +0000</pubDate>
 <dc:creator>cadeh</dc:creator>
 <guid isPermaLink="false">comment 1107562 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107532</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: &lt;em&gt;Originally posted by mairving &lt;/em&gt;&lt;br /&gt;
&lt;strong&gt;Well the first thing that I would do is fix your database. Here is your code:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$create &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;CREATE TABLE messages( id (int, value: 11, default: 1, auto_increment, primary) &lt;br /&gt;poster (text) &lt;br /&gt;headline (text) &lt;br /&gt;time(text) &lt;br /&gt;message (longtext) &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Doesn&#039;t work this is wthe whole code im using...&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$db &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_pconnect&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;localhost\&quot;,\&quot;samcoleb_kill\&quot;,\&quot;trustnoone\&quot;); &lt;br /&gt;mysql_select_db(\&quot;samcoleb_news\&quot;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$db&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;); &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$create&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;CREATE TABLE messages( id (int, value: 11, default: 1, auto_increment, primary) &lt;br /&gt;poster (text) &lt;br /&gt;headline (text) &lt;br /&gt;time(text) &lt;br /&gt;message (longtext)&lt;br /&gt;&lt;br /&gt;;\&quot;; &lt;br /&gt;mysql_query(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$create&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;); &lt;br /&gt; &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;this is what I get when I try and view the news&lt;br /&gt;
[b]&lt;br /&gt;
Table &#039;samcoleb_news.messages&#039; doesn&#039;t exist&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://157.238.47.212/admin/displaynews.php&quot; class=&quot;bb-url&quot;&gt;http://157.238.47.212/admin/displaynews.php&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;
 </description>
     <pubDate>Tue, 23 Apr 2002 06:51:54 +0000</pubDate>
 <dc:creator>killmaster</dc:creator>
 <guid isPermaLink="false">comment 1107532 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107531</link>
    <description> &lt;p&gt;giv eme a sec and I will let you know&lt;/p&gt;
 </description>
     <pubDate>Tue, 23 Apr 2002 06:36:11 +0000</pubDate>
 <dc:creator>killmaster</dc:creator>
 <guid isPermaLink="false">comment 1107531 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107530</link>
    <description> &lt;p&gt;Hey killmaster,&lt;/p&gt;
&lt;p&gt;I looked at common.php and your display news page. Looks like your missing two lines of php code.&lt;/p&gt;
&lt;p&gt;Try this in your display news code.&lt;/p&gt;
&lt;p&gt;include(&quot;common.php&quot;);&lt;br /&gt;
$sql = &quot;Select * From messages Limit 0,5&quot;;&lt;br /&gt;
$result = mysql_query($sql) OR die(mysql_error());&lt;br /&gt;
while($n = mysql_fetch_array($result)) {&lt;/p&gt;
&lt;p&gt;That should select your last 5 inserted messages. If you want more just make the 5 into something bigger.&lt;/p&gt;
 </description>
     <pubDate>Tue, 23 Apr 2002 06:32:23 +0000</pubDate>
 <dc:creator>cadeh</dc:creator>
 <guid isPermaLink="false">comment 1107530 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107528</link>
    <description> &lt;p&gt;hmm thanks for that I will fix the add database code of it&lt;br /&gt;
as for the problems I will get back to you on that one gtg be back tommorrow&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
 </description>
     <pubDate>Tue, 23 Apr 2002 05:32:57 +0000</pubDate>
 <dc:creator>killmaster</dc:creator>
 <guid isPermaLink="false">comment 1107528 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107471</link>
    <description> &lt;p&gt;Well the first thing that I would do is fix your database. Here is your code:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$create &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;CREATE TABLE messages( id (int, value: 11, default: 1, auto_increment, primary) &lt;br /&gt;poster (text) &lt;br /&gt;headline (text) &lt;br /&gt;time(text) &lt;br /&gt;message (longtext) &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
Several things that I would do. One is to make the primary field, message_id instead of id. This way if you join tables, it avoids same column names. Then you really don&#039;t need a default value for the id. It will start at 1 and go up from there. I would make the headline field, probably a varchar of fixed length to prevent a too long headline or wasted space. Time doesn&#039;t need to be text either. You could make it an integer, insert the value as a Unix timestamp get you values that way. Poster should also be varchar(30-50). &lt;/p&gt;
&lt;p&gt;I didn&#039;t really get to look at the other code. What kind of problems are you having?&lt;/p&gt;
 </description>
     <pubDate>Mon, 22 Apr 2002 16:12:15 +0000</pubDate>
 <dc:creator>mairving</dc:creator>
 <guid isPermaLink="false">comment 1107471 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107434</link>
    <description> &lt;p&gt;ok here is another script I have decided to create - &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://157.238.47.212/mynews.zip&quot; class=&quot;bb-url&quot;&gt;http://157.238.47.212/mynews.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Except I was wondering as I don&#039;t know what the heck is going on I was wondering if someone would be able to debug the code?&lt;/p&gt;
&lt;p&gt;Make it work just to post and view news.&lt;br /&gt;
Something is also going on when I try and create the table as well but I don&#039;t know what&lt;/p&gt;
&lt;p&gt;thanks alot for all your help&lt;/p&gt;
 </description>
     <pubDate>Mon, 22 Apr 2002 09:48:14 +0000</pubDate>
 <dc:creator>killmaster</dc:creator>
 <guid isPermaLink="false">comment 1107434 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/need-some-php-help-code#comment-1107430</link>
    <description> &lt;p&gt;this is the code in the common.php file&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$db &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;mysql_connect&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;localhost\&quot;,\&quot;samcoleb_kill\&quot;,\&quot; *** \&quot;); &lt;br /&gt;mysql_select_db(\&quot;samcoleb_news\&quot;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$db&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;this is the database connection code in which then I will only have to change one file instead of all if it needs to be updated&lt;/p&gt;
 </description>
     <pubDate>Mon, 22 Apr 2002 05:32:32 +0000</pubDate>
 <dc:creator>killmaster</dc:creator>
 <guid isPermaLink="false">comment 1107430 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
