<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Fri May 24, 2013 8:49 pm by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Fri May 24, 2013 8:49 pm</pubDate>
  <lastBuildDate>Fri May 24, 2013 8:49 pm</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://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>Re: form data isn't making it to the database. any help?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=101223#101223</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=60586'&gt;rcayea&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Fri Aug 19, 2011 8:13 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Thanks for the tips. They helped solve the problem.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=101223#101223</comments>
                                        <author>rcayea</author>
                                        <pubDate>Fri Aug 19, 2011 8:13 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=101223#101223</guid>
                                      </item>
                                      <item>
                                        <title>Re: form data isn't making it to the database. any help?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=101180#101180</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2326'&gt;ollie&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Aug 17, 2011 3:55 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      You are also using the variable $email twice. You are setting $email to &amp;quot;myemail@gmail.com&amp;quot; and then 4 lines later setting $email to the submitted email from the form - &amp;quot;$email = $_POST['email'];&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Are you sure this is what you want to do?</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=101180#101180</comments>
                                        <author>ollie</author>
                                        <pubDate>Wed Aug 17, 2011 3:55 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=101180#101180</guid>
                                      </item>
                                      <item>
                                        <title>Re: form data isn't making it to the database. any help?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=101170#101170</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2464'&gt;johnhudson&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Aug 16, 2011 7:18 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Try this: I don't understand the point of the second VALUES statement and I have made one subtle change, putting the semi-colon inside the quotation marks around the query. Your previous query was incomplete because the semi-colon was not part of it.&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;Quote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&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;$query = &amp;quot;INSERT INTO poem_orders &amp;#40;firstname, lastname, email, selectpoemtype, keynames, specificwords, poemisfor, relationship, occasion, overallmessage, anythingelse&amp;#41; VALUES &amp;#40;'$first_name', '$last_name', '$email', '$select_poem_type' '$key_names', '$specific_words', '$poem_is_for', '$relationship', '$occasion', '$over_all_message', '$anything_else'&amp;#41;;&amp;quot;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=101170#101170</comments>
                                        <author>johnhudson</author>
                                        <pubDate>Tue Aug 16, 2011 7:18 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=101170#101170</guid>
                                      </item>
                                      <item>
                                        <title>Re: form data isn't making it to the database. any help?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=101167#101167</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=23984'&gt;bobthebob1234&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Aug 16, 2011 5:41 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;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&lt;br /&gt;
$query = &amp;quot;INSERT INTO poem_orders &amp;#40;firstname, lastname, email, selectpoemtype, keynames, specificwords, poemisfor, relationship, occasion, overallmessage, anythingelse&amp;#41; VALUES &amp;#40;'$first_name', '$last_name', '$email', '$select_poem_type' '$key_names', '$specific_words', '$poem_is_for', '$relationship', '$occasion', '$over_all_message', '$anything_else'&amp;#41;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;VALUES &amp;#40;'$first_name', '$last_name', '$email', '$select_poem_type' '$key_names', '$specific_words', '$poem_is_for', &amp;quot; .&lt;br /&gt;
&amp;quot;'$relationship', '$occasion', '$over_all_message', '$anything_else'&amp;#41;&amp;quot;; &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;
I think something is not quite right here.... if you print $query I think you will find that it just says&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;INSERT INTO poem_orders &amp;#40;firstname, lastname, email, selectpoemtype, keynames, specificwords, poemisfor, relationship, occasion, overallmessage, anythingelse&amp;#41; VALUES &amp;#40;'$first_name', '$last_name', '$email', '$select_poem_type' '$key_names', '$specific_words', '$poem_is_for', '$relationship', '$occasion', '$over_all_message', '$anything_else'&amp;#41;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
I don't think that is what you want...</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=101167#101167</comments>
                                        <author>bobthebob1234</author>
                                        <pubDate>Tue Aug 16, 2011 5:41 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=101167#101167</guid>
                                      </item>
                                      <item>
                                        <title>Re: form data isn't making it to the database. any help?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=101163#101163</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=60586'&gt;rcayea&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Aug 16, 2011 2:54 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Thanks for the reply. Here is some corrected code. It is getting better but I still get error that query wasn't successful. I fixed the quotes issue, I think. &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;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$email = &amp;quot;email@gmail.com&amp;quot;; // Email to notify on error&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $first_name = $_POST&amp;#91;'firstname'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $last_name = $_POST&amp;#91;'lastname'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$email = $_POST&amp;#91;'email'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$select_poem_type = $_POST&amp;#91;'selectpoemtype'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$key_names = $_POST&amp;#91;'keynames'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $specific_words = $_POST&amp;#91;'specificwords'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$poem_is_for = $_POST&amp;#91;'poemisfor'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$relationship = $_POST&amp;#91;'relationship'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $occasion&amp;nbsp; = $_POST&amp;#91;'occasion'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$over_all_message = $_POST&amp;#91;'overallmessage'&amp;#93;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;$anything_else = $_POST&amp;#91;'anythingelse'&amp;#93;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
$dbc = mysqli_connect&amp;#40;'localhost', 'login', 'password', 'database'&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;or die&amp;#40;'Error connecting to MySQL server.'&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
$query = &amp;quot;INSERT INTO poem_orders &amp;#40;firstname, lastname, email, selectpoemtype, keynames, specificwords, poemisfor, relationship, occasion, overallmessage, anythingelse&amp;#41; VALUES &amp;#40;'$first_name', '$last_name', '$email', '$select_poem_type' '$key_names', '$specific_words', '$poem_is_for', '$relationship', '$occasion', '$over_all_message', '$anything_else'&amp;#41;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;VALUES &amp;#40;'$first_name', '$last_name', '$email', '$select_poem_type' '$key_names', '$specific_words', '$poem_is_for', &amp;quot; .&lt;br /&gt;
&amp;quot;'$relationship', '$occasion', '$over_all_message', '$anything_else'&amp;#41;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
$insert = mysqli_query&amp;#40;$dbc, $query&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// if query was successful, display message to user&amp;#58;&lt;br /&gt;
if&amp;#40;$success&amp;#41;&lt;br /&gt;
&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'Thank you, ' . $firstname . $lastname;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'Thanks for submitting the form.&amp;lt;br /&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo ' Poem Type&amp;#58; ' . $selectpoemtype;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo ' Key names to include&amp;#58; ' . $keynames . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'Specific Words To Include&amp;#58; '. $specificwords . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'Poem is for&amp;#58; ' . $poemisfor . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'Relationship&amp;#58; ' . $relationship . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'Occasion&amp;#58; ' . $occasion . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'Overall Message&amp;#58; ' . $overallmessage . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'You also added&amp;#58; ' . $anything_else;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
else&lt;br /&gt;
&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;echo 'Error&amp;#58; Query failed.';&lt;br /&gt;
&amp;#125;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
mysqli_close&amp;#40;$dbc&amp;#41;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;?&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=101163#101163</comments>
                                        <author>rcayea</author>
                                        <pubDate>Tue Aug 16, 2011 2:54 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=101163#101163</guid>
                                      </item>
                                      <item>
                                        <title>Re: form data isn't making it to the database. any help?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=101159#101159</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2464'&gt;johnhudson&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Aug 16, 2011 7:49 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      There are some obvious imbalances of single and double quotes in the INSERT command; I also don't understand why the values are not part of the same paragraph of text.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=101159#101159</comments>
                                        <author>johnhudson</author>
                                        <pubDate>Tue Aug 16, 2011 7:49 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=101159#101159</guid>
                                      </item>
                                      <item>
                                        <title>form data isn't making it to the database. any help?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=101158#101158</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=60586'&gt;rcayea&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Tue Aug 16, 2011 12:48 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hey everyone,&lt;br /&gt;
&lt;br /&gt;
I am in need of that high quality help I receive when visiting this website. In short, I have a php script that is supposed to automatically submit data to a MySQL database but the data doesn't seem to make it to the database. I am not good at debugging and I am not getting any errors on the pages when I submit an entry.&lt;br /&gt;
&lt;br /&gt;
Basically I have this code which takes in the information and as you know/can tell it calls on another php script to do the auto submit to the database. Here is this code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
include('../templates/bodyandlogo.htm');&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
include('../templates/navmenu.htm');&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;PoemScribe: Order Form&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Please complete the form below and click submit to order your personalized poem.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;form&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;form action=&amp;quot;../php_scripts/orderform.php&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;firstname&amp;quot;&amp;gt;First Name:&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;firstname&amp;quot; name=&amp;quot;firstname&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;lastname&amp;quot;&amp;gt;Last Name:&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;lastname&amp;quot; name=&amp;quot;lastname&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;email&amp;quot;&amp;gt;Email:&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;email&amp;quot; name=&amp;quot;email&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;selectpoemtype&amp;quot;&amp;gt;Select Poem Type:&amp;lt;br /&amp;gt;&lt;br /&gt;
                4-Line Poem: $15&lt;br /&gt;
                8-Line Poem: $25&lt;br /&gt;
                12-Line Poem: $40&lt;br /&gt;
                16-Line Poem: $50&lt;br /&gt;
                20-Line Poem: $75&lt;br /&gt;
                Please type in your desired poem length. Example: &amp;quot;4line&amp;quot;.&lt;br /&gt;
        &amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;selectpoemtype&amp;quot; name=&amp;quot;selectpoemtype&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;keynames&amp;quot;&amp;gt;&amp;quot;Key names to include?&amp;quot;&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;keynames&amp;quot; name=&amp;quot;keynames&amp;quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;specificwords&amp;quot;&amp;gt;Any specific words you would like to include in your poem?&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;specificwords&amp;quot; name=&amp;quot;specificwords&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;poemisfor&amp;quot;&amp;gt;Who is the poem for?&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;poemisfor&amp;quot; name=&amp;quot;poemisfor&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;relationship&amp;quot;&amp;gt;Relationship to you?&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;relationship&amp;quot; name=&amp;quot;relationship&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;occasion&amp;quot;&amp;gt;What is the occasion for this poem?&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;occasion&amp;quot; name=&amp;quot;occasion&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;overallmessage&amp;quot;&amp;gt;What do you want the overall message of this poem to be?&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;overallmessage&amp;quot; name=&amp;quot;overallmessage&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;label for=&amp;quot;anythingelse&amp;quot;&amp;gt;Any other information you would like for me to know?&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;anythingelse&amp;quot; name=&amp;quot;anythingelse&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;div class=&amp;quot;input&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Submit&amp;quot; name=&amp;quot;submit&amp;quot;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;!--form--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
include('../templates/footer.htm');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And then the code that is called on (the script called orderform.php):&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;br /&gt;
  &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; xml:lang=&amp;quot;en&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;head&amp;gt;&amp;lt;title&amp;gt;PoemScribe Order Form&amp;lt;/title&amp;gt;&lt;br /&gt;
        &amp;lt;/head&amp;gt;&lt;br /&gt;
        &amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;h2&amp;gt;PoemScribe&amp;lt;/h2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;?php&lt;br /&gt;
                $email = &amp;quot;myemail@gmail.com&amp;quot;; // Email to notify on error&lt;br /&gt;
                $first_name = $_POST['firstname'];&lt;br /&gt;
                $last_name = $_POST['lastname'];&lt;br /&gt;
                $email = $_POST['email'];&lt;br /&gt;
                $select_poem_type = $_POST['selectpoemtype'];&lt;br /&gt;
                $key_names = $_POST['keynames'];&lt;br /&gt;
                $specific_words = $_POST['specificwords'];&lt;br /&gt;
                $poem_is_for = $_POST['poemisfor'];&lt;br /&gt;
                $relationship = $_POST['relationship'];&lt;br /&gt;
                $occasion  = $_POST['occasion'];&lt;br /&gt;
                $over_all_message = $_POST['overallmessage'];&lt;br /&gt;
                $anything_else = $_POST['anythingelse'];&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        $dbc = mysqli_connect('localhost', 'login', 'password', 'database'); &amp;quot; .&lt;br /&gt;
        or die('Error connecting to MySQL server.');&lt;br /&gt;
&lt;br /&gt;
$query = INSERT INTO poem_orders '(firstname, lastname, email, selectpoemtype, keynames, specificwords, poemisfor, &amp;quot; .&lt;br /&gt;
&amp;quot;relationship, occasion, overallmessage, anythingelse)&amp;quot; .&lt;br /&gt;
&lt;br /&gt;
&amp;quot;VALUES ('$first_name', '$last_name', '$email', '$select_poem_type' '$key_names', '$specific_words', '$poem_is_for', &amp;quot; .&lt;br /&gt;
&amp;quot;'$relationship', '$occasion', '$over_all_message', '$anything_else')&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                echo 'Thank you, ' . $firstname . $lastname;&lt;br /&gt;
                echo 'Thanks for submitting the form.&amp;lt;br /&amp;gt;';&lt;br /&gt;
                echo ' Poem Type: ' . $selectpoemtype;&lt;br /&gt;
                echo ' Key names to include: ' . $keynames . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
                echo 'Specific Words To Include: '. $specificwords . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
                echo 'Poem is for: ' . $poemisfor . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
                echo 'Relationship: ' . $relationship . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
                echo 'Occasion: ' . $occasion . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
                echo 'Overall Message: ' . $overallmessage . '&amp;lt;br /&amp;gt;';&lt;br /&gt;
                echo 'You also added: ' . $anything_else;&lt;br /&gt;
                &lt;br /&gt;
                &lt;br /&gt;
                &lt;br /&gt;
mysqli_close($dbc);&lt;br /&gt;
        ?&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again, I am trying to figure out why my database isn't being populated when someone clicks on the submit button. &lt;br /&gt;
&lt;br /&gt;
Thanks in advance,&lt;br /&gt;
Randy &lt;br /&gt;
0</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=101158#101158</comments>
                                        <author>rcayea</author>
                                        <pubDate>Tue Aug 16, 2011 12:48 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=101158#101158</guid>
                                      </item></channel></rss>