<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community - PHP</title>
		<link>http://www.daniweb.com/forums</link>
		<description>Tech support, programming, web development, and internet marketing community. Forums to get free computer help and support.</description>
		<language>en-US</language>
		<lastBuildDate>Thu, 15 May 2008 20:01:18 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/forums/myimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community - PHP</title>
			<link>http://www.daniweb.com/forums</link>
		</image>
		<item>
			<title>show data from database  in a marquee</title>
			<link>http://www.daniweb.com/forums/thread124431.html</link>
			<pubDate>Thu, 15 May 2008 19:46:36 GMT</pubDate>
			<description>hello,

i just asking if any body can help me to make a marquee display data from mysql data base 



like this web site
http://www.aljazeera.net/NR/exeres/F06E0D8B-BE98-445A-9752-8E7EA9DAD30F.htm

thx v. much</description>
			<content:encoded><![CDATA[<div>hello,<br />
<br />
i just asking if any body can help me to make a marquee display data from mysql data base <br />
<br />
<br />
<br />
like this web site<br />
<a rel="nofollow" class="t" href="http://www.aljazeera.net/NR/exeres/F06E0D8B-BE98-445A-9752-8E7EA9DAD30F.htm" target="_blank">http://www.aljazeera.net/NR/exeres/F...7EA9DAD30F.htm</a><br />
<br />
thx v. much</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>m_shanak</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124431.html</guid>
		</item>
		<item>
			<title>Lamp installed ok .... but!</title>
			<link>http://www.daniweb.com/forums/thread124418.html</link>
			<pubDate>Thu, 15 May 2008 18:29:27 GMT</pubDate>
			<description>Hello

I have just installed lamp on Debian and when I dropped my files in there is just sayed it worked lol so I deleated the files that said it worked and put the phpbb folder into it now it still says it works so if I go to http://localhost/forum it says file not found but if I do this...</description>
			<content:encoded><![CDATA[<div>Hello<br />
<br />
I have just installed lamp on Debian and when I dropped my files in there is just sayed it worked lol so I deleated the files that said it worked and put the phpbb folder into it now it still says it works so if I go to <a rel="nofollow" class="t" href="http://localhost/forum" target="_blank">http://localhost/forum</a> it says file not found but if I do this <a rel="nofollow" class="t" href="http://localhost/" target="_blank">http://localhost/</a> it says it works then add forum on the end its opens :o lol<br />
<br />
<br />
What am I doing wrong?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>bondi007</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124418.html</guid>
		</item>
		<item>
			<title>php login page problem</title>
			<link>http://www.daniweb.com/forums/thread124410.html</link>
			<pubDate>Thu, 15 May 2008 17:51:27 GMT</pubDate>
			<description><![CDATA[Hi. I'm a newbie to php and have created a login form that does not use an sql database. After inputing all the code I've tested it in IE and it doesn't work properly. If I leave the username and password blank but hit the submit button,  it takes me to the page that is suppose to be restricted to...]]></description>
			<content:encoded><![CDATA[<div>Hi. I'm a newbie to php and have created a login form that does not use an sql database. After inputing all the code I've tested it in IE and it doesn't work properly. If I leave the username and password blank but hit the submit button,  it takes me to the page that is suppose to be restricted to those who put in the correct username and password. Even if I put in the wrong username and password, it takes me to the restricted page.  I can't figure out if i've left out something or if I should just give up and go with using the sql database. Below is my code. Please help.<br />
Thanks<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">&lt;?php<br />
?&gt;<br />
$username = &quot;admin&quot;;<br />
$password = &quot;adminpass&quot;;<br />
if(isset($_post['user'])&amp;&amp;isset($_post['password']))<br />
{<br />
if($username == $_post['user'] &amp;&amp; $password == $_post['password'])<br />
{<br />
?&gt;<br />
&lt;form name=&quot;form&quot; action=&quot;membersonly-content.html&quot; method=&quot;post&quot;&gt;<br />
&lt;?php<br />
}<br />
else<br />
{<br />
die(&quot;your login information was incorrect&quot;);<br />
}<br />
}<br />
else<br />
?&gt;<br />
&lt;h1&gt;Login&lt;/h1&gt;<br />
&lt;label for=&quot;txtusername&quot;&gt;Username:&lt;/label&gt;<br />
&lt;input type=&quot;text&quot; title=&quot;enter your username&quot; name=&quot;textusername&quot;/&gt; &lt;/p&gt;<br />
&lt;label for=&quot;txtpassword&quot;&gt;Password:&lt;/label&gt;<br />
&lt;input type=&quot;password&quot; title=&quot;enter your password&quot; name=&quot;txtpassword&quot;/&gt; &lt;/p&gt;<br />
&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;login&quot;/&gt;&lt;/p&gt;<br />
&lt;/form&gt;<br />
&lt;?php<br />
}<br />
else {<br />
?&gt;<br />
&lt;/php&gt;</code> </div></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>sweetleilani</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124410.html</guid>
		</item>
		<item>
			<title>Georgean Date to Persian Date, and vice versa</title>
			<link>http://www.daniweb.com/forums/thread124409.html</link>
			<pubDate>Thu, 15 May 2008 17:36:11 GMT</pubDate>
			<description><![CDATA[Hello everybody,
The following code I found from another place, and it was in Java Script, so I changed it to PHP, and I dont know:
1. how it is work ?
2. is it work at all?
3. need the algorithm and procedure of it...

 <div class="codeblock"> <div class="spaced"> <div class="light"...]]></description>
			<content:encoded><![CDATA[<div>Hello everybody,<br />
The following code I found from another place, and it was in Java Script, so I changed it to PHP, and I dont know:<br />
1. how it is work ?<br />
2. is it work at all?<br />
3. need the algorithm and procedure of it...<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left"><br />
//&nbsp; PERSIAN_TO_JD&nbsp; --&nbsp; Determine Julian day from Persian date<br />
<br />
$PERSIAN_EPOCH = 1948320.5;<br />
$PERSIAN_WEEKDAYS = Array(&quot;Yekshanbeh&quot;, &quot;Doshanbeh&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;Seshhanbeh&quot;, &quot;Chaharshanbeh&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &quot;Panjshanbeh&quot;, &quot;Jomeh&quot;, &quot;Shanbeh&quot;);<br />
<br />
function persian_to_jd($year, $month, $day)<br />
{<br />
&nbsp; &nbsp; $epbase = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $epyear = 0;<br />
<br />
&nbsp; &nbsp; $epbase = $year - (($year &gt;= 0) ? 474 : 473);<br />
&nbsp; &nbsp; $epyear = 474 + ($epbase % 2820);<br />
<br />
&nbsp; &nbsp; return $day +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (($month &lt;= 7) ?<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (($month - 1) * 31) :<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ((($month - 1) * 30) + 6)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; floor((($epyear * 682) - 110) / 2816) +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ($epyear - 1) * 365 +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; floor($epbase / 2820) * 1029983 +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ($PERSIAN_EPOCH - 1);<br />
}<br />
<br />
//&nbsp; JD_TO_PERSIAN&nbsp; --&nbsp; Calculate Persian date from Julian day<br />
<br />
function jd_to_persian($jd)<br />
{<br />
&nbsp; &nbsp; $year = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $month = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $day = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $depoch = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $cycle = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $cyear = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $ycycle = 0;<br />
&nbsp; &nbsp; $aux1 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $aux2 = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $yday = 0;<br />
<br />
<br />
&nbsp; &nbsp; $jd = floor($jd) + 0.5;<br />
<br />
&nbsp; &nbsp; $depoch = $jd - persian_to_jd(475, 1, 1);<br />
&nbsp; &nbsp; $cycle = floor($depoch / 1029983);<br />
&nbsp; &nbsp; $cyear = ($depoch % 1029983);<br />
&nbsp; &nbsp; if ($cyear == 1029982) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $ycycle = 2820;<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $aux1 = floor($cyear / 366);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $aux2 = ($cyear % 366);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $ycycle = floor(((2134 * $aux1) + (2816 * $aux2) + 2815) / 1028522) +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $aux1 + 1;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; $year = $ycycle + (2820 * $cycle) + 474;<br />
&nbsp; &nbsp; if ($year &lt;= 0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $year--;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; $yday = ($jd - persian_to_jd($year, 1, 1)) + 1;<br />
&nbsp; &nbsp; $month = ($yday &lt;= 186) ? ceil($yday / 31) : ceil(($yday - 6) / 30);<br />
&nbsp; &nbsp; $day = ($jd - persian_to_jd($year, $month, 1)) + 1;<br />
&nbsp; &nbsp; return Array($year, $month, $day);<br />
}<br />
<br />
<br />
?&gt;<br />
</code> </div>
<br />
Thanks...</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>tanha</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124409.html</guid>
		</item>
		<item>
			<title>Little code confusion</title>
			<link>http://www.daniweb.com/forums/thread124360.html</link>
			<pubDate>Thu, 15 May 2008 13:06:19 GMT</pubDate>
			<description><![CDATA[After logging in, main.php is loaded and instead of displaying the correct included page, it displays Main Page.

So what is wrong w/ my code?

Thanks in advance for any and all help...

 <div class="codeblock"> <div class="spaced"> <div class="light" style="float:right"> <a...]]></description>
			<content:encoded><![CDATA[<div>After logging in, main.php is loaded and instead of displaying the correct included page, it displays Main Page.<br />
<br />
So what is wrong w/ my code?<br />
<br />
Thanks in advance for any and all help...<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">this is placed inside the &quot;main.php&quot;<br />
<br />
&lt;?php <br />
&nbsp; &nbsp; require('core/db.php');<br />
&nbsp; &nbsp; require('core/check.php');<br />
?&gt;<br />
&nbsp; <br />
This is placed inside the check.php<br />
<br />
&lt;?php<br />
&nbsp; &nbsp; if (level == &quot;1&quot;)&nbsp; { include('page_1.php'); } <br />
&nbsp; &nbsp;  else <br />
&nbsp; &nbsp; if (level == &quot;2&quot;) { include('page_2.php'); }<br />
&nbsp; &nbsp;  else <br />
&nbsp; &nbsp; if (level == &quot;3&quot;) { include('page_3.php'); }<br />
?&gt;&nbsp;  <br />
Inside the pages I have <br />
&lt;?php <br />
&nbsp;  echo &quot;Page_Name&quot;;<br />
?&gt;<br />
<br />
</code> </div></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>Vai</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124360.html</guid>
		</item>
		<item>
			<title>variable values</title>
			<link>http://www.daniweb.com/forums/thread124355.html</link>
			<pubDate>Thu, 15 May 2008 12:47:13 GMT</pubDate>
			<description><![CDATA[i have created this piece of code to retrieve the path to a file from a mysql db, the file exists and can be displayed directly from the sql query.  the code looks like this

 <div class="codeblock"> <div class="spaced"> <div class="light" style="float:right"> <a...]]></description>
			<content:encoded><![CDATA[<div>i have created this piece of code to retrieve the path to a file from a mysql db, the file exists and can be displayed directly from the sql query.  the code looks like this<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">$query = &quot;SELECT broad1 FROM images_broad&quot;;<br />
$result=mysql_query($query);<br />
<br />
while($row=mysql_fetch_array($result)){<br />
$image_path=&quot;{$row['broad1']}&quot;;<br />
}</code> </div>
<br />
i now want to display this image inside an email.  so the next part of the code use a variable to hold the first part of the path as only the relative path is stored in the db.  they are the appended together to give the absolute path of the image to be displayed.  the code looks like this<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">$path= 'http://www.acmeart.co.uk/mercury';<br />
$broad_img1='&lt;img src=&quot;' . $path.&quot;/&quot;.$image_path .'&quot; /&gt;'; </code> </div>
<br />
when the source code of the email is viewed on the $path is showing in the source, would the $image_path still hold a value inside.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>kevin wood</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124355.html</guid>
		</item>
		<item>
			<title>Custom php.ini help</title>
			<link>http://www.daniweb.com/forums/thread124347.html</link>
			<pubDate>Thu, 15 May 2008 11:25:20 GMT</pubDate>
			<description><![CDATA[ok lets make this a little simpler than my last topic.

I found this site (http://wiki.dreamhost.com/index.php/PHP.ini) which everyone who follows it seems to be getting results from, though it says "You are expected to be knowledgeable in the UNIX shell." which i have got no idea what that even...]]></description>
			<content:encoded><![CDATA[<div>ok lets make this a little simpler than my last topic.<br />
<br />
I found this <a rel="nofollow" class="t" href="http://wiki.dreamhost.com/index.php/PHP.ini" target="_blank">site</a> which everyone who follows it seems to be getting results from, though it says &quot;You are expected to be knowledgeable in the UNIX shell.&quot; which i have got no idea what that even is.<br />
<br />
I tried to follow the instuctions as best as I could with no luck so could someone please explain that to me in simpler/noob terms.<br />
<br />
Also i can not use .htaccess files so is there anyway i can do this without them?<br />
<br />
Thanks,<br />
Scottmandoo<br />
<br />
btw im asking here because it also states &quot;Support for these instructions is not available from DreamHost tech support.&quot;</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>Scottmandoo</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124347.html</guid>
		</item>
		<item>
			<title>PHP Split function</title>
			<link>http://www.daniweb.com/forums/thread124344.html</link>
			<pubDate>Thu, 15 May 2008 11:13:12 GMT</pubDate>
			<description><![CDATA[Hi I want to split a variable to check what type of user they are.  If they are user type 1 their username will be in the form "LLL" where L is a letter.  If they are user type 2 their username will be in the form "LLNNNNN" where L is a letter and N is a number.  I thought I could use PHP split and...]]></description>
			<content:encoded><![CDATA[<div>Hi I want to split a variable to check what type of user they are.  If they are user type 1 their username will be in the form &quot;LLL&quot; where L is a letter.  If they are user type 2 their username will be in the form &quot;LLNNNNN&quot; where L is a letter and N is a number.  I thought I could use PHP split and then is_numeric function to check the username.  Would this be the best way to do it?  If so what is the code I need to use to split the variable?<br />
<br />
Many thanks for your help<br />
NH</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>twelvetwelve</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124344.html</guid>
		</item>
		<item>
			<title>help with code</title>
			<link>http://www.daniweb.com/forums/thread124329.html</link>
			<pubDate>Thu, 15 May 2008 09:33:40 GMT</pubDate>
			<description>i have store an image on the server from a file upload with a random number attached to it.  i have then stored the random number in a mysql db for use on other pages to display the images.

the problem i am having is that the image will not display on other pages when i try to recall it from the...</description>
			<content:encoded><![CDATA[<div>i have store an image on the server from a file upload with a random number attached to it.  i have then stored the random number in a mysql db for use on other pages to display the images.<br />
<br />
the problem i am having is that the image will not display on other pages when i try to recall it from the server.<br />
<br />
i have stored the image in a folder on the server using this code<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">&quot;image/thumbs/thumb_&quot;.$image_name . $rand;</code> </div>
<br />
$image_name being the name of the file to be stored and $rand being the random number.  i have then stored the random number in the db using<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">$rand= rand(0, 100);<br />
$sql=&quot;INSERT INTO random_number (random1) VALUES ('$rand')&quot;;<br />
$query = mysql_query($sql);</code> </div>
<br />
to get the file from the server to be displayed the code i have used is this<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">$image = &quot;&quot;;<br />
$broad_img1= &quot;&quot;;<br />
$path= 'http://www.acmeart.co.uk/mercury/';<br />
$web_image_folder = 'image/thumbs';<br />
$exts = array('jpg', 'png', 'gif', 'jpeg');<br />
$image_name = 'thumb_image1';<br />
<br />
<br />
// check for each extension<br />
foreach($exts as $ext) {<br />
&nbsp;  if (file_exists($web_image_folder.'/'.$image_name.'.'.$ext . $rand)) {<br />
&nbsp; &nbsp;  $image = $image_name.'.'.$ext . $rand;<br />
&nbsp;  } <br />
&nbsp;  <br />
}<br />
<br />
<br />
// check if we have an image<br />
if ($image != &quot;&quot;) {<br />
&nbsp; &nbsp; // ok we have the image<br />
&nbsp; &nbsp; $broad_img1='&lt;img src=&quot;' . $path.&quot;/&quot;.$web_image_folder.&quot;/&quot;.$image . '&quot; /&gt;'; <br />
} else {<br />
&nbsp; &nbsp; // error, we can't find the image.<br />
}</code> </div>
<br />
this code worked fine before i was adding the random number.  it retrieved the image and displayed the cached version (when cached cleared displayed new upload image).<br />
<br />
i have got the random number out of the db using this code <br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">$query = &quot;SELECT random1 FROM random_number&quot;;<br />
$result=mysql_query($query);<br />
<br />
while($row=mysql_fetch_array($result)){<br />
$rand=&quot;{$row['random1']}&quot;;</code> </div>
<br />
the number is then placed into the variable and then tried to be used to display the image but the image will not display.  it may be the way i have written the code to retrieve the image but my eyes are tired of looking so i dont think i would see a mistake if it slapped me.<br />
<br />
i will post the second half of the code in full below.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>kevin wood</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124329.html</guid>
		</item>
		<item>
			<title>php: Create CSV file</title>
			<link>http://www.daniweb.com/forums/thread124327.html</link>
			<pubDate>Thu, 15 May 2008 09:22:57 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div class="light" style="float:right"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div>(<a href="#"...]]></description>
			<content:encoded><![CDATA[<div><div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">&lt;?php<br />
header(&quot;Content-type: application/x-msdownload&quot;);<br />
header(&quot;Content-Disposition: attachment; filename=extraction.csv&quot;);<br />
header(&quot;Pragma: no-cache&quot;);<br />
header(&quot;Expires: 0&quot;);<br />
<br />
require_once( &quot;db.php&quot; );<br />
&nbsp;$query = &quot;SELECT * FROM name ORDER BY last&quot;;<br />
&nbsp;$result = mysql_query($query) or die(mysql_error());<br />
&nbsp;echo &quot;ID,First,Middle,Last,Email\r\n&quot;; //header<br />
while($row = mysql_fetch_array($result)){<br />
echo &quot;\&quot;$row[id]\&quot;,\&quot;$row[first]\&quot;,\&quot;$row[middle]\&quot;,\&quot;$row[last]\&quot;,\&quot;$row[email]\&quot;\r\n&quot;; //data&nbsp; <br />
} <br />
?&gt;</code> </div></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>csshacker</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124327.html</guid>
		</item>
		<item>
			<title>troubleshoot simple mysql php db script</title>
			<link>http://www.daniweb.com/forums/thread124326.html</link>
			<pubDate>Thu, 15 May 2008 09:14:58 GMT</pubDate>
			<description><![CDATA[Hi guys,

I did a quick tutorial on the internet on using php and mysql. It is my first ever time using it so forgive me if im being a bit of a "NOOB".

anyways ill post the script below and can you give me a few pointers about where im going wrong?

Bare in mind its my first time using these...]]></description>
			<content:encoded><![CDATA[<div>Hi guys,<br />
<br />
I did a quick tutorial on the internet on using php and mysql. It is my first ever time using it so forgive me if im being a bit of a &quot;NOOB&quot;.<br />
<br />
anyways ill post the script below and can you give me a few pointers about where im going wrong?<br />
<br />
Bare in mind its my first time using these scripts and phpmyadmin.<br />
--------------------------------------------------------------------------------------------------------------<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">&lt;?php<br />
$db=mysql_connect(&quot;grafax.co.uk&quot;, &quot;dbOne&quot;, &quot;*password*&quot;) or die(&quot;Could not connect to localhost.&quot;); mysql_select_db(&quot;people&quot;, $db) or die(&quot;Could not find database.&quot;);<br />
<br />
// The above lines establishes a connection with the database. Keep localhost as is unless something different is mentioned by your sql host. usrnm is user name and pswd is password. What I want to say is, copy these lines as they are and just replace the required fields and it should connect.<br />
<br />
$querySQL = &quot;insert into people (d_Name, d_Birthday,<br />
d_Birthday) values ($Name, $Birthday, $Telephone)&quot;;<br />
if(!$querySQL) error_message(sql_error());<br />
<br />
// The above statement generates an error if you have setup the table in such a way that there should not be a duplicate entry.<br />
?&gt; </code> </div>
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">&lt;form name=&quot;toSave&quot; method=&quot;post&quot; action=&quot;save_it.php&quot;&gt;<br />
&nbsp; &lt;p&gt;name <br />
&nbsp; &nbsp; &lt;input type=&quot;text&quot; name=&quot;Name&quot; size=&quot;100&quot; /&gt;<br />
&nbsp; &nbsp; &lt;br&gt; <br />
birthday <br />
&lt;input type=&quot;text&quot; name=&quot;Birthday&quot; size=&quot;50&quot; /&gt;<br />
&lt;br&gt; <br />
telephone <br />
&lt;input type=&quot;text&quot; name=&quot;Telephone&quot; size=&quot;50&quot; /&gt; <br />
&lt;/p&gt;<br />
&nbsp; &lt;p&gt;<br />
&nbsp; &nbsp; &lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;Submit&quot; /&gt;<br />
&nbsp; &lt;/p&gt;<br />
&lt;/form&gt; </code> </div>
--------------------------------------------------------------------------------------------------------------<br />
<br />
Go on this link to see a screen shot of my database's settings etc.<br />
<a rel="nofollow" class="t" href="http://www.grafax.co.uk/db.bmp" target="_blank">http://www.grafax.co.uk/db.bmp</a><br />
<br />
--------------------------------------------------------------------------------------------------------------<br />
As far as i know, my database is called either  web163-dbone (or as I named it dbone), the table is people, the website is <a rel="nofollow" class="t" href="http://www.grafax.co.uk" target="_blank">http://www.grafax.co.uk</a>.<br />
<br />
If you need any more information just post it in this thread.<br />
<br />
Thanks again guys :D<br />
Max</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>MaxMumford</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124326.html</guid>
		</item>
		<item>
			<title>How to php export to excel</title>
			<link>http://www.daniweb.com/forums/thread124300.html</link>
			<pubDate>Thu, 15 May 2008 05:57:56 GMT</pubDate>
			<description>How to php export to excel</description>
			<content:encoded><![CDATA[<div>How to php export to excel</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>csshacker</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124300.html</guid>
		</item>
		<item>
			<title>browser detect</title>
			<link>http://www.daniweb.com/forums/thread124272.html</link>
			<pubDate>Wed, 14 May 2008 23:56:20 GMT</pubDate>
			<description><![CDATA[the thing is to do 1 index.php wich detects browster Firefox and IE7 to redirekt it in http://examples.com/ , if it detects IE6 let it go directly to that saves code in examples.html Sample
how can i do it?

 <div class="codeblock"> <div class="spaced"> <div class="light" style="float:right"> <a...]]></description>
			<content:encoded><![CDATA[<div>the thing is to do 1 index.php wich detects browster Firefox and IE7 to redirekt it in <a rel="nofollow" class="t" href="http://examples.com/" target="_blank">http://examples.com/</a> , if it detects IE6 let it go directly to that saves code in examples.html Sample<br />
how can i do it?<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">&lt;?<br />
$filename = &quot;examples.html&quot;;<br />
$realfile = &quot;examples.html&quot;;<br />
header(&quot;Content-Type: application/octet-stream&quot;);<br />
header(&quot;Content-Disposition: attachment; filename=&quot;.$filename.&quot;;&quot;);<br />
@readfile($realfile);<br />
$counter = file_get_contents(&quot;examples&quot;);<br />
(int)$counter++;<br />
$fp=fopen(&quot;examples&quot;, &quot;w&quot;);<br />
fwrite($fp,$counter);<br />
fclose($fp);<br />
?&gt;</code> </div></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>crissrusso</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124272.html</guid>
		</item>
		<item>
			<title>Display Username</title>
			<link>http://www.daniweb.com/forums/thread124269.html</link>
			<pubDate>Wed, 14 May 2008 23:37:08 GMT</pubDate>
			<description><![CDATA[Here is what I am trying to accomplish: When a user logs in, their username will be displayed... Trouble is I am unsure how to co-relate the username w/ the id... thanks for any and all help....

 <div class="codeblock"> <div class="spaced"> <div class="light" style="float:right"> <a...]]></description>
			<content:encoded><![CDATA[<div>Here is what I am trying to accomplish: When a user logs in, their username will be displayed... Trouble is I am unsure how to co-relate the username w/ the id... thanks for any and all help....<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">&lt;?php<br />
&nbsp;  require_once('core/db.php');<br />
&nbsp;  require_once('core/secure.php'); <br />
<br />
&nbsp; $query = mysql_query(&quot;SELECT username FROM admin WHERE id = 1&quot;);<br />
&nbsp; $username = mysql_fetch_array($query);<br />
&nbsp;?&gt;<br />
&lt;?php echo $username[username]; ?&gt;</code> </div></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>Vai</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124269.html</guid>
		</item>
		<item>
			<title>Image in xml</title>
			<link>http://www.daniweb.com/forums/thread124262.html</link>
			<pubDate>Wed, 14 May 2008 21:52:21 GMT</pubDate>
			<description>Hello 
I have been working on this script for a little while. All is working good(get all information into the xml). But I am needing to have the php code add an image to the xml for download. If anybody as any ideas i would greatly appreciate it. 

I have this pulling testing info from the MYSQL...</description>
			<content:encoded><![CDATA[<div>Hello <br />
I have been working on this script for a little while. All is working good(get all information into the xml). But I am needing to have the php code add an image to the xml for download. If anybody as any ideas i would greatly appreciate it. <br />
<br />
I have this pulling testing info from the MYSQL db. There will be an image that will need to be added to this document.<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">if(isset($_POST['file_name'])) {<br />
$xml_dec = &quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot; ?&gt;&quot;;<br />
$rootElementStart = &quot;&lt;user&gt;&quot;;<br />
$rootElementEnd = &quot;&lt;/user&gt;&quot;;<br />
$xml_doc = $xml_dec;<br />
$xmlfilename = $_POST['file_name'];<br />
$userinfo = mysql_query(&quot;select userid, firstname, lastname, email from users&quot;) or die(mysql_error());<br />
while($row = mysql_fetch_array($userinfo))<br />
{<br />
$xml_doc .= $rootElementStart;<br />
$xml_doc .= &quot;&lt;id&gt;&quot;;<br />
$xml_doc .= $row['userid'];<br />
$xml_doc .= &quot;&lt;/id&gt;&quot;;<br />
$xml_doc .= &quot;&lt;name&gt;&quot;;<br />
$xml_doc .= $row['firstname'].&quot; &quot;.$row['lastname'];<br />
$xml_doc .= &quot;&lt;/name&gt;&quot;;<br />
$xml_doc .= &quot;&lt;email&gt;&quot;;<br />
$xml_doc .= $row['email'];<br />
$xml_doc .= &quot;&lt;/email&gt;&quot;;<br />
$xml_doc .=$rootElementEnd;<br />
}<br />
$default_dir = &quot;testing/&quot;;<br />
$default_dir .= $xmlfilename.&quot;.xml&quot;;<br />
$fp = fopen($default_dir,'w');<br />
$write = fwrite($fp,$xml_doc);<br />
//header($default_dir);<br />
echo $default_dir;<br />
echo &quot;Document has been written successfully!&quot;;<br />
}<br />
?&gt;</code> </div></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>ProfessorPC</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124262.html</guid>
		</item>
	</channel>
</rss>
