<?xml version="1.0"?>
<rss version="2.0">
	<channel>
	<title>Newest Comments</title>
	<link>http://www.hawkee.com</link>
	<description>Hawkee.com Comment Tracker</description>
	<language>en-us</language>

	<item>
		<title>jonesy44 commented on PHP Snippet: My first PHP</title>
		<author>jonesy44</author>
		<link>http://www.hawkee.com/snippet/5462/#c58121</link>
		<description><![CDATA[Wrong place to ask dude. Try Forums :) ]]></description>
		<pubDate>Tue, 30 Jun 2009 09:56:21 -0500</pubDate>
	</item>
	<item>
		<title>gilbertsavier commented on PHP Snippet: My first PHP</title>
		<author>gilbertsavier</author>
		<link>http://www.hawkee.com/snippet/5462/#c58115</link>
		<description><![CDATA[Hi,<br />
<br />
I need a code that lets my customers upload a image file from their computer and then that file does 2 things<br />
<br />
1. gets uploaded to upload folder on my server<br />
2. a copy of that file gets e-mailed to me<br />
<br />
this is what I have so far, any improvements/additions on this code would really be appreciated...<br />
<br />
1.//GET IMAGE INFO<br />
2.<br />
3.    $dir = 'images/';<br />
4.    $file_name = $_FILES['file']['name'];<br />
5.    $file_tmp = $_FILES['file']['tmp_name'];<br />
6.   <br />
7.    //CHECK FOR UPLOADED FILE<br />
8.    if(is_uploaded_file($file_tmp)){<br />
9.        //MOVE TO DIR<br />
10.        move_uploaded_file($file_tmp, $dir.$file_name);<br />
11.             }<br />
<br />
Thanks &amp; regards,<br />
Lokananth]]></description>
		<pubDate>Tue, 30 Jun 2009 02:05:09 -0500</pubDate>
	</item>
	<item>
		<title>F*U*R*B*Y* commented on PHP Snippet: My first PHP</title>
		<author>F*U*R*B*Y*</author>
		<link>http://www.hawkee.com/snippet/5462/#c48781</link>
		<description><![CDATA[or have it as a dropdown/select box for the equation? :P]]></description>
		<pubDate>Sat, 20 Dec 2008 00:00:39 -0600</pubDate>
	</item>
	<item>
		<title>jcbones commented on PHP Snippet: My first PHP</title>
		<author>jcbones</author>
		<link>http://www.hawkee.com/snippet/5462/#c48772</link>
		<description><![CDATA[Nah, PHP won't parse symbols like that, it will just print it back to the page.  <br />
<br />
Try this instead...<br />
<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> 	  <td><span class="genmed"><b>Code:</b></span></td>	</tr>	<tr>	  <td class="code">&lt;?php<br />
$form = &quot;&lt;form action=\&quot;test.php\&quot; method=\&quot;post\&quot;&gt;&lt;input type=\&quot;text\&quot; value=\&quot;\&quot; name=\&quot;one\&quot;/&gt;&lt;br/&gt;&lt;input type=\&quot;text\&quot; value=\&quot;\&quot; name=\&quot;two\&quot;/&gt;&lt;br/&gt;&lt;input type=\&quot;text\&quot; value=\&quot;\&quot; name=\&quot;three\&quot;/&gt;&lt;br/&gt;&lt;input type=\&quot;submit\&quot; value=\&quot;submit\&quot; name=\&quot;submit\&quot;/&gt;&lt;/form&gt;&quot;;<br />
<br />
if&#40;$_POST&#91;&quot;submit&quot;&#93;&#41;<br />
&#123;<br />
&nbsp; if&#40;$_POST&#91;&quot;two&quot;&#93; == &quot;+&quot;&#41; &#123;$value = $_POST&#91;&quot;one&quot;&#93; + $_POST&#91;&quot;three&quot;&#93;; echo $_POST&#91;&quot;one&quot;&#93; .&quot; + &quot; . $_POST&#91;&quot;three&quot;&#93; . &quot; = &quot; . $value;&#125;<br />
elseif&#40;$_POST&#91;&quot;two&quot;&#93; == &quot;-&quot;&#41; &#123;$value = $_POST&#91;&quot;one&quot;&#93; - $_POST&#91;&quot;three&quot;&#93;; echo $_POST&#91;&quot;one&quot;&#93; . &quot; - &quot; . $_POST&#91;&quot;three&quot;&#93; . &quot; = &quot; . $value;&#125;<br />
elseif&#40;$_POST&#91;&quot;two&quot;&#93; == &quot;*&quot;&#41; &#123;$value = $_POST&#91;&quot;one&quot;&#93; * $_POST&#91;&quot;three&quot;&#93;; echo $_POST&#91;&quot;one&quot;&#93; . &quot; * &quot; . $_POST&#91;&quot;three&quot;&#93; . &quot; = &quot; . $value;&#125;<br />
elseif&#40;$_POST&#91;&quot;two&quot;&#93; == &quot;/&quot;&#41; &#123;$value = $_POST&#91;&quot;one&quot;&#93; / $_POST&#91;&quot;three&quot;&#93;; echo $_POST&#91;&quot;one&quot;&#93; . &quot; / &quot; . $_POST&#91;&quot;three&quot;&#93; . &quot; = &quot; . $value;&#125;<br />
else echo &quot;You have entered an unknown operator!&quot;;<br />
<br />
<br />
<br />
&#125;<br />
<br />
else echo stripslashes&#40;$form&#41;;<br />
<br />
<br />
?&gt;<br />
</td>	</tr></table><span class="postbody">]]></description>
		<pubDate>Fri, 19 Dec 2008 23:20:00 -0600</pubDate>
	</item>
	<item>
		<title>jonesy44 commented on PHP Snippet: My first PHP</title>
		<author>jonesy44</author>
		<link>http://www.hawkee.com/snippet/5462/#c48310</link>
		<description><![CDATA[Set a variable with the post, it should parse all symbols.. i think, never really had the need to try it out before..]]></description>
		<pubDate>Sat, 13 Dec 2008 14:14:38 -0600</pubDate>
	</item>
	<item>
		<title>DangerOfFate commented on PHP Snippet: My first PHP</title>
		<author>DangerOfFate</author>
		<link>http://www.hawkee.com/snippet/5462/#c48309</link>
		<description><![CDATA[D:....I'm -trying- to code a PHP calculator of a sort, just an input field for someone to type like...2+2 and it'll return 4 when the action is submitted.]]></description>
		<pubDate>Sat, 13 Dec 2008 13:45:50 -0600</pubDate>
	</item>
	<item>
		<title>jonesy44 commented on PHP Snippet: My first PHP</title>
		<author>jonesy44</author>
		<link>http://www.hawkee.com/snippet/5462/#c48292</link>
		<description><![CDATA[Nice to see another PHP scripter out there :L lacks a few on this site hehe.<br />
<br />
I must be bored or something.. but this would incorporate all your HTML &amp; PHP together;<br />
<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> 	  <td><span class="genmed"><b>Code:</b></span></td>	</tr>	<tr>	  <td class="code">&lt;?php<br />
echo '&lt;html&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;body&gt;';<br />
<br />
if &#40;!$_POST&#41; &#123;<br />
&nbsp; echo '&lt;form action=&quot;' .$_SERVER&#91;&quot;PHP_SELF&quot;&#93;. '&quot; method=&quot;post&quot;&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; Age&#58; &lt;input type=&quot;text&quot; name=&quot;age&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;submit&quot; /&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/form&gt;';<br />
&#125;<br />
else &#123;<br />
&nbsp; $age = $_POST&#91;&quot;age&quot;&#93;;<br />
&nbsp; if &#40;$age &lt; 18&#41; &#123;<br />
&nbsp; &nbsp; echo 'You are too young';<br />
&nbsp; &#125;<br />
&nbsp; else &#123;<br />
&nbsp; &nbsp; echo 'Welcome';<br />
&nbsp; &#125;<br />
&#125;<br />
?&gt;</td>	</tr></table><span class="postbody">]]></description>
		<pubDate>Sat, 13 Dec 2008 06:46:32 -0600</pubDate>
	</item>
	<item>
		<title>Hawkee commented on PHP Snippet: My first PHP</title>
		<author>Hawkee</author>
		<link>http://www.hawkee.com/snippet/5462/#c48281</link>
		<description><![CDATA[Danger, why don't you edit the snippet to reflect our suggestions?]]></description>
		<pubDate>Sat, 13 Dec 2008 00:03:07 -0600</pubDate>
	</item>
	<item>
		<title>DangerOfFate commented on PHP Snippet: My first PHP</title>
		<author>DangerOfFate</author>
		<link>http://www.hawkee.com/snippet/5462/#c48275</link>
		<description><![CDATA[heh..Thanks..I'm just a pessimist, I guess.]]></description>
		<pubDate>Fri, 12 Dec 2008 23:23:19 -0600</pubDate>
	</item>
	<item>
		<title>F*U*R*B*Y* commented on PHP Snippet: My first PHP</title>
		<author>F*U*R*B*Y*</author>
		<link>http://www.hawkee.com/snippet/5462/#c48273</link>
		<description><![CDATA[And also, i don't think you should put your own work down....<br />
<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> 	  <td><span class="genmed"><b>Quote:</b></span></td>	</tr>	<tr>	  <td class="quote"> lol failure....</td>	</tr></table><span class="postbody"><br />
<br />
and<br />
<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> 	  <td><span class="genmed"><b>Quote:</b></span></td>	</tr>	<tr>	  <td class="quote">Tags   	 lamer </td>	</tr></table><span class="postbody"><br />
<br />
Sure its not the best script out there, but its your first PHP script. I know my first php script was <br />
<br />
</span><table width="90%" cellspacing="1" cellpadding="3" border="0" align="center"><tr> 	  <td><span class="genmed"><b>Code:</b></span></td>	</tr>	<tr>	  <td class="code">&lt;?php echo &quot;Hello World&quot;; ?&gt;</td>	</tr></table><span class="postbody"> you wouldn't believe how much problems i had, firstly i had &lt;?php hello world ?&gt; i spent hours trying to get it to work, i ended up asking RussellReal and he told me i was missing the &quot; and the ; but he wasn't going to tell me where.<br />
<br />
We all start off at the same place, it doesn't matter what the quality of the script is, its worth the knowledge of what you gain from creating this script.]]></description>
		<pubDate>Fri, 12 Dec 2008 23:01:16 -0600</pubDate>
	</item>
	<item>
		<title>F*U*R*B*Y* commented on PHP Snippet: My first PHP</title>
		<author>F*U*R*B*Y*</author>
		<link>http://www.hawkee.com/snippet/5462/#c48271</link>
		<description><![CDATA[Also not all servers have.... uhmmm can't think of it of the top of my head, but they won't allow $age they require you to do $age = $_POST['age'];.<br />
<br />
<br />
Not bad for a first script :) Hope to see more, and if your stuck on a problem, yell out on the forums and we'll all help out =)]]></description>
		<pubDate>Fri, 12 Dec 2008 21:11:03 -0600</pubDate>
	</item>
	<item>
		<title>DangerOfFate commented on PHP Snippet: My first PHP</title>
		<author>DangerOfFate</author>
		<link>http://www.hawkee.com/snippet/5462/#c48263</link>
		<description><![CDATA[Thanks Hawkee.]]></description>
		<pubDate>Fri, 12 Dec 2008 19:29:57 -0600</pubDate>
	</item>
	<item>
		<title>Hawkee commented on PHP Snippet: My first PHP</title>
		<author>Hawkee</author>
		<link>http://www.hawkee.com/snippet/5462/#c48262</link>
		<description><![CDATA[You should just put all the code together into the snippet.  There's no reason to separate it like this.  Also, always use &lt;?php instead of &lt;? to avoid compatibility problems with certain servers.]]></description>
		<pubDate>Fri, 12 Dec 2008 19:06:58 -0600</pubDate>
	</item>
	<item>
		<title>DangerOfFate commented on PHP Snippet: My first PHP</title>
		<author>DangerOfFate</author>
		<link>http://www.hawkee.com/snippet/5462/#c48257</link>
		<description><![CDATA[lol failure....]]></description>
		<pubDate>Fri, 12 Dec 2008 18:55:44 -0600</pubDate>
	</item>

	</channel>
</rss>


