<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Thu Jun 20, 2013 11:34 am by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Thu Jun 20, 2013 11:34 am</pubDate>
  <lastBuildDate>Thu Jun 20, 2013 11:34 am</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>Refresh question PHP project 4 coding academy</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=100335#100335</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=67581'&gt;madoba&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Jul 06, 2011 3:04 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I've completed project 4 and now have a question about it?&lt;br /&gt;
&lt;br /&gt;
When I submit an item for the todo list and wait for the page to post back and then refresh or postback the page, the item is added into the database again.  Why does this happen and How do I prevent this behavior? The project just doesn't seem complete without addressing this problem.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=100335#100335</comments>
                                        <author>madoba</author>
                                        <pubDate>Wed Jul 06, 2011 3:04 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=100335#100335</guid>
                                      </item>
                                      <item>
                                        <title>Re: Project4 in PHP Coding Academy</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91083#91083</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=23984'&gt;bobthebob1234&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Jul 21, 2010 7:19 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I missed it as well when i was reading your post. It was only when I got the highlighting up that I saw that there was something wrong!</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91083#91083</comments>
                                        <author>bobthebob1234</author>
                                        <pubDate>Wed Jul 21, 2010 7:19 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91083#91083</guid>
                                      </item>
                                      <item>
                                        <title>Gedit + Project4</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91079#91079</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=15566'&gt;Bryan&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Jul 21, 2010 4:58 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Thank you for taking the time to spot my error.&lt;br /&gt;
At age 78 my observation skills are not quite as good as they used to be!</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91079#91079</comments>
                                        <author>Bryan</author>
                                        <pubDate>Wed Jul 21, 2010 4:58 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91079#91079</guid>
                                      </item>
                                      <item>
                                        <title>Re: Project4 in PHP Coding Academy</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91067#91067</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=23984'&gt;bobthebob1234&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Jul 20, 2010 9:35 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Bryan wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;br /&gt;
print &amp;quot;&amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;$task_Name&amp;lt;/strong&amp;gt;-$task_Description&amp;lt;/li&amp;gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
You're missing the &amp;quot; at the end of the line.&lt;br /&gt;
&lt;br /&gt;
Should be &lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;print &amp;quot;&amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;$task_Name&amp;lt;/strong&amp;gt;-$task_Description&amp;lt;li&amp;gt;&amp;quot;;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Just out of interest what text editor are you using. I just pasted your code into gedit on ubuntu, turned on highlighting and then I could instantly see that there was a &amp;quot; missing because of the different highlighting.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91067#91067</comments>
                                        <author>bobthebob1234</author>
                                        <pubDate>Tue Jul 20, 2010 9:35 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91067#91067</guid>
                                      </item>
                                      <item>
                                        <title>Project4 in PHP Coding Academy</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=91062#91062</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=15566'&gt;Bryan&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Jul 20, 2010 8:12 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      When running the script up to and including page 63 I get the following error message:&lt;br /&gt;
bryan@Second:~$ cd /var/www&lt;br /&gt;
bryan@Second:/var/www$ php project4.php&lt;br /&gt;
PHP Parse error:  syntax error, unexpected '/' in /var/www/project4.php on line 19&lt;br /&gt;
bryan@Second:/var/www$ &lt;br /&gt;
&lt;br /&gt;
I have tried amending the lines adjacent to line 19 but without success.&lt;br /&gt;
Have I made a mistake or is there a printing error in the booklet?&lt;br /&gt;
This is my code listing:&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
mysql_connect(&amp;quot;localhost&amp;quot;, &amp;quot;root&amp;quot;, &amp;quot;bryan&amp;quot;);&lt;br /&gt;
msql_select_db(&amp;quot;testing&amp;quot;);&lt;br /&gt;
if(isset($_POST[&amp;quot;task_name&amp;quot;])){&lt;br /&gt;
$task_name=$_POST[&amp;quot;task_name&amp;quot;];&lt;br /&gt;
$task_description=$_POST[&amp;quot;task_description&amp;quot;];&lt;br /&gt;
$task_name=mysql_real_escape_string($task_name);&lt;br /&gt;
$task_description=mysql_real_escape_($task_description);&lt;br /&gt;
mysql_query(&amp;quot;insert into todo(Name,Description)values ('$task_name', '$task_description');&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
$tasks=mysql_query(&amp;quot;select ID, Name, Description from todo;&amp;quot;);&lt;br /&gt;
if(msql_num_rows($tasks)){&lt;br /&gt;
print &amp;quot;&amp;lt;h1&amp;gt;Existing tasks&amp;lt;/h&amp;gt;&amp;quot;;&lt;br /&gt;
print &amp;quot;&amp;lt;ul&amp;gt;&amp;quot;;&lt;br /&gt;
while($task=mysql_fetch_assoc($tasks)) {&lt;br /&gt;
extract($task, EXTR_PREFIX_ALL, &amp;quot;task&amp;quot;);&lt;br /&gt;
print &amp;quot;&amp;lt;li&amp;gt;&amp;lt;strong&amp;gt;$task_Name&amp;lt;/strong&amp;gt;-$task_Description&amp;lt;/li&amp;gt;;&lt;br /&gt;
}&lt;br /&gt;
print &amp;quot;&amp;lt;/ul&amp;gt;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;Add new task&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;project4.php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Name it:&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;task_name&amp;quot; /&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Describe it: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;task_description&amp;quot; /&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Add&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=91062#91062</comments>
                                        <author>Bryan</author>
                                        <pubDate>Tue Jul 20, 2010 8:12 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=91062#91062</guid>
                                      </item></channel></rss>