<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0">
<channel>
	<title>w3schools.com - Server Scripting</title>
	<description>The complete discussion board conversation RSS Feed - SQL, ASP, PHP, .NET, ColdFusion, Java/JSP/J2EE, AppML</description>
	<link>http://w3schools.invisionzone.com/index.php</link>
	<pubDate>Sun, 22 Nov 2009 20:00:07 -0500</pubDate>
	<ttl>5</ttl>
	<item>
		<title>Php 5.1 Get_browser, Useragent Must Be Specified</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28684</link>
		<description><![CDATA[Hi,<br /><br />I am running Apache 2.2.14 and PHP 5.31 on Windows XP 32 bit.<br /><br />I have been trying to use the PHP get_browser function with the browscap.ini file. I have installed and verified that browscap.ini is working. The strange thing is that when I call get_browser like this:<br /><br />$browser = get_browser($_SERVER['HTTP_USER_AGENT'], true);<br /><br />then it works, but if I call it like:<br /><br />$browser = get_browser(null, true);<br /><br />then it doesn't work (the $browser variable is set as if the user agent was an empty string).<br /><br />My understanding from the documentation is that null should use the http user agent in use. Can someone shed some light on this?<br /><br />Thank you,]]></description>
		<pubDate>Sun, 22 Nov 2009 19:11:24 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28684</guid>
	</item>
	<item>
		<title>Demoting A Normal File To A Temporary</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28683</link>
		<description><![CDATA[Is there a way to make a certain file temporary, i.e. schedule it for deletion after the script ends?<br /><br />The script that needs to have it is a class... right now, I have a property that stores all temporary files' locations, and in the class' destructor, I unlink() them all. This works... most of the times. If the script fails with a fatal error for whatever reason (e.g. the user of the class causes an error by means other than using my class), the destructor is never activated, and therefore, the files remain.<br /><br />I haven't tried it, but I suspect the register_shutdown_function() function will have the same effect. Only the tmpfile() function never fails, since the cleanup on that is done internally by PHP (on the C layer). However, tmpfile() saves the file to an unsettable location (unless there is a way to dynamically set the system TEMP dir? AFAIK, doing so normally requires a reboot.), which is unacceptable for my class' purpose.<br /><br />I need to be able to write something to a file at a certain specified location, and have that file deleted after the script ends for whatever reason.<br /><br />Does anyone know of another way to create temporary files, or set up normal files to be deleted with or without a fatal error?<br /><br /><br /><b>[edit] Spoke too soon... just tried the register_shutdown_function() in an isolated environment. It does fire even on a fatal error, and what's even better - I can register an unlimited amount of them. Goodbye temporary file array! <img src="http://w3schools.invisionzone.com/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> [/edit]</b>]]></description>
		<pubDate>Sun, 22 Nov 2009 15:44:15 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28683</guid>
	</item>
	<item>
		<title>Error Message</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28682</link>
		<description><![CDATA[I don't really get how to troubleshoot this error message.<br /><br />Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /public_html/opxtest/web/login.php:9) in /home1/suitefou/public_html/opxtest/web/login.php on line 38<br /><br />Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /public_html/opxtest/web/login.php:9) in /home1/suitefou/public_html/opxtest/web/login.php on line 38<br /><br />Warning: Cannot modify header information - headers already sent by (output started at /home1/suitefou/public_html/opxtest/web/login.php:9) in /public_html/opxtest/web/login.php on line 53<br /><br />here is the code.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;if&#40;$_POST&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$dbhost = '*****';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$dbuser = '*****';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$dbpass = '*****';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$dbname = '*****';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$username = $_POST&#91;'username'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$password = $_POST&#91;'password'&#93;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$conn = mysql_connect&#40;$dbhost,$dbuser,$dbpass&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or die &#40;'Error connecting to mysql'&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_select_db&#40;$dbname&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = sprintf&#40;&#34;SELECT COUNT&#40;id&#41; FROM users WHERE UPPER&#40;username&#41; = UPPER&#40;'%s'&#41; AND password='%s'&#34;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_real_escape_string&#40;$username&#41;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_real_escape_string&#40;md5&#40;$password&#41;&#41;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$query&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&#40;$count&#41; = mysql_fetch_row&#40;$result&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&#40;$count == 1&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session_start&#40;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION&#91;'authenticated'&#93; = true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION&#91;'username'&#93; = $username;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = sprintf&#40;&#34;UPDATE users SET last_login = NOW&#40;&#41; WHERE UPPER&#40;username&#41; = UPPER&#40;'%s'&#41; AND password = '%s'&#34;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_real_escape_string&#40;$username&#41;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_real_escape_string&#40;md5&#40;$password&#41;&#41;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_query&#40;$query&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = sprintf&#40;&#34;SELECT is_admin FROM users WHERE UPPER&#40;username&#41; = UPPER&#40;'%s'&#41; AND password='%s'&#34;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_real_escape_string&#40;$username&#41;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_real_escape_string&#40;md5&#40;$password&#41;&#41;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$query&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&#40;$is_admin&#41; = mysql_fetch_row&#40;$result&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&#40;$is_admin == 1&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header&#40;'Location&#58;admin.php'&#41;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header&#40;'Location&#58;game.php'&#41;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {&nbsp;&nbsp;&nbsp;&nbsp;?&#62;<br />&#60;span style='color&#58;red'&#62;Error&#58; that username and password combination does not match any currently within our database.&#60;/span&#62;<br />&#60;?php&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />?&#62;<br />&#60;form action='login.php' method='post'&#62;<br />Username&#58; &#60;input type='text' name='username' /&#62;&#60;br /&#62;<br />Password&#58; &#60;input type='password' name='password' /&#62;&#60;br /&#62;<br />&#60;input type='submit' value='Login' /&#62;<br />&#60;/form&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Sun, 22 Nov 2009 14:46:51 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28682</guid>
	</item>
	<item>
		<title>Checking If Only Text Is Written?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28680</link>
		<description><![CDATA[Hi people, is there a simple function like the is_numeric to check if text is only containing text not any special characters etc?<br /><br />I know i can use replace funcitons to do this, but that's more waste of time is there is a simple function to check this.<br /><br />Edit:<br />Whoops, ment "if there is a" <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Kris]]></description>
		<pubDate>Sun, 22 Nov 2009 12:21:50 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28680</guid>
	</item>
	<item>
		<title>Help With A Check</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28675</link>
		<description><![CDATA[Hi there.<br /><br />I have been trying to get this to work out for me, but i never get anywhere with it. So i hopefully some of you could help me out.<br /><br />I got 4 datafields in mySQL. It looks like:<br /><br />name || lottonumber1 || lottonumber2 ||lottonumber3<br /><br /><br />And on the site i have 4 inputs for each of the datafields.<br />The problem is that i dont want to let the users have same numbers<br />at all. Atm they are able to have like:<br /><br />name || lottonumber1 || lottonumber2 ||lottonumber3<br />Corgae 1 2 3<br />noob 1 2 3<br /><br />So what i need is: All 3 inputs on the site needs to get checked if the numbers exits in the fields. So it for example will be like:<br /><br />CorgaE 1 2 3<br />Noob    4 5 6<br /><br />All help is really appricated.]]></description>
		<pubDate>Sat, 21 Nov 2009 19:41:29 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28675</guid>
	</item>
	<item>
		<title>Awstats Hack</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28673</link>
		<description><![CDATA[Hello all.<br />I stumbled upon a handy script today.<br /><a href="http://www.white-hat-web-design.co.uk/articles/php-awstats.php" target="_blank">LINKY</a><br />Here is the code from that link<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />$username = 'username';<br />$password = 'password';<br />$url = 'domain.com';<br />$year = date&#40;'Y'&#41;; /* replace with 4 digit year */<br /> <br />$url = &#34;http&#58;//&#34;.$username.&#34;&#58;&#34;.$password.&#34;@&#34;.$url.&#34;&#58;2082/awstats.pl?month=01&year=&#34;.$year.&#34;&config=&#34;.$url.&#34;&lang=en&framename=mainright&output=main&#34;;<br /> <br />$buffer = file_get_contents&#40;$url&#41;;<br />$buffer = strip_tags&#40;$buffer,&#34;&#60;tr&#62;&#60;td&#62;&#34;&#41;;<br /> <br />$regex = &#34;{&#60;tr&#62;&#60;td&#62;&#91;0-9A-Za-z&#092;s&#93;*&#60;/td&#62;&#60;td&#62;&#40;&#91;0-9&#93;*&#41;&#60;/td&#62;&#60;td&#62;&#40;&#91;0-9&#93;*&#41;&#60;/td&#62;&#60;td&#62;&#40;&#91;0-9&#93;*&#41;&#60;/td&#62;&#60;td&#62;&#40;&#91;0-9&#93;*&#41;&#60;/td&#62;&#60;td&#62;&#40;&#91;0-9A-Z&#092;.&#092;s&#93;*&#41;&#60;/td&#62;&#60;/tr&#62;&#092;n}&#34;;<br />preg_match_all&#40;$regex,$buffer,$matches&#41;;<br />print_r&#40;$matches&#91;1&#93;&#41;;<br />?&#62;<!--c2--></div><!--ec2--><br />This works well, but prints out the results in one line like so...<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Array &#40; &#91;0&#93; =&#62; 0 &#91;1&#93; =&#62; 0 &#91;2&#93; =&#62; 0 &#91;3&#93; =&#62; 0 &#91;4&#93; =&#62; 0 &#91;5&#93; =&#62; 0 &#91;6&#93; =&#62; 3 &#91;7&#93; =&#62; 265 &#91;8&#93; =&#62; 198 &#91;9&#93; =&#62; 345 &#91;10&#93; =&#62; 201 &#91;11&#93; =&#62; 0 &#41;<!--c2--></div><!--ec2--><br />How would I go about printing each months results in a format more pleasing to the eyes?<br />At least show me how to print each result out by itself...that would be great.<br /><br />Thank you for your time.]]></description>
		<pubDate>Sat, 21 Nov 2009 18:44:36 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28673</guid>
	</item>
	<item>
		<title><![CDATA[Php Include & Variables]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28672</link>
		<description><![CDATA[I've been trying to generate a php include, using data from my database, but am not getting the effect I was expecting.  The current result can be found at: <a href="http://www.equinefocus.co.uk/random/0345gdfg/trialcode.php" target="_blank">http://www.equinefocus.co.uk/random/0345gdfg/trialcode.php</a><br /><br />The code currently in use is:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&nbsp;&nbsp;&nbsp;&nbsp;&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$data = mysql_query &#40;&#34;SELECT * FROM ***** WHERE ref='001'&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$info = mysql_fetch_array&#40;$data&#41;&#41; {&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;// data<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$url='/random/0345gdfg/filters/'.$info&#91;'url'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$addstats='/random/0345gdfg/filters/'.$info&#91;'urla'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />?&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;table border=&#34;1&#34; cellpadding=&#34;5&#34; cellspacing=&#34;0&#34; width=&#34;50%&#34; align=&#34;center&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;tr&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width='60%' bgcolor='silver'&#62;&#60;a href=&#34;&#60;?php echo $url;?&#62;&#34;&#62;&#60;?php echo $info&#91;'filter'&#93;; ?&#62;&#60;/a&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width='40%'&#62;&#60;?php include&#40;$addstats&#41;;?&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/tr&#62;&#60;/table&#62;<br /><br />&#60;?php<br />}&nbsp;&nbsp;<br />?&#62;<!--c2--></div><!--ec2--><br /><br />I attach a pdf file showing a small section of my database: <a href="http://www.equinefocus.co.uk/random/0345gdfg/filters/20091121.pdf" target="_blank">http://www.equinefocus.co.uk/random/0345gd...rs/20091121.pdf</a>.  <br /><br />The PHP include file pulls in stats for each filter, code of which is below.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php include&#40;$_SERVER&#91;'DOCUMENT_ROOT'&#93;.'/random/0345gdfg/*****.php'&#41;;?&#62;<br /><br />&#60;table border=&#34;0&#34; cellpadding=&#34;2&#34; cellspacing=&#34;0&#34; width=&#34;100%&#34;&#62;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width=&#34;25%&#34;&#62;&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = &#34;SELECT SUM&#40;profit&#41; FROM *****&#34;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$query&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Print out result<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$row = mysql_fetch_array&#40;$result&#41;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $row&#91;'SUM&#40;profit&#41;'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;br /&#62;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;?&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width=&#34;25%&#34;&#62;&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = &#34;SELECT COUNT&#40;horse&#41; FROM ***** WHERE pos ='1'&#34;; <br />&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$query&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;// Print out result<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$row = mysql_fetch_array&#40;$result&#41;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $row&#91;'COUNT&#40;horse&#41;'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $row&#91;'type'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;br /&#62;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width=&#34;25%&#34;&#62;&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = &#34;SELECT COUNT&#40;horse&#41; FROM *****&#34;; <br />&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$query&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;// Print out result<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$row = mysql_fetch_array&#40;$result&#41;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;Number of qualifers&#58;&#34;. $row&#91;'COUNT&#40;horse&#41;'&#93; .&#34; &#34;. $row&#91;'type'&#93; .&#34;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;br /&#62;&#34;;<br />}<br />?&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/tr&#62;<br />&#60;/table&#62;<!--c2--></div><!--ec2-->  <br /><br />If there are better ideas on how I can generate this information in a more effective manner, please do let me know!]]></description>
		<pubDate>Sat, 21 Nov 2009 16:28:40 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28672</guid>
	</item>
	<item>
		<title>Mysql Injection Protect For Passwords..</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28668</link>
		<description><![CDATA[Hi there, i have been thinking a bit. Atm ive just got a simple injection protection for my username and password field at the site. But there is a catch with it.<br />in the password field if you want lets say: ajfds" as password. Thats not possible because it sets the password with slashes. Is there any way to fix so users<br />still can use the characters in their passwords?<br /><br />All help is really appriciated!<br /><br />]]></description>
		<pubDate>Fri, 20 Nov 2009 22:05:11 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28668</guid>
	</item>
	<item>
		<title>Form Only Submit When Button Clicked</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28666</link>
		<description><![CDATA[Ok someone suggested I make this in a new thread, so here it goes.<br /><br />When this form submit button is pressed and the you refresh the page, it will send the code again.<br /><br />I want to know if anyone can fix this code, since I know nothing about doing this part.<br /><br />Also when the form is submited, then it will refresh the money so I do not have to refresh it twice.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />include &#40;'______'&#41;;<br />?&#62;<br /><br />&#60;html&#62;<br />&#60;p&#62;<br />&#60;form method='POST'&#62;<br />Number&#58; &#60;input size=&#34;3&#34; maxlength=&#34;4&#34; value=&#34;0&#34; name=&#34;train_s&#34;&#62;<br />&#60;input name=&#34;train&#34; type=&#34;submit&#34; value=&#34;Train&#34;&#62;<br />&#60;/form&#62;<br /><br />&#60;form method='POST'&#62;<br />Number&#58; &#60;input size=&#34;3&#34; maxlength=&#34;4&#34; value=&#34;0&#34; name=&#34;untrain_s&#34;&#62;<br />&#60;input name=&#34;untrain&#34; type=&#34;submit&#34; value=&#34;Untrain&#34;&#62;<br />&#60;/form&#62;<br />&#60;/html&#62;<br /><br /><br />&#60;?php<br /><br />//now for the PHP part<br />//first if train button is pressed<br />if &#40;$_POST&#91;'train'&#93;&#41; {<br /><br /><br />$train_s = strip_tags&#40;addslashes&#40;$_POST&#91;'train_s'&#93;&#41;&#41;; //number of soldiers trained<br /><br />//we check if it is numeric and positive<br />if &#40;!is_numeric&#40;$train_s&#41;&#41; { die&#40;&#34;Wrong input!&#34;&#41;; }<br />if &#40;$train_s &#60; 0&#41; { die&#40;&#34;Wrong input!&#34;&#41;; }<br /><br />//we check if we have enough money<br />$train_money = 100;<br /><br />if &#40;$username&#91;money&#93; &#60; $train_money&#41; { die&#40;&#34;Not enough money to train so many units!&#34;&#41;; }<br /><br />//if script got it to this point it was all ok so we can update<br />mysql_query&#40;&#34;UPDATE &#96;castle wars users&#96; SET money=money-'$train_money', units=units+'$train_s' WHERE id='$username&#91;id&#93;'&#34;&#41;;<br />}<br /><br />//we now make script which will run if we press Untrain button<br />if &#40;$_POST&#91;'untrain'&#93;&#41; {<br />$untrain_s = strip_tags&#40;addslashes&#40;$_POST&#91;'untrain_s'&#93;&#41;&#41;; //number of soldiers trained<br /><br />//we check if it is numeric and positive<br />if &#40;!is_numeric&#40;$untrain_s&#41;&#41; { die&#40;&#34;Wrong input!&#34;&#41;; }<br />if &#40;$untrain_s &#60; 0&#41; { die&#40;&#34;Wrong input!&#34;&#41;; }<br /><br />//we check if user has enough units to untrain<br />if &#40;$username&#91;'units'&#93; &#60; $untrain_s&#41; { die&#40;&#34;You cannot untrain so many units!&#34;&#41;; }<br /><br />//if script got it to this point it was all ok so we can update, but first calculate amount of gained money<br />$gain_money = $untrain_s * 50;<br /><br />//we update, so we add money gained because of untraining units, and change number of units<br />mysql_query&#40;&#34;UPDATE &#96;castle wars users&#96; SET money=money+'$gain_money', units=units-'$train_s' WHERE id='$username&#91;id&#93;'&#34;&#41;;<br />}<br /><br />?&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Fri, 20 Nov 2009 18:47:33 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28666</guid>
	</item>
	<item>
		<title>Are These Php Scripts Correct?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28665</link>
		<description><![CDATA[I'm studying these series of articles: <a href="http://www.intranetjournal.com/articles/200407/ij_07_06_04a.html" target="_blank">http://www.intranetjournal.com/articles/20..._07_06_04a.html</a>. And I was asking myself, about the PHP code.. (those articles are dated 2004), if is there some deprecated codes. Can you please help me? Also, I don't know if is possible that something has changed in PHP over the years.. like in HTML (&lt;br /&gt; instead of &lt;br&gt;, &lt;strong&gt; instead of &lt;b&gt;, etc.).]]></description>
		<pubDate>Fri, 20 Nov 2009 17:59:36 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28665</guid>
	</item>
	<item>
		<title>Safe Mode</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28661</link>
		<description><![CDATA[Pff , i just changed host because of "mass emailing" (was actually a debug script that sended me the bugs by mail , and it was looped , so ..)<br />Everything went well , the database adjustements and stuff,<br />except for this ^^<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->The following error occured on /upload.php . 2 move_uploaded_file&#40;&#41; &#58; SAFE MODE Restriction in effect.<!--c2--></div><!--ec2--><br /><br />I assume this is server related ? <img src="http://w3schools.invisionzone.com/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /><br /><br />regards]]></description>
		<pubDate>Fri, 20 Nov 2009 11:44:20 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28661</guid>
	</item>
	<item>
		<title><![CDATA[Auth Ticket Timeout & Session Timeout]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28660</link>
		<description><![CDATA[Suppose I have an authentication ticket with <b>timeout="30"</b> & <b>slidingExpiration="true"</b> and I also have <b>&lt;sessionState timeout="30" /&gt;</b> under web.config.<br /><br />Now, correct me if I am wrong but both of them should expire at the same time if a user becomes idle after logging in, correct? So what happens when a user is logged and he/she is not idle? How and when does sliding expiration kicks in?<br /><br />Thanks in advance.]]></description>
		<pubDate>Fri, 20 Nov 2009 11:02:18 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28660</guid>
	</item>
	<item>
		<title>I Need A Script On How To Display Picture</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28655</link>
		<description><![CDATA[Please friends please help me on how to display a picture that is in the data base on a browser, so that the user can see his uploded picture, and if possible print. <br />thanks]]></description>
		<pubDate>Fri, 20 Nov 2009 10:04:48 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28655</guid>
	</item>
	<item>
		<title>Display Incorrect</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28649</link>
		<description><![CDATA[Hello,<br />there is display problem.<br />When I first time load the code, the display for each of field at first row  are all 1, the second row are all 2.<br />If I click refresh button, then display the correct information.<br />Where is the problem of the code?<br /><br />thank you,<br /><br />code:<br />&lt;html&gt;<br />    &lt;head&gt;<br />        &lt;link rel="stylesheet" type="text/css" href="example.css"/&gt;<br />        &lt;script type="text/javascript" src="sortable.js"&gt;&lt;/script&gt;<br />        &lt;title&gt;Browse all records from P2&lt;/title&gt;<br />    &lt;/head&gt;<br />    &lt;body&gt;<br /><br />&lt;?php<br />$hostname='localhost';<br />$user='root';<br />$pass='Openit4me';<br />$dbase='mytest';<br /><br />$connection = mysql_connect("$hostname" , "$user" , "$pass") or die ("Can't connect to MySQL");<br />$db = mysql_select_db($dbase , $connection) or die ("Can't select database.");<br /><br />/// Variables<br />//$WHERE = "WHERE county = 'Cornwall' AND accom = 'Hotel' "; /// Your sql statement<br />$max_results = 2; /// Number of results per page<br /><br />if(!isset($_GET['pg'])){ $pg = 1; } else { $pg = $_GET['pg']; } <br />$from = (($pg * $max_results) - $max_results); <br /><br />/// Count total<br />$totals = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM mytest.p2 "),0); <br />$total_pgs = ceil($totals / $max_results);<br /><br />/// Page limiter & result builder<br />$sql = "SELECT * FROM mytest.p2 LIMIT $from, $max_results";<br />$result1 = mysql_query($sql); $num_sql = mysql_num_rows ($result1);<br />$result_disp = mysql_query( "SELECT * FROM mytest.p2 LIMIT $from, $max_results" ) or die("SELECT Error: ".mysql_error());<br /><br /><br /><br />echo "Results: $totals &lt;br&gt;";<br />echo "Viewing page $pg of $total_pgs&lt;br&gt;";<br /><br />// Build paginator <br />if($pg &gt; 1){ $prev = ($pg - 1); // Previous Link <br />//$paginator ="&lt;a href="".$_SERVER['PHP_SELF']."?pg=$prev"&gt;"Previous page&lt;/a&gt;""; }<br />$paginator ="&lt;a href=&#092;"{$_SERVER['PHP_SELF']}?pg=$prev&#092;"&gt;Previous page&lt;/a&gt;";}<br /><br /><br />for($i = 1; $i &lt;= $total_pgs; $i++){ /// Numbers<br />if(($pg) == $i) { $paginator .= "&lt;i&gt;$i&lt;/i&gt; "; } else { <br />//$paginator .="&lt;a href="".$_SERVER['PHP_SELF']."?pg=$i"&gt;$i&lt;/a&gt; "; }}<br /><br />$paginator .="&lt;a href=&#092;"{$_SERVER['PHP_SELF']}?pg=$i&#092;"&gt;$i&lt;/a&gt; "; }}<br /><br /><br /><br />if($pg &lt; $total_pgs){ $next = ($pg + 1); // Next Link <br />//$paginator .="&lt;a href="".$_SERVER['PHP_SELF']."?pg=$next"&gt;"Next page."&lt;/a&gt;"; }<br />$paginator .="&lt;a href=&#092;"{$_SERVER['PHP_SELF']}?pg=$next&#092;"&gt;Next page.&lt;/a&gt;"; }<br /><br /><br />echo "$paginator&lt;br&gt;&lt;br&gt;";<br /><br /><br /><br />        echo " &lt;table class='sortable' id='sortabletable' align=center height=50 &gt;<br />&lt;tr&gt;<br />&lt;th width=100&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;Patient ID&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=100&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=100&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;Education&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=248&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;Address&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=100&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;Family number&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=100&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;Test order&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;/tr&gt;";<br /><br />/// Display results<br />if ($num_sql &gt; 0 ) {$i=0;<br />while ($i &lt; $num_sql) {<br />    $row= mysql_fetch_array($result_disp);<br /><br />            echo "&lt;tr&gt;";<br />            echo "&lt;td&gt;&lt;font face=arial size=2/&gt;". $row[ 'P_ID' ] ."&lt;/font&gt;&lt;/td&gt;";<br />            echo "&lt;td&gt;&lt;font face=arial size=2/&gt;". $row[ 'v1' ] ."&lt;/font&gt;&lt;/td&gt;";<br />            echo "&lt;td&gt;&lt;font face=arial size=2/&gt;". $row[ 'V2' ] ."&lt;/font&gt;&lt;/td&gt;";<br />            echo "&lt;td&gt;&lt;font face=arial size=2/&gt;". $row[ 'V3' ] ."&lt;/font&gt;&lt;/td&gt;";<br />            echo "&lt;td&gt;&lt;font face=arial size=2/&gt;". $row[ 'V4' ] ."&lt;/font&gt;&lt;/td&gt;";<br />            echo "&lt;td&gt;&lt;font face=arial size=2/&gt;". $row[ 'V5' ] ."&lt;/font&gt;&lt;/td&gt;";<br />            echo "&lt;/tr&gt;";<br />++$i;}<br />   echo "&lt;/table&gt;";<br />}<br /><br /><br /><br />echo "&lt;br&gt;$paginator";<br />?&gt;<br />        &lt;p&gt;&nbsp;&lt;/p&gt;&lt;p&gt;&nbsp;&lt;/p&gt;&lt;p&gt;&nbsp;&lt;/p&gt;<br />        &lt;! go back to main page&gt;<br />        &lt;form action="./index.html"&gt;<br />            &lt;p&gt;&lt;input type="submit" value="Back to Home Page" name="Back to Home Page" /n&gt; &lt;/p&gt;<br />        &lt;/form&gt;<br />    &lt;/body&gt;<br />&lt;/html&gt;]]></description>
		<pubDate>Thu, 19 Nov 2009 18:25:48 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28649</guid>
	</item>
	<item>
		<title>Soap Configurations And Wordpress Plugin</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28648</link>
		<description><![CDATA[I installed a wordpress plugin called Exec-PHP, which allows me to write my own php in the WP interface. However, I am using a SOAP web service and it works fine locally in a regular php file, but when i try it in the plugin, it returns this errror:<br /><br /><!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->Fatal error: Class 'SoapClient' not found in /usr/local/apache/htdocs/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 6<br /><!--colorc--></span><!--/colorc--><br />How do I enable the Soap Client? I did phpinfo(); and SOAP doesnt even show up. Any advice?<br /><br />]]></description>
		<pubDate>Thu, 19 Nov 2009 18:16:37 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28648</guid>
	</item>
	<item>
		<title>Where Is The Error?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28647</link>
		<description><![CDATA[hello,<br /><br />I got error message, say "Parse error: syntax error, unexpected '"' in C:&#092;wamp&#092;www&#092;MyTest2&#092;p1_browse v2.php on line 30<br />"<br /><br />the code is:<br />29. if($pg &gt; 1){ $prev = ($pg - 1); // Previous Link <br />30. $paginator ="&lt;a href="".$_SERVER["PHP_SELF"]."?pg=$prev"&gt;"Previous page&lt;/a&gt;""; } <br /><br />Anyone can tell me where is the problem for the part of PHP code?<br /><br />Thank you,]]></description>
		<pubDate>Thu, 19 Nov 2009 14:22:54 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28647</guid>
	</item>
	<item>
		<title>Number Of Checkbox Checked?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28644</link>
		<description><![CDATA[i want to get the number of checkboxes being checked during the form fill <br />e.g if i checked three out of 5 chk boxes the output shd be u have selected three option]]></description>
		<pubDate>Thu, 19 Nov 2009 05:00:10 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28644</guid>
	</item>
	<item>
		<title>Zoom And Center A Marker In Google Maps Api Using Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28643</link>
		<description><![CDATA[i am developing a application in php using the google api application.<br />the problem is that i needed to center and zoom the selected marker but i didnt find any solution for that<br />it will be nice if anybody to help me]]></description>
		<pubDate>Thu, 19 Nov 2009 02:18:32 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28643</guid>
	</item>
	<item>
		<title>Something Is Really Wrong</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28642</link>
		<description><![CDATA[Okay so I made this small code for a calendar showing which date you are on and what dates have past and coming up but something has gone really wrong.. Then I'm showing a past month and selected a date I get all dates selected form that point and forward.<br /><br />Here is the script:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;head&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;title&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blog<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/title&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;link rel=&#34;stylesheet&#34; href=&#34;blog.css&#34; type=&#34;text/css&#34;&#62;<br /><br />&#60;/head&#62;<br />&#60;body&#62;<br />&#60;div id=&#34;calender&#34;&#62;<br />&#60;?php<br /><br />if&#40;isset&#40;$_GET&#91;'y'&#93;&#41; and $_GET&#91;'y'&#93; != &#34;&#34;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;$year = $_GET&#91;'y'&#93;;<br />}else{<br />&nbsp;&nbsp;&nbsp;&nbsp;$year = date&#40;&#34;Y&#34;&#41;;<br />}<br /><br />if&#40;isset&#40;$_GET&#91;'m'&#93;&#41; and $_GET&#91;'m'&#93; != &#34;&#34;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;$month = $_GET&#91;'m'&#93;;<br />}else{<br />&nbsp;&nbsp;&nbsp;&nbsp;$month = date&#40;&#34;m&#34;&#41;;<br />}<br /><br />if&#40;isset&#40;$_GET&#91;'d'&#93;&#41; and $_GET&#91;'d'&#93; != &#34;&#34;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;$selected = $_GET&#91;'d'&#93;;<br />}else{<br />&nbsp;&nbsp;&nbsp;&nbsp;$selected = date&#40;&#34;d&#34;&#41;;<br />}<br /><br />$day = date&#40;&#34;d&#34;&#41;;<br />$day--;<br /><br />$numberofdays = cal_days_in_month&#40;CAL_GREGORIAN, $month, $year&#41;;<br /><br />$countingdays = 0;<br />while&#40;$numberofdays != $countingdays&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;if&#40;$countingdays == $day and date&#40;&#34;Ym&#34;&#41; == $year.$month&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$class = &#34;today&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;}else if&#40;$countingdays &#60; $day and date&#40;&#34;Ym&#34;&#41; &#62;= $year.$month&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$class = &#34;pastdays&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;}else if&#40;date&#40;&#34;Ym&#34;&#41; &#60;= $year.$month&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$class = &#34;comingdays&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;$countingdays++;<br />&nbsp;&nbsp;&nbsp;&nbsp;if&#40;$countingdays == $selected&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$class = $class.&#34; selected&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;a class=&#092;&#34;&#34;.$class.&#34;&#092;&#34; href=&#092;&#34;?y=&#34;.$year.&#34;&m=&#34;.$month.&#34;&d=&#34;.$countingdays.&#34;&#092;&#34; /&#62;&#34;.$countingdays.&#34;&#60;/a&#62;&#34;;<br />}<br />?&#62;<br />&#60;/div&#62;<br />&#60;/body&#62;<!--c2--></div><!--ec2--><br /><br />This line seems to be executed even if the statment isn't true.<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if&#40;$countingdays == $selected&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;$class = $class.&#34; selected&#34;;<br />}<!--c2--></div><!--ec2--><br /><br />Really odd is what if I select 8th of the month it works but not 20th<br /><br />I think is some bug couse it works and it don't at the same time.<br /><br />I have no clue what to do.]]></description>
		<pubDate>Wed, 18 Nov 2009 23:44:16 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28642</guid>
	</item>
	<item>
		<title>Trouble With Joins</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28638</link>
		<description><![CDATA[Hello.<br /><br />For a website I'm making, in order to register, you must know someone that is already registered. Checking to make sure that the "referrer" they entered into the registration field is actually a user is easy enough:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->SELECT firstName, lastName FROM users WHERE firstName = '$refFirstName' && lastName = '$refLastName';<!--c2--></div><!--ec2--><br /><br />Where <i>$refFirstName</i> and <i>$refLastName</i> are the referrer's first and last names, respectively.<br /><br /><a href="http://i48.tinypic.com/5arekl.jpg" target="_blank">Here is the layout of the database</a>.<br /><br />Because it is a "private" site (i.e. a limited user base), I was going to make a page that displays all the users and the person that referred them. Simply put, I have no idea how to do it. In the <i>referrers</i> table, <i>refID</i> is always equal to <i>userID</i>. I cannot figure out a way to get the <u>NAME</u> of a user's referrer out of the database in the same SELECT query as everything else. Would I use a LEFT JOIN or INNER JOIN, or something else? Also, is there anyway to combine the <i>referrer</i> table into the <i>user</i> one? <br /><br />Thanks!]]></description>
		<pubDate>Wed, 18 Nov 2009 20:18:59 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28638</guid>
	</item>
	<item>
		<title>W3c Validator Shows Well Formedness Error, Amaya Does Not</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28637</link>
		<description><![CDATA[Hi,<br /><br />I think there may be a but in the implementation somewhere.<br /><br />Just thought I'd report it so it can be looked into.<br /><br />Thanks]]></description>
		<pubDate>Wed, 18 Nov 2009 20:14:51 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28637</guid>
	</item>
	<item>
		<title>Creating A Text Based Game</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28636</link>
		<description><![CDATA[I've noticed a lot of pre made scripts are .php files, so when I try to open them, it's just a huge thing of code, note I'm still on the basics of HTML and I'll build up to PHP, but I was just wondering.. What exactly do you do with this? For example: It was a script for "attacking a player" how would I actually use that?<br /><br />However of course, this post is mainly because I would like to know the steps to creating a web based multi player online text based game similar to Outwar and Torn City. I understand HTML and PHP are very important languages to help, but what else would I need?]]></description>
		<pubDate>Wed, 18 Nov 2009 19:39:41 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28636</guid>
	</item>
	<item>
		<title>Reordering Nodes In Xml File With Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28634</link>
		<description><![CDATA[Hi all, I have an xml file and need to insert a whole bunch of nodes into it as children of a particular node. Here is the file I start with:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;Header Organisation_Name=&#34;XXXXXXX&#34; Run_Date=&#34;20090127&#34; Run_UserId=&#34;PJ421&#34; Version=&#34;18&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;NoticeRun Id=&#34;81&#34; Run_Name=&#34;Journals 7928,7957,8058,8067&#34; Issue_Date=&#34;20090129&#34; No_of_Notices=&#34;122&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;InstalmentPlan Name=&#34;Supp Levies Jan09&#34; Discount_Date_1=&#34;20090302&#34; Discount_Percent_1=&#34;10.00&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Instalment Number=&#34;1&#34; Due_Date=&#34;20090302&#34; /&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/InstalmentPlan&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Group Name=&#34;{Ungrouped}&#34; /&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/NoticeRun&#62;<br />&#60;/Header&#62;<!--c2--></div><!--ec2--><br /><br />I have a whole bunch of xml files named Notice_ID.xml and need to insert them as children of the Group Node. Here is an excerpt from one of the Notice_ID.xml files:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;Notice Id=&#34;199187&#34; Sequence=&#34;1&#34; Amount=&#34;2495.69&#34; Discount_Amount_1=&#34;0.00&#34; Discounted_Amount_1=&#34;2495.69&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;FormattedNameAddr Line1=&#34;XXXXXXXXXXXXXXXX&#34; Line2=&#34;XXXXXXXXXXXXXXXXX&#34; Line3=&#34;XXXXXXXXXXXXXXXX&#34; Line4=&#34;XXXXXXXXXXXXX&#34;/&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;Assessments&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Assessment Id=&#34;XXXXX&#34; Is_Duplicate_Notice=&#34;0&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Valuation Type_5=&#34;UCV07&#34; Valuation_5=&#34;26728&#34; Date_of_Valuation=&#34;20061001&#34; Issue_Date=&#34;20080311&#34;/&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Balances&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Balance Levy_Name=&#34;General Rate 19 Comm Title Inv&#34; Levy_Code=&#34;04R13&#34; Display_Seq=&#34;1&#34; Arrears_Balance=&#34;786.81&#34;/&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/Balances&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Levies&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Levy Charge_Date=&#34;20081219&#34; Levy_Name=&#34;Legal Costs&#34; Base_Amount=&#34;524.27&#34;/&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/Levies&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/Assessment&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/Assessments&#62;<br />&#60;/Notice&#62;<!--c2--></div><!--ec2--><br /><br />And finally, here is an excerpt the code I use to grab each Notice_ID file in order, insert some new attributes, and finally output into one big file.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->$doc = new DOMDocument&#40;'1.0'&#41;; <br />$doc-&#62;formatOutput = true;<br />$doc-&#62;load&#40;'test.xml'&#41;;<br /><br />$sql = &#34;SELECT BSPKey, Barcode, Notice_ID, Postcode FROM MailMerge ORDER BY BSPKey, Postcode&#34;;<br />$result = odbc_exec&#40;$dbcnx, $sql&#41;;<br />while &#40;$row = odbc_fetch_array&#40;$result&#41;&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;$BSPKey = $row&#91;'BSPKey'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$Barcode = $row&#91;'Barcode'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$Notice_ID = $row&#91;'Notice_ID'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$xml = new SimpleXMLElement&#40;&#34;notices&#092;&#092;$Notice_ID&#34;.&#34;.xml&#34;, null, true&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$xml-&#62;FormattedNameAddr-&#62;addAttribute&#40;&#34;BSPKey&#34;, &#34;$BSPKey&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$xml-&#62;FormattedNameAddr-&#62;addAttribute&#40;&#34;Barcode&#34;, &#34;$Barcode&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$domnode = dom_import_simplexml&#40;$xml&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$domnode = $doc-&#62;importNode&#40;$domnode, true&#41;;<br />//&nbsp;&nbsp;&nbsp;&nbsp;$doc-&#62;firstChild-&#62;appendChild&#40;$domnode&#41;; //This inserts the nodes as children of &#60;Header&#62;<br />//&nbsp;&nbsp;&nbsp;&nbsp;$doc-&#62;appendChild&#40;$domnode&#41;; //This inserts the nodes after &#60;/Header&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;$doc-&#62;Header-&#62;NoticeRun-&#62;Group-&#62;appendChild&#40;$domnode&#41;; //This returns error &#34;Fatal error&#58; Call to a member function appendChild&#40;&#41; on a non-object&#34;<br />}<br /><br />echo $doc-&#62;saveXML&#40;&#41;;<!--c2--></div><!--ec2--><br /><br />As commented in the code, the problem i'm having is inserting the &lt;Notice&gt; nodes in the right place. I want them to be children of the &lt;Group&gt; node, but come up with the error "Fatal error: Call to a member function appendChild() on a non-object". I can use either of the lines above to insert them as either children of Header, or after Header, but that's not what I need. What am I missing? Thanks]]></description>
		<pubDate>Wed, 18 Nov 2009 17:56:27 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28634</guid>
	</item>
	<item>
		<title>Security Tips</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28631</link>
		<description><![CDATA[Hello people, <br /><br />I have a few questions i want to ask you guys.<br /><br />1. When I dont host my site at my own server, is my hoster "responsible" for makeing it hard to etc hack into my FTP, MySQL server?<br /><br />2. What can i do to improve my mysql_connect script if it is like the w3schools connection script?<br /><br />3. Is there any other "totally open" ways into my SQL db then with Injections?<br /><br />4. Is it "wrong" of me to use basic mysql_fetch_object or mysql_num_rows? Should i do something else to improve security? or is there no ways?<br /><br />5. I understand that spam-bots and password-bots are a big problem today, so is captcha the only way to prevent this, or have some of you genius'es come up with something else? <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />6. Guess i dont have asked enough questions now, so if there is something more you want to tip me about, please do it? <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Be open and share your goodies with us <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Hope this post will be usefull for others too when answers are posted <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Have a nice day fellow nerds <img src="http://w3schools.invisionzone.com/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><br /><br />norNerd]]></description>
		<pubDate>Wed, 18 Nov 2009 15:37:07 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28631</guid>
	</item>
	<item>
		<title>Cookie Expiration</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28630</link>
		<description><![CDATA[hello all<br /><br />if i set a cookie to expire like so<br />setcookie ("test","test",0,"/","","true","true");<br /><br />from the clients computer (where the cookie is actually set)<br />is it possible to save it and use it in the future ?<br />can i open the cookie file or browser settings some how and get the cookie not to expire ?<br /><br />thank you<br />Tal]]></description>
		<pubDate>Wed, 18 Nov 2009 14:29:18 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28630</guid>
	</item>
	<item>
		<title>Soap Fault Details</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28629</link>
		<description><![CDATA[I'm trying to use PHP to communicate w/ a web service via SOAP / HTTP.  I was actually able to get this to work fairly quickly using the SoapClient class as show below.  However, the service is storing some additional information in the "details" section of the SOAP fault, but I don't see from the docs how to get access to that data?  The SoapFault constructor appears to take "details" as an argument, but is it possible to retrieve this information in PHP?<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->try {<br />&nbsp;&nbsp;&nbsp;&nbsp;$client = new SoapClient&#40;&#34;my.wsdl&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$result = $client-&#62;func&#40;$params&#41;;<br />}<br />catch &#40;SoapFault $fault&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;$code = $fault-&#62;faultcode;<br />&nbsp;&nbsp;&nbsp;&nbsp;$message = $fault-&#62;getMessage&#40;&#41;;<br />}<!--c2--></div><!--ec2--><br /><br />Also is there a way to get access to the underlying XML from the SOAP message?  This might be handy for debugging.]]></description>
		<pubDate>Wed, 18 Nov 2009 13:02:22 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28629</guid>
	</item>
	<item>
		<title>Script Name?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28626</link>
		<description><![CDATA[Hi all, <br /><br />where can I find a tutorial (filter with one click) similar how on the left side in link?<br /><a href="http://www.dell.com/home/laptops#subcats=&navla=&a=&page=1" target="_blank">http://www.dell.com/home/laptops#subcats=&...p;a=&page=1</a><br /><br />Many thanks for any help!]]></description>
		<pubDate>Wed, 18 Nov 2009 09:22:12 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28626</guid>
	</item>
	<item>
		<title>How Do I  Pull Out Pix From Database</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28624</link>
		<description><![CDATA[Please nice friends  i have been trying to write a script that will upload pix to database and also pull it out to the browser, But i have been having problem with my code, Plz help me out. This is the code. Thanks<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;?php<br />$db = mysql_connect("localhost","Austin","password");<br />mysql_select_db("school");<br />$pname = $_REQUEST['pname'];<br />$pdesc = $_REQUEST['pdesc'];<br />$ftype = $_FILES['pfile']['type'];<br />$fname = $_FILES['pfile']['name'];<br />if ($_FILES['pfile']['size'] &lt;= $_REQUEST['MAX_FILE_SIZE'])<br />{<br />$fdata = fread(fopen($_FILES['pfile']['tmp_name'], "rb"),$_FILES['pfile']['size']);<br /><br />$fdata = base64_encode($fdata);<br />$sql = "INSERT INTO pictures “;<br />$sql .= “(poster_name,pdesc,ftype,fname,fdata) VALUES “;<br />$sql .= “(&#092;"${pname}&#092;",&#092;"${pdesc}&#092;",”;<br />$sql .= “&#092;"${ftype}&#092;",&#092;"${fname}&#092;",&#092;"${fdata}&#092;")";<br />$query = mysql_query($sql) or die(mysql_error());<br />echo "File Uploaded!";<br />} else<br />echo "File Too Large";<br />?&gt;</div>]]></description>
		<pubDate>Wed, 18 Nov 2009 08:14:16 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28624</guid>
	</item>
	<item>
		<title>Php Image Upload Problem?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28623</link>
		<description><![CDATA[Hi, I made a PHP upload script that uploads image and adds extra things to the name.<br /><br />Here is the code<br />The problem is that the image is upload however if the image name is say 59.png it will be upload as bf6-gsiu5cztf3ci_706h8m121h but, I don't not know how to add extension so for a .png image a .png ext will be added to this so it will look like this: bf6-gsiu5cztf3ci_706h8m121h.png since I tried doing this method<br /><br />$ext = ".jpg";<br /><br />this adds the .jpg text to the end result but when saved onto a computer Photoshop for example dosen't read it as a valid .jpg file since the original file was .png<br /><br />What can I do to echo the extensions?<br /><br />Using either $HTTP_POST_FILES['ufile']['type'] to get the mine type and making php convert it to required echo statement, or is there a different way?<br /><br />-Thx]]></description>
		<pubDate>Tue, 17 Nov 2009 21:56:37 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28623</guid>
	</item>
	<item>
		<title>Is This Possible In Php?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28622</link>
		<description><![CDATA[I am doing personal research for my family's website about how to better streamline content and make browsing more user-friendly.<br /><br />Here is the situation, thanks in advance for reading!<br /><br />For our room-renting site, the page with the master list of available apartments is one long html file with 40+ divs showing a summary of each room (price, features, a few small pictures). As you can imagine this is a very long html file. The thing that makes it complicated is that when an old room is removed or a new room added I have to change it twice, once in the master list then again in the individual page for that room. <br /><br />It is possible in PHP to program a script that will insert a small html file into the document for each file in a directory? (Similar to how a blog puts one post after another pulling from each file in an archive.) <br /><br />I have read a little about ajax and asp, but haven't read into the details yet. I'd like some suggestions for a direction to follow. Long term goals would be to implement a system where the user could check boxes specifying limits on the rooms displayed, then seeing the available choices change without reloading the page...<br /><br />for example:<br />show only rooms priced between... $50-100, $100-150<br />show rooms with...                      2 bedrooms, 3 bedrooms.<br />show rooms in...                         village 1, village 2, village 3<br /><br />can I do this with php? or does my project require a different kind of server scripting/database?<br /><br />Any help is appreciated, thank you!]]></description>
		<pubDate>Tue, 17 Nov 2009 21:42:52 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28622</guid>
	</item>
	<item>
		<title><![CDATA[I Can't See It]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28621</link>
		<description><![CDATA[<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if &#40;$num_rows == 0&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp; $query = &#34;INSERT INTO VistngIPs &#40;addy_id, count_em, site, referingURL, Name&#41; VALUES&nbsp;&nbsp;&#40;'&#34;.$ip.&#34;','1','&#34;.$site.&#34;','&#34;.$referingURL.&#34;','&#34;.$Name.&#34;'&#41;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp; $result = mysql_query&#40;$query&#41; or die&#40;'Query failed&#58; ' . mysql_error&#40;&#41;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<!--c2--></div><!--ec2--><br /><br />Can you see my error?]]></description>
		<pubDate>Tue, 17 Nov 2009 20:15:20 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28621</guid>
	</item>
	<item>
		<title>Link Pressed</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28620</link>
		<description>Hopefully this will be my last question for awhile, is it possible to do a if (the html link was pressed), ................else........update.users..you get the point, is it possible to do that?</description>
		<pubDate>Tue, 17 Nov 2009 18:36:49 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28620</guid>
	</item>
	<item>
		<title>Error Of Unexpected $end</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28619</link>
		<description><![CDATA[hello,<br />I am getting Unexpected $end.. whats wrong with my code. And I spent about 2 days to check it out. But I totally lost.<br /><br />&lt;html&gt;<br />    &lt;head&gt;<br />        &lt;link rel="stylesheet" type="text/css" href="example.css"/&gt;<br />        &lt;script type="text/javascript" src="sortable.js"&gt;&lt;/script&gt;<br />        &lt;title&gt;Browse all records from P2&lt;/title&gt;<br />    &lt;/head&gt;<br />    &lt;body&gt;<br />        &lt;?php<br />        $db="mytest";<br />        $link = mysql_connect("localhost","root","Openit4me");<br />        if (! $link) die("Couldn't connect to MySQL");<br />        mysql_select_db($db , $link) or die("Couldn't open $db: ".mysql_error());<br /><br />        $result = mysql_query( "SELECT * FROM mytest.p1 limit 30" ) or die("SELECT Error: ".mysql_error());<br /><br />        $num_rows = mysql_num_rows($result);<br /><br /><br /><br />        mysql_close($link);<br /><br /><br /><br />        echo "&lt;P&gt;this is my debug. Each column can be sorted by click column title. &lt;/p&gt;";<br />        echo "&lt;P&gt;need add feature to display records page by page when looking a lot of rows&lt;/P&gt;";<br />        echo "&lt;P&gt;There are $num_rows records.&lt;/P&gt;";<br /><br />        //add titles;<br />        echo "&lt;h3&gt;&lt;center&gt;&lt;font face=arial&gt; My test project II &lt;/font&gt;&lt;/center&gt;&lt;/h3&gt;" ;<br />        echo "&lt;h4&gt;&lt;center&gt;&lt;font face=arial&gt; Browse all records from table p1 &lt;/font&gt;&lt;/center&gt;&lt;/h4&gt;";<br /><br />        echo " &lt;table class='sortable' id='mybrowse' align=center height=50 &gt;<br /><br />&lt;tr&gt;<br />&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;CHR&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;SNP&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;minorA&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;majorA&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=20&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;MAF&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;NCHROBS&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br /><br />&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;_dom&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;_rec&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;_add&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;position&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;AddBETA&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;addPvalue&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br /><br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;domBETA&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;domPvalue&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;RecBETA&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;RecPvalue&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br /><br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;bestP&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br />&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;ModelUsed&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; <br /><br /><br /><br />&lt;/tr&gt;"; <br /><br /><br /><br />        while ($row= mysql_fetch_array($result)) { //loop until all records from the table are selected<br /><br />        //set difference color for ODD or EVEN row;<br />            $color2 = "#ffffff";<br />            $color1 = "#cccccc";<br />            $row_count = 0;<br />            while ($row= mysql_fetch_array($result)) { //loop until all records from the table are selected<br />                $row_color = ($row_count % 2) ? $color1 : $color2;<br /><br />                echo "&lt;tr bgcolor='$row_color'&gt;";<br /><br />                echo "&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'CHR' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'SNP' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'minorA' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'majorA' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=20&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'MAF' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'NCHROBS' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br /><br />                echo "&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ '_dom' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ '_rec' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt;";<br />                echo "&lt;th width=10&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ '_add' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt;";<br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'position' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'AddBETA' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'addPvalue' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br /><br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'domBETA' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'domPvalue' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt;";<br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'RecBETA' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt;";<br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'RecPvalue' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br /><br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'bestP' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt; ";<br />                echo "&lt;th width=50&gt;&lt;font face=arial size=2/&gt;&lt;div align=center&gt;&lt;strong&gt;". $row[ 'ModelUsed' ] ."&lt;/strong&gt;&lt;/div&gt;&lt;/font&gt;&lt;/th&gt;";<br /><br /><br /><br />                echo "&lt;/tr&gt;";<br /><br />                $row_count++;<br /><br /><br /><br /><br /><br /><br />            }<br /><br /><br /><br />            echo "&lt;/table&gt;";<br /><br /><br /><br />        ?&gt;<br />        &lt;p&gt;&nbsp;&lt;/p&gt;&lt;p&gt;&nbsp;&lt;/p&gt;&lt;p&gt;&nbsp;&lt;/p&gt;<br />        &lt;! go back to main page&gt;<br />        &lt;form action="./index.html"&gt;<br />            &lt;p&gt;&lt;input type="submit" value="Back to Home Page" name="Back to Home Page" &gt; &lt;/p&gt;<br />        &lt;/form&gt;<br />    &lt;/body&gt;<br />&lt;/html&gt; <br /><br />]]></description>
		<pubDate>Tue, 17 Nov 2009 17:42:13 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28619</guid>
	</item>
	<item>
		<title>Datalist Is Showing Up In Source Code, But Not On Web Page?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28618</link>
		<description><![CDATA[For some reason, the data for my datalist is showing up in the source code of the page without a problem, but it's not being displayed on the webpage. That page is just blank. Why could this happen?]]></description>
		<pubDate>Tue, 17 Nov 2009 15:49:24 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28618</guid>
	</item>
	<item>
		<title>Array_mutlisort</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28614</link>
		<description><![CDATA[hi<br /><br />The following code,<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;?php<br />$a=array(0=&gt;array('cat_id'=&gt;17,'cat_parentid'=&gt;10,'cat_name'=&gt;'mercedes'),1=&gt;array('cat_id'=&gt;12,'cat_parentid'=&gt;14,'cat_name'=&gt;'volvo'),2=&gt;array('cat_id'=&gt;16,'cat_parentid'=&gt;11,'cat_name'=&gt;'zen'));<br />print_r($a);<br />echo "&lt;hr&gt;";<br />array_multisort($a);<br />print_r($a);<br />?&gt;</div><br />gives the out put as follow:<br /><br />Array ( [0] =&gt; Array ( [cat_id] =&gt; 17 [cat_parentid] =&gt; 10 [cat_name] =&gt; mercedes ) [1] =&gt; Array ( [cat_id] =&gt; 12 [cat_parentid] =&gt; 14 [cat_name] =&gt; volvo ) [2] =&gt; Array ( [cat_id] =&gt; 16 [cat_parentid] =&gt; 11 [cat_name] =&gt; zen ) ) <br />--------------------------------------------------------------------------------<br />Array ( [0] =&gt; Array ( [cat_id] =&gt; 12 [cat_parentid] =&gt; 14 [cat_name] =&gt; volvo ) [1] =&gt; Array ( [cat_id] =&gt; 16 [cat_parentid] =&gt; 11 [cat_name] =&gt; zen ) [2] =&gt; Array ( [cat_id] =&gt; 17 [cat_parentid] =&gt; 10 [cat_name] =&gt; mercedes ) )<br /><br />I cant understand that on what basis the array is arranged after multisort() here..<br />on alphabhatic order of key or ascending order of values..or what ??<br /><br />thanks<br />karthikanov24]]></description>
		<pubDate>Tue, 17 Nov 2009 12:13:35 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28614</guid>
	</item>
	<item>
		<title>Automatic Generated Mail From Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28612</link>
		<description><![CDATA[Atempt to make a PHP program which grenerate  mail result in this error message:<br /><br /><b>Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:&#092;Programfils&#092;wamp&#092;mycompany&#092;A-mail.php on line 72</b><br /><br />In php.ini this is written<br /><br /><b>[mail function]<br />; For Win32 only.<br />;SMTP = localhost<br />SMTP = smtp.mycompany.no<br /><br />; For Win32 only.<br />sendmail_from = me@mycompany.no</b><br /><br />I do not find where to set port no. I use WAMP software and Microsoft Outlook. In account information in Outlook there is written: <br /><b>Microsoft Exchange Server</b> and account for this item: <b>mycompany-mail.mycompany.local</b><br /><br />Changing <b>SMTP = smtp.mycompany.no</b> to <b>SMTP = mycompany-mail.mycompany.local</b> do not work.<br /><br />Can anybody help me with this problem?<br /><br />Regards Cit.]]></description>
		<pubDate>Tue, 17 Nov 2009 09:50:15 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28612</guid>
	</item>
	<item>
		<title>Problem Changing Rss Into Atom Reader</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28610</link>
		<description><![CDATA[Hi <br /><br />I am looking at the rss reader tutorial given on the w3schools website: <a href="http://www.w3schools.com/php/php_ajax_rss_reader.asp" target="_blank">http://www.w3schools.com/php/php_ajax_rss_reader.asp</a> <br /><br />I am trying to make it work on atom feeds but it is showing the following error: <br />Warning: DOMDocument::load() [function.load]: Opening and ending tag mismatch: link line 4 and head in <a href="http://creditwrench.blogspot.com/atom.xml" target="_blank">http://creditwrench.blogspot.com/atom.xml</a>, line: 12 in /web/rkhan19/ftpaccess/pub/w3_rss/Atom/getrss.php on line 8 <br /><br />Warning: DOMDocument::load() [function.load]: Opening and ending tag mismatch: img line 13 and a in <a href="http://creditwrench.blogspot.com/atom.xml" target="_blank">http://creditwrench.blogspot.com/atom.xml</a>, line: 13 in /web/rkhan19/ftpaccess/pub/w3_rss/Atom/getrss.php on line 8 <br /><br />Warning: DOMDocument::load() [function.load]: Opening and ending tag mismatch: a line 13 and div in <a href="http://creditwrench.blogspot.com/atom.xml" target="_blank">http://creditwrench.blogspot.com/atom.xml</a>, line: 15 in /web/rkhan19/ftpaccess/pub/w3_rss/Atom/getrss.php on line 8 <br /><br />.........................this error occurs several time and it also shows the following 2 errors......................<br /> <br /><b>Warning</b>: DOMDocument::load() [<a href="http://lamp.inf.brad.ac.uk:59900/w3_rss/Atom/function.load" target="_blank">function.load</a>]: Entity 'copy' not defined in <a href="http://creditwrench.blogspot.com/atom.xml" target="_blank">http://creditwrench.blogspot.com/atom.xml</a>, line: 51 in <b>/web/rkhan19/ftpaccess/pub/w3_rss/Atom/getrss.php</b> on line <b>8</b><br /><br /><b>Warning</b>: DOMDocument::load() [<a href="http://lamp.inf.brad.ac.uk:59900/w3_rss/Atom/function.load" target="_blank">function.load</a>]: Entity 'ndash' not defined in <a href="http://creditwrench.blogspot.com/atom.xml" target="_blank">http://creditwrench.blogspot.com/atom.xml</a>, line: 51 in <b>/web/rkhan19/ftpaccess/pub/w3_rss/Atom/getrss.php</b> on line <b>8</b> <br /><br /><br /><br />Can anyone help me?? Below is the code that I am using: <br /><br />&lt;?php<br />  $xml = "<a href="http://creditwrench.blogspot.com/atom.xml" target="_blank">http://creditwrench.blogspot.com/atom.xml</a>";<br /><br />$xmlDoc = new DOMDocument();<br />$xmlDoc-&gt;load($xml);<br />  <br />$channel=$xmlDoc-&gt;getElementsByTagName('entry')-&gt;item(0);<br />$channel_title = $channel-&gt;getElementsByTagName('title')<br />-&gt;item(0)-&gt;childNodes-&gt;item(0)-&gt;nodeValue;<br /><br />echo($channel_title . "&lt;/p&gt;");<br />?&gt; <br /><br /><br /><br /><br /><br /><br />]]></description>
		<pubDate>Tue, 17 Nov 2009 07:35:18 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28610</guid>
	</item>
	<item>
		<title>How To Include Symbols - When Sending Php Mail..?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28606</link>
		<description><![CDATA[I have a working PHP mail sending script, the only problem is that when i try to send any kinda symbol in Either the Message Title or the Message body it messes up the text..<br /><br />Like if i wanted to put quotes in the title or embed a picture into the message body with &lt;img src='pic.jpg' /&gt; it gets all messed up..!!<br />is there any specific way to make it so I can include these symbols so the message don't get ruined..??<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br /><br />$to=$_POST&#91;&#34;to&#34;&#93;;<br />$from=$_POST&#91;&#34;from&#34;&#93;;<br />$name=$_POST&#91;&#34;name&#34;&#93;;<br />$subject=$_POST&#91;&#34;subject&#34;&#93;;<br />$message=$_POST&#91;&#34;message&#34;&#93;;<br /><br />$headers = &#34;From&#58; &#092;&#34;$name&#092;&#34; &#60;$from&#62;&#092;nContent-Type&#58; text/html; charset=iso-8859-1&#34;;<br />$ret=mail&#40;&#34;$to&#34;, &#34;$subject&#34;, &#34;$message&#34;, &#34;$headers&#34;&#41;;<br /><br />if&#40;$ret==true&#41;<br />echo&#34;Mail sent Successfully&#34;;<br />else<br />echo&#34;Unable to Send mail&#34;;<br /><br />?&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Tue, 17 Nov 2009 01:35:23 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28606</guid>
	</item>
	<item>
		<title>Help With Replace</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28605</link>
		<description><![CDATA[PHP has many functions to replace strings, <br />But I do not understand how things like this work:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->preg_replace&#40;&#34;/&#40;&#60;&#092;/?&#41;&#40;&#092;w+&#41;&#40;&#91;^&#62;&#93;*&#62;&#41;/e&#34;, &#34;'&#092;&#092;1'.strtoupper&#40;'&#092;&#092;2'&#41;.'&#092;&#092;3'&#34;,&nbsp;&nbsp;$html_body&#41;;<!--c2--></div><!--ec2--><br />could someone explain this and say what the above code does? <br /><br /><br /><div align='right'><i><!--sizeo:1--><span style="font-size:8pt;line-height:100%"><!--/sizeo-->yes, I've red the pages on php.net<!--sizec--></span><!--/sizec--></i></div>]]></description>
		<pubDate>Tue, 17 Nov 2009 01:27:03 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28605</guid>
	</item>
	<item>
		<title>Creating An Array From Amysql Table</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28599</link>
		<description><![CDATA[I have a mysql table called example. It has 3 records and 5 fields. The field names are: id, firstname, lastname, address, and zip.<br /><br />I need to select all the records and place all the info from all the records into an array called myarray.<br /><br />How do I do that?<br />]]></description>
		<pubDate>Mon, 16 Nov 2009 15:03:15 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28599</guid>
	</item>
	<item>
		<title>Hlp Pls..</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28598</link>
		<description><![CDATA[hi..i have a quiz site wherein there are 35 levels.There is a leader board which shows the points of all players.<br />when he crosses level 1 the leader board should update his score..like add one to his score and put him on top of the table [if he is the top scorer]..how is this possible?<br /><br />The question is put up in 1.php the answer to be compared is in 2.php and the next level is 3.php<br /><br />what is the sql query to create a field for this?<br />how will 2.php handle this to update the leaderboard?thanku in advance..]]></description>
		<pubDate>Mon, 16 Nov 2009 14:30:09 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28598</guid>
	</item>
	<item>
		<title>Css Not Working Well</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28593</link>
		<description><![CDATA[Hello,<br /><br />I got a sample CSS file like this:<br />a img {<br />	border: 0;<br />}<br /><br />table.sortable {<br />	border-spacing: 0;<br />	border: 1px solid #000;<br />	border-collapse: collapse;<br />}<br />table.sortable th, table.sortable td {<br />	text-align: left;<br />	padding: 2px 4px 2px 4px;<br />	border-style: solid;<br />	border-color: #444;<br />}<br />table.sortable th {<br />	border-width: 1px 1px 1px 1px;<br />	background-color: #ccc;<br />}<br />table.sortable td {<br />	border-width: 1px 1px 0px 1px;<br />}<br />table.sortable tr.odd td {<br />	background-color: #ddd;<br />}<br />table.sortable tr.even td {<br />	background-color: #fff;<br />}<br />The code seems it can give the difference color for ODD or EVEN row from output.<br />I try to set the code avariable by add a &lt;link rel="stylesheet" type="text/css" href="example.css"/&gt; between &lt;head&gt; and &lt;/head&gt; tag.<br />The border parts worked. but the background-color wasn't. <br />Can anyone can tell me how to make the color working?<br />Thank you,<br />]]></description>
		<pubDate>Mon, 16 Nov 2009 12:59:03 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28593</guid>
	</item>
	<item>
		<title>Basic Array Question</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28592</link>
		<description><![CDATA[I successfully scripted an fetch array while loop on a table called example.  <br /><br />What's the name of the function that will return the name of the array that was created by the fetch array while loop?<br /><br />What's the name of the function that will turn the number of rows in an array?<br /><br />Thanks<br />]]></description>
		<pubDate>Mon, 16 Nov 2009 12:32:47 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28592</guid>
	</item>
	<item>
		<title>Smtp Email - How Do I?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28584</link>
		<description><![CDATA[I'm trying to send email using smtp from godaddy. Its a password recovery code, the user enters their email and a password is sent to them. But when I'm testing it it keeps giving me an error saying <br /><br />Warning: mail() [function.mail]: SMTP server response: 554 The message was rejected because it contains prohibited virus or spam content in D:&#092;Hosting&#092;4447297&#092;html&#092;send_password_ac.php on line 53<br />Cannot send password to your e-mail address<br /><br />I called godaddy and they said to make sure i dont have a link and other stuff and that their server info is relay-hosting.secureserver.net ( i dont have this in my code, dont know how to incorporate it)<br /><br />Here is my code<br /><br />&lt;?<br /><br />$host="xxxxxxx"; // Host name <br />$username="xxxxxx"; // Mysql username <br />$password="xxxxxx"; // Mysql password <br />$db_name="xxxxx"; // Database name <br /><br /><br />//Connect to server and select databse.<br />mysql_connect("$host", "$username", "$password")or die("cannot connect to server"); <br />mysql_select_db("$db_name")or die("cannot select DB");<br /><br />// value sent from form <br />$email_to=$_POST['email_to'];<br /><br />// table name <br />$tbl_name=members; <br /><br />// retrieve password from table where e-mail<br />$sql="SELECT password FROM $tbl_name WHERE email='$email_to'";<br />$result=mysql_query($sql);<br /><br />// if found this e-mail address, row must be 1 row <br />// keep value in variable name "$count" <br />$count=mysql_num_rows($result);<br /><br />// compare if $count =1 row<br />if($count==1){<br /><br />$rows=mysql_fetch_array($result);<br /><br />// keep password in $your_password<br />$your_password=$rows['password'];<br /><br /><br />// ---------------- SEND MAIL FORM ---------------- <br /><br /><br />// send e-mail to ...<br />$to="$email_to"; <br /><br />// Your subject <br />$subject="Your password here"; <br /><br />// From <br />$header="from: khrishnabrown.info"; <br /><br />// Your message <br />$messages="Your password is $your_password ";<br /><br /><br />// send email <br />$sentmail=mail($to,$subject,$messages,$header); <br /><br />}<br /><br />// else if $count not equal 1 <br />else {<br />echo "Email not found in database  ";<br />} <br /><br />// if your email succesfully sent <br />if($sentmail){<br />echo "Your Password Has Been Sent To Your Email Address.";<br />}<br />else {<br />echo "Cannot send password to your e-mail address";<br />}<br /><br />?&gt;<br />]]></description>
		<pubDate>Mon, 16 Nov 2009 05:16:03 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28584</guid>
	</item>
	<item>
		<title>What Is .net?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28579</link>
		<description><![CDATA[Hello fellows!!!<br /><br />Can someone from you explain me please in a clear language, what is in fact the concept who called ".NET"?<br /><br />whether is this a programming language like PHP or ASP? or this is something else?<br /><br /><!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo--><u><b>Please response me!!!</b></u><!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->]]></description>
		<pubDate>Sun, 15 Nov 2009 10:07:34 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28579</guid>
	</item>
	<item>
		<title>Login Problem</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28572</link>
		<description><![CDATA[I want to password protect a page.<br />I created a table in mysql database for password and put in a default value [the password of the page].<br /><br />what would the form code be which connects with the database?<br />eg,If i want to protect 1.php with the password 'mypassword' ,what would the code be for 1.php to connect with the database?<br />note: jst the password and <b>no username...</b> thanks in advance.. <img src="http://w3schools.invisionzone.com/style_emoticons/default/Pleased.gif" style="vertical-align:middle" emoid=":Pleased:" border="0" alt="Pleased.gif" /> <br /><br />]]></description>
		<pubDate>Sun, 15 Nov 2009 02:27:17 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28572</guid>
	</item>
	<item>
		<title><![CDATA[[resolved] Bank Not Working]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28569</link>
		<description><![CDATA[<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br /><br />include&#40;'_______'&#41;;<br /><br /><br />//calculate money needed for next level of bank upgrade &#40;php part of file&#41;<br />$need_money = 500;<br />?&#62;<br /><br />&#60;form&#62;<br />Bank level&#58; &#60;?php echo $username&#91;'bank'&#93;;?&#62; &#60;br&#62;<br />Next level&#58; &#60;input type=&#34;submit&#34; value=&#34;&#60;?php echo number_format&#40;$need_money&#41;;?&#62; money&#34; name=&#34;upgradebank&#34;&#62;<br />&#60;/form&#62;<br /><br />&#60;?php<br /><br />//now we create another php part of this file<br />if &#40;$_POST&#91;'upgradebank'&#93;&#41; {<br /><br />//we check if user has enough money to upgrade bank<br />if &#40;$username&#91;'money'&#93; != $need_money&#41; {<br /><br />//we use die function to stop script execution and to show message what is wrong<br />die&#40;&#34;You don't have enough money to upgrade Bank!&#34;&#41;;<br />}<br /><br />//everything is OK, we update our user table<br />mysql_query&#40;&#34;UPDATE &#96;castle wars users&#96; SET money=money-'$need_money', bank=bank+'1' WHERE id='$username&#91;id&#93;'&#34;&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br /><br />}<br /><br />?&#62;<!--c2--></div><!--ec2--><br /><br />This code is not working when I click the button it does not display the error like it is suppose to please help.]]></description>
		<pubDate>Sat, 14 Nov 2009 18:29:12 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28569</guid>
	</item>
	<item>
		<title>Redirect From An Unsuccessful Login</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28566</link>
		<description><![CDATA[I know you guys know this... but, I have a login box on my main page and in Dremweaver you can specify if it is a successful login then go to page ABC.php and if unsuccessful then go to page DEF.php.. but instead of a page DEF.php, I just want a quick pop up box saying the login credentials were unsuccessful..  I'm having problems wiht this pop up box... Thanks]]></description>
		<pubDate>Sat, 14 Nov 2009 14:49:58 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28566</guid>
	</item>
	<item>
		<title>Problem With If Stmt From A Select?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28565</link>
		<description><![CDATA[Hello <br /><br />I am totally new to PHP, but I thought the following code would work for my form. It is executing the code to send the email even though I thought it was only to process if the reason is a "transfer". Could someone please help me? My site is www.dcyoungmarines.com and here's the PHP code I'm executing.<br /><br />Thank you! <br />Chris<br /><br />Here's my select statement in the form:<br /><br />						&lt;td&gt;&lt;select name="reason"&gt;<br />						&lt;option&gt;Recruit Interest List&lt;/option&gt;<br />						&lt;option&gt;Young Marine Transfer&lt;/option&gt;<br />						&lt;option&gt;Volunteer Interest&lt;/option&gt;<br />						&lt;option&gt;Contact Me&lt;/option&gt;<br />						&lt;/select&gt;&lt;/td&gt;<br /><br /><br />Here's the PHP code: <br /><br />&lt;?php<br />	<br />	// Grab the form vars<br />	$childname = (isset($_POST['childname'])) ? $_POST['childname'] : '' ;<br />	$age = (isset($_POST['age'])) ? $_POST['age'] : '' ;<br />	$###### = (isset($_POST['######'])) ? $_POST['######'] : '' ;<br />	$parentname = (isset($_POST['parentname'])) ? $_POST['parentname'] : '' ;<br />	$email = (isset($_POST['email'])) ? $_POST['email'] : '' ;<br />	$hphone = (isset($_POST['hphone'])) ? $_POST['hphone'] : '' ;<br />	$cphone = (isset($_POST['cphone'])) ? $_POST['cphone'] : '' ;<br />	$reason = (isset($_POST['reason'])) ? $_POST['reason'] : '' ;<br />	$comments = (isset($_POST['comments'])) ? $_POST['comments'] : '' ;<br />	<br />	<br />	// send email to dcyoungmarines<br />	mail("dcyoungmarines@q.com","Interest Form Submission",<br />	"Child Name: $childname&#092;n<br />	Age: $age&#092;n<br />	######: $######&#092;n&#092;n<br />	Parent/Guardian Name(s): $parentname&#092;n<br />	Email Address: $email&#092;n<br />	Home Phone: $hphone&#092;n<br />	Cell Phone: $cphone&#092;n<br />	Interest Reason: $reason&#092;n&#092;n<br />	Comments:&#092;n<br />	$comments");<br /><br /><br />// send a transfer request to user if requested<br />	if ($reason = "Young Marine Transfer") {<br />		$to = "$parentname&lt;$email&gt;";<br />		$subject = "Young Marine Transfer Request";<br /><br />		$msg = "Dear " . $parentname . "&#092;n&#092;n" .<br />		"You have requested information regarding your Young Marine's possible " .<br />		"transfer to the Douglas County Young Marines. On our forms page you will find " . <br />		"a Young Marine Transfer Request form. Please complete the form and email it to us " .<br />		"at dcyoungmarines.com. We will contact you as well as the Young Marine's current " .<br />		"commanding officer in order to insure that the Young Marine is in good standing with ".<br />		"his unit.&#092;n&#092;n" .<br />		<br />		"We appreciate you interest in the our unit and we will be contacting you as soon as " .<br />		"possible.&#092;n&#092;n" .<br />		<br />		"Chris Proctor&#092;n" .<br />		"Commanding Officer";<br />		<br />		// send email to parents of young marine<br />		if( mail($to,$subject, $msg)) {<br />		  	echo "&lt;p&gt;The transfer request has been sent. You will soon be receiving an<br />		  	email with transfer request instructions. Please follow the instructions to<br />		  	help us expedite the transfer. Thank you.&lt;/p&gt;";<br />	  	}<br />	 	else{<br />	  		die( "An error occurred while attempting to send the transfer request.");<br />	  	}<br />	}<br />?&gt;]]></description>
		<pubDate>Sat, 14 Nov 2009 14:36:13 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28565</guid>
	</item>
	<item>
		<title>Post Variable</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28559</link>
		<description><![CDATA[Hello,<br /><br />I created a delete action by using PHP. It contents 3 PHP codes.<br /><br />first one is for to get ID for a record and store the ID into the name of getid, the method="POST"<br /><br />second code is to pick up whole record's informtion and display the information on screen to let user to confirm. ex. $chk=$_POST[getid];<br /><br />so far, the two code works fine.<br /><br />the third one perform delete action, I would like to get the value by using $chk=$_POST[getid]; But it seems doesn't work. How can I get the information from first step? Or how should I do?<br /><br />Thanks,]]></description>
		<pubDate>Fri, 13 Nov 2009 14:24:48 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28559</guid>
	</item>
	<item>
		<title>Free Webhost</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28556</link>
		<description><![CDATA[What is your advise (what is the best host?) (free) <br /><br /><br />sorry wrong cat.]]></description>
		<pubDate>Fri, 13 Nov 2009 01:21:05 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28556</guid>
	</item>
	<item>
		<title>Change Time And Amount Of Money</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28553</link>
		<description><![CDATA[How do I make this code so I get 1 dollar every 5 seconds?<br /><br />here is the code.<br /><br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br /><br />session_start&#40;&#41;;<br /><br />$user = $_SESSION&#91;'username'&#93;;<br /><br />//open my database<br />$connect = mysql_connect&#40;'_______', '___', '____'&#41; or die&#40;'Couldn&#092;'t connect!'&#41;;<br />mysql_select_db&#40;'__________'&#41;;<br /><br /><br />$query = mysql_query&#40;&#34;SELECT * FROM &#96;castle wars users&#96; WHERE username = '$user'&#34;&#41;;<br /><br /><br />$username = mysql_fetch_array&#40;$query&#41;;<br /><br /><br />echo 'Logged user has&#58; '.$username&#91;'money'&#93;.' money';<br /><br /><br />//money amount to add for each round<br />$add_money = 1;<br /><br />//time now, and round time in seconds &#40;1h=60*60seconds=3600&#41;<br />$time_now = time&#40;&#41;;<br />$round = 3600;<br /><br />//time of last update+time needed must be smaller then time now to update<br />if &#40;&#40;$username&#91;'lastupdate'&#93;+$round&#41; &#60;= $time_now&#41; {<br /><br />//see how many rounds &#40;hours&#41; were there from last update<br />$nr_rounds = floor&#40;&#40;$time_now-$username&#91;'lastupdate'&#93;&#41;/$round&#41;;<br /><br />//calculate how much money user gained<br />$all_money = $nr_rounds * $add_money;<br /><br />//calculate how many rounds in seconds &#40;how many hours in seconds&#41;<br />$add_time = $nr_rounds * $round;<br /><br />//lets update users table<br />mysql_query&#40;&#34;UPDATE &#96;castle wars users&#96; SET lastupdate=lastupdate+'$add_time', money=money+'$all_money' WHERE id <br />= '$username&#91;id&#93;'&#34;&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br /><br />//here you can refresh page &#40;so you can see progress&#41; or select user again using login<br />}<br /><br /><br />?&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Thu, 12 Nov 2009 18:55:42 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28553</guid>
	</item>
	<item>
		<title>Soap Web Service In Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28551</link>
		<description><![CDATA[so im trying to consume this SOAP web service, and it's returning "stdClass Object ( )". What does that mean?<br /><br />This is my php code<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br /><br />$params-&#62;ID = &#34;27&#34;;<br />$ppl = &#34;http&#58;//dbf065&#58;8080/MapKeywordRecommender?wsdl&#34;;<br />$pplRequest = new SoapClient&#40;$ppl&#41;;<br />$result = $pplRequest-&#62;getRecommendedKeywords&#40;$params&#41;;<br />print_r&#40;$result&#41;;<br /><br />?&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Thu, 12 Nov 2009 15:54:53 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28551</guid>
	</item>
	<item>
		<title>Add Some Features Of A Display Table</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28550</link>
		<description><![CDATA[Hi all,<br /><br />Now, I can use the following code to display the all records in table p2. But I still have a number of things need to be done.<br /><br />1. for each column, I need to add title. the titles' name are difference with fields' name from table p2 (Ex. P_id from p2 can say "patient ID", that one is meaningful for end user). <br /><br />2. and can be sorted by click the title's name.<br /><br />3. the column color should be difference one another (for example: col1:#99cccc; col2:99ffcc;col3:#99cccc; col4:99ffcc....)<br /><br />4. for each record, I need add a check box at left side as selection flag (can be using to delete or export or ... for future).<br /><br />I don't anticipate getting whole solutions at once. But I appreciate if anyone can help me to solve any little piece of my question.<br /><br />Thank you,<br /><br /><br />&lt;html&gt;<br />&lt;head&gt;&lt;title&gt;Browse all records from P2&lt;/title&gt;&lt;/head&gt;<br />&lt;body&gt;<br />&lt;?php<br />$db="mytest";<br />$link = mysql_connect("localhost","root","Openit4me");<br />if (! $link) die("Couldn't connect to MySQL");<br />mysql_select_db($db , $link) or die("Couldn't open $db: ".mysql_error());<br /><br />$result = mysql_query( "SELECT * FROM mytest.p2" ) or die("SELECT Error: ".mysql_error());<br /><br />$num_rows = mysql_num_rows($result);<br /><br />echo "There are $num_rows records.&lt;P&gt;";<br />echo "&lt;table width=800 border=1&gt;&#092;n";<br /><br />$get_field = mysql_fetch_field($result);<br /><br />while ($get_info = mysql_fetch_row($result)){ <br />echo "&lt;tr&gt;&#092;n";<br />foreach ($get_info as $field) <br />echo "&#092;t&lt;td bgcolor='#99cccc'&gt; &lt;font face=arial size=2/&gt;$field&lt;/font&gt;&lt;/td&gt;&#092;n";<br />echo "&lt;/tr&gt;&#092;n";<br />}<br />echo "&lt;/table&gt;&#092;n";<br />mysql_close($link);<br />?&gt;<br /><br />&lt;/body&gt;<br />&lt;/html&gt; <br /><br />]]></description>
		<pubDate>Thu, 12 Nov 2009 15:04:57 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28550</guid>
	</item>
	<item>
		<title>Ajax And Server Handles</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28545</link>
		<description><![CDATA[Hey people as some of you know I am busy with a A* pathfinding script in php. I discovered that A* is the best way for my purpose to calculate a route from point A to point B trough obstacles, but I also discovered that this is asks much of a servers processor especially on large grids. Since I am planning to run a server of my own, I have to make sure that my scripts are efficient to reduce pressure on my server. php is a serverside language and that means that when a user sends a request to calculate a path it happens on the server and thus it requires processing on the server. So here's my question: <br /><br />Would it be better to make a javascript version so that the path will be calculated client-side and after the path array is made send the array back to the server? In this case the path will be calculated on the client-pc witch saves valuable processing speed and page loading time.<br /><br />Am I talking crap right now or is this really a good idea to use javascript for calculating?<br />]]></description>
		<pubDate>Thu, 12 Nov 2009 10:59:58 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28545</guid>
	</item>
	<item>
		<title>Converting Days Into Hours</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28544</link>
		<description><![CDATA[I want to create my own time function rather then use the standard PHP Time function. The reason I want to do this is because I don't want days to be displayed but just hours - so 1 day becomes 24 hours. I've been told that the time is stored in DB using PHP time function and if you want to implement this I will need to write my own time function and then just create a function for 60 minutes = an hour, skip the rest of it so then it wont onvert to days. But I'm not sure how to do this.<br /><br />Thanks]]></description>
		<pubDate>Thu, 12 Nov 2009 10:25:09 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28544</guid>
	</item>
	<item>
		<title>Authentication</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28541</link>
		<description><![CDATA[I have a site that users go to and can leave comments without having to sign in. just type what they want and click submit.  lately there have been spammers who leave like 100 comments a day and i have been having to go into the database and deleting them.  how can i stop this?  ive seen the authentication images that have blurred words and users type in the words, but how do i get images like that? do i make them myself?  is there another way for authentication of users without making them have to create a username and password? <br /><br />DK]]></description>
		<pubDate>Thu, 12 Nov 2009 07:36:00 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28541</guid>
	</item>
	<item>
		<title>Simplexml Paths</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28540</link>
		<description><![CDATA[Hai!<br /><br />Sorry if this is a noob question [I am a noob]. I am new to PHP & XML.<br /><br />I was trying to echo the value of an XML child, but could not get it to work completely.<br /><br /><br />This is a sample of my XML document:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;Stuff&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;Sec&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;Program&#62;abc 123&#60;/Program&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/Sec&#62;<br />&#60;/Stuff&#62;<!--c2--></div><!--ec2--><br /><br />This is a sample of code I tried:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&nbsp;&nbsp;&nbsp;&nbsp;$Section=&#34;Sec&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$Page=&#34;Program&#34;;<br />echo $xml-&#62;$Section-&#62;Program;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Works for some reason.<br /><br />echo $xml-&#62;$Section-&#62;$Page;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// With a 2nd variable, wont work.<!--c2--></div><!--ec2--><br /><br /><br /><br />Does anyone know what I did wrong?<br />Thanks for reading.]]></description>
		<pubDate>Thu, 12 Nov 2009 05:35:33 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28540</guid>
	</item>
	<item>
		<title>Database Login Script</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28539</link>
		<description>Fixed.</description>
		<pubDate>Wed, 11 Nov 2009 23:19:25 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28539</guid>
	</item>
	<item>
		<title>Datetime Class</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28538</link>
		<description><![CDATA[I found this script and don't understand where the argument 'next thursday' came form.  I can't find it in the manual for the DateTime class.  Shouldn't I be able to find it there?  <br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;?php<br /><br />$date = new DateTime('next Thursday');<br />echo $date-&gt;format('l, F jS, Y');<br /><br />?&gt;</div><br /><br />Thanks]]></description>
		<pubDate>Wed, 11 Nov 2009 23:13:24 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28538</guid>
	</item>
	<item>
		<title>Free Php Editor?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28537</link>
		<description><![CDATA[Hello,<br />What is the name do you use for PHP code editor? I would like to find out free editors that re-format the mess PHP code.<br />Any suggestion?<br />Thank you,<br />]]></description>
		<pubDate>Wed, 11 Nov 2009 17:15:53 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28537</guid>
	</item>
	<item>
		<title>Get A Value For Radio Group</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28536</link>
		<description><![CDATA[hello, I have one more question.<br />I would like to use the code to get a value for radio group. It seems having prob. <br />How to change it?<br />thanks,<br /><br />code:<br />How many?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&lt;input type="radio" &lt;?php if ($info['V4'] == "1") {echo "enabled";} ?&gt; value="1" name="v4"&gt; &nbsp; 1&nbsp;&nbsp;<br />&lt;input type="radio" &lt;?php if ($info['V4'] == "2") {echo "enabled";} ?&gt; value="2" name="v4"&gt; &nbsp; 2&nbsp;&nbsp;<br />&lt;input type="radio" &lt;?php if ($info['V4'] == "3") {echo "enabled";} ?&gt; value="3" name="v4"&gt; &nbsp; 3 &lt;/p&gt;<br />]]></description>
		<pubDate>Wed, 11 Nov 2009 15:20:41 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28536</guid>
	</item>
	<item>
		<title>Check Data Type Error</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28534</link>
		<description><![CDATA[hello,<br />I have a numeric field in a MySQL table.<br />I would like to built a PHP code to check the entered value. If the value is not numeric then generate a message for user. I want to use the function to instate of MySQL error message. <br />Is there a way to get this function done?<br />Thank you,<br />]]></description>
		<pubDate>Wed, 11 Nov 2009 13:33:54 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28534</guid>
	</item>
	<item>
		<title>Retrive The Values From Array</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28533</link>
		<description><![CDATA[Hello,<br /><br />I can use the following code to get values into array info. <br />I need to present those values at a html form and to make change later. <br />I don't know how to retrive the values from the array into post variables. <br /><br />Can I get example form you?<br /><br />Thank you,<br /><br />code:<br />//get the value from table p2 for a specific p_id;<br />$query = mysql_query("SELECT * FROM mytest.p2 WHERE p_id=$chk;");<br /><br />// puts the P2 data into the $info array <br />$info = mysql_fetch_array( $query ); <br /><br />// Print out the contents of the entry <br />Print "&lt;b&gt;P_ID:&lt;/b&gt; ".$info['P_ID'] . " &lt;br&gt;"; <br />Print "&lt;b&gt;v1:&lt;/b&gt; ".$info['v1'] . " &lt;br&gt;"; <br />Print "&lt;b&gt;V2:&lt;/b&gt; ".$info['V2'] . " &lt;br&gt;";]]></description>
		<pubDate>Wed, 11 Nov 2009 13:17:46 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28533</guid>
	</item>
	<item>
		<title>Put A Mysql Record Into A Pdf Document</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28531</link>
		<description><![CDATA[Is there some way, and if so, how, that I can put data from a MySQL record into a PDF document, then email it as an attachment?<br /><br />I need to send the data from a somewhat large (45 fields) MySQL record to another location via email.  The record contains a job applicants bio information and the responses to a lengthy questionnaire.  To send the data in the body of an email would require a lot of php code to make it look anything like a meaningful document, so I'd like to be able to programmagically generate a PDF document and send it as an email attachment.]]></description>
		<pubDate>Wed, 11 Nov 2009 11:06:00 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28531</guid>
	</item>
	<item>
		<title><![CDATA[Calling Files Using Require_once('http://site.com/includes/header.php');]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28530</link>
		<description><![CDATA[Using require_once('http://site.com/includes/header.php'); I get an error:<br /><br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec--><b>Warning</b>:  require_once() [<a href="http://www.nacciimpianti.it/function.require-once" target="_blank">function.require-once</a>]: URL file-access is disabled in the server configuration<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Then, this mean that allow_url_include in disabled, right? Ok, let's say I can't enable this one from my PHP.ini. What can I do to solve this problem?<!--fonto:verdana--><span style="font-family:verdana"><!--/fonto--><!--sizeo:2--><span style="font-size:10pt;line-height:100%"><!--/sizeo--><!--coloro:#000000--><span style="color:#000000"><!--/coloro--><b><br /></b><!--colorc--></span><!--/colorc--><!--sizec--></span><!--/sizec--><!--fontc--></span><!--/fontc--><br /><br />Note: I will have to inlcude files only from the same website, not from another external website.]]></description>
		<pubDate>Wed, 11 Nov 2009 09:32:03 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28530</guid>
	</item>
	<item>
		<title>Calender Just Like W3schools Forum Calender</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28528</link>
		<description><![CDATA[Hello all.<br /><br />Can any one help me for making a calender just like W3Scools Forum's Calender.<br />I want to add events, Reminder and birthday Dates in it.<br /><br />Please Please Help me.<br /><br />Help will be appreciated.<br />Thanks.]]></description>
		<pubDate>Wed, 11 Nov 2009 07:05:10 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28528</guid>
	</item>
	<item>
		<title>Php Calendar</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28527</link>
		<description><![CDATA[Hi all!<br />I have something in mind and I wanted to know if it is possible with php.<br />I've recently learned how to create a calendar, now what I have in mind is make a calendar that I choose the date.<br />I mean, I click on a day of the month and it echoes the date I've clicked.<br />Is it possible to do this with php?<br /><br />Best regards.]]></description>
		<pubDate>Wed, 11 Nov 2009 06:29:51 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28527</guid>
	</item>
	<item>
		<title>Which One Is Suit For Good Job?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28522</link>
		<description><![CDATA[I got learned that Microsoft's SQL Sever, MySQL, and MyOracle are the most popular SEVER scripting language applicated widely now!<br /><br />as a beginner, I want to choose one of them for my career in future. <br /><br />besides, whether Microsoft's SQL Sever and MySQL have the similar SQL language?<br /><br />any experts who can guide me?<br /><br />thanks a lot]]></description>
		<pubDate>Tue, 10 Nov 2009 22:27:13 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28522</guid>
	</item>
	<item>
		<title>Register?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28521</link>
		<description><![CDATA[Here is my code:<br /><br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br /><br />echo &#34;&#60;h1&#62;Register&#60;/h1&#62;&#34;;<br /><br />$submit = $_POST&#91;'submit'&#93;;<br /><br />//form data<br />$firstname = strip_tags&#40;$_POST&#91;'firstname'&#93;&#41;;<br />$username = strtolower&#40;strip_tags&#40;$_POST&#91;'username'&#93;&#41;&#41;;<br />$password = strip_tags&#40;$_POST&#91;'password'&#93;&#41;;<br />$repeatpassword = strip_tags&#40;$_POST&#91;'repeatpassword'&#93;&#41;;<br />$date = date&#40;&#34;Y-m-d&#34;&#41;;<br />$emailaddress = strip_tags&#40;$_POST&#91;'emailaddress'&#93;&#41;;<br /><br /><br />if &#40;$submit&#41;<br />{<br /><br />//open my database<br />$connect = mysql_connect&#40;'_____', '_____', '_____'&#41; or die&#40;'Couldn&#092;'t connect!'&#41;;<br />mysql_select_db&#40;'______'&#41;;<br /><br />$namecheck = mysql_query&#40;&#34;SELECT username FROM users WHERE username='$username'&#34;&#41;;<br />$count = mysql_num_rows&#40;$namecheck&#41;;<br /><br />if &#40;$count!=0&#41;<br />{<br />echo &#34;Username already taken.&#34;;<br />}<br />else<br /><br /><br />//check for existence<br />if &#40;$firstname&&$username&&$password&&$repeatpassword&#41;<br />{<br /><br />if &#40;$password==$repeatpassword&#41;<br />{<br /><br />//check username and first name length<br />if &#40;strlen&#40;$username&#41;&#62;25||strlen&#40;$firstname&#41;&#62;25&#41;<br /><br />{<br />echo &#34;Max characters for first name and username is 25.&#34;;<br />}<br />else<br />{<br />//check password length<br />if &#40;strlen&#40;$password&#41;&#62;25||strlen&#40;$password&#41;&#60;6&#41;<br />{<br />echo &#34;Password must be within 6-25 characters&#34;;<br />}<br />else<br />{<br />//register the user<br /><br />//encrypt passwords<br />$password = md5&#40;$password&#41;;<br />$repeatpassword = md5&#40;$repeatpassword&#41;;<br /><br />//generate random for activation process<br />$random = rand&#40;&#34;12345678,8765432&#34;&#41;;<br /><br /><br />$queryreg = mysql_query&#40;&#34;<br /><br />INSERT INTO users VALUES &#40;'','$firstname','$username','$password','$emailaddress','$date','$random','0'&#41;<br /><br />&#34;&#41;;<br /><br />$lastid = mysql_insert_id&#40;&#41;;<br /><br />//send activation email<br /><br />$to = $emailaddress;<br />$subject = &#34;Activate your account&#34;;<br />$headers = &#34;From&#58; kirbyfrogfan@gmail.com&#34;;<br /><br />$body = &#34;Hello $firstname.&#092;n&#092;n<br /><br />Thank you for registering on url.com.<br /><br />In order to log in and play, please click on the link below to activate your account.<br /><br />http&#58;//kirbyweb.byethost5.com/activated.php?id=$id&code=$random&#092;n&#092;n<br /><br />Thank you.<br /><br />&#34;;<br /><br />//function to send email<br /><br />mail&#40;$to, $subject, $body, $headers&#41;;<br /><br />die&#40;&#34;You have been registered! Please check your email to activate your account. &#60;a href='index.php'&#62;Return to home&#60;/a&#62;&#34;&#41;;<br /><br />}<br />}<br /><br /><br />}<br />else<br />echo &#34;Your passwords do not match.&#34;;<br /><br /><br />}<br />else echo &#34;Please fill in all fields.&#34;;<br /><br />}<br /><br />?&#62;<br /><br /><br />&#60;html&#62;<br />&#60;p&#62;<br /><br />&#60;form action='register.php' method='POST'&#62;<br /><br />&#60;table&#62;<br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Your first name&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='text' name='firstname' value='&#60;?php if &#40;&#40;strlen&#40;$firstname&#41;&#60;6&#41;||&#40;strlen&#40;$firstname&#41;&#62;25&#41;&#41;{echo &#34;&#34;;}else {echo $firstname;}?&#62;'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Choose a username&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='text' name='username' value='&#60;?php if &#40;&#40;strlen&#40;$username&#41;&#60;6&#41;||&#40;strlen&#40;$username&#41;&#62;25&#41;&#41;{echo &#34;&#34;;}else {echo $username;}?&#62;'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Choose a password&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='password' name='password'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Repeat password&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='password' name='repeatpassword'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Email address&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='text' name='emailaddress'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br />&#60;/table&#62;<br /><br />&#60;p&#62;<br />&#60;input type='submit' name='submit' value='register'&#62;<br /><br />&#60;/form&#62;<br /><br />&#60;/html&#62;<!--c2--></div><!--ec2--><br /><br />It keeps saying could't connect does anyone know why?]]></description>
		<pubDate>Tue, 10 Nov 2009 17:11:09 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28521</guid>
	</item>
	<item>
		<title>Coverting Base64 To An Image</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28519</link>
		<description>I am looking for a way to take a base64 string that I get from an XML document and covert it to an image. I am trying to integrate UPS Online Tools to generate a Return label from our website. Any help would be appreciated. Thank you.</description>
		<pubDate>Tue, 10 Nov 2009 16:10:10 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28519</guid>
	</item>
	<item>
		<title>Downloading In Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28517</link>
		<description>How do I force it so that when a PHP page is viewed it pops up with a download box for a .HTML file download? (instead of displaying the HTML file)</description>
		<pubDate>Tue, 10 Nov 2009 14:13:18 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28517</guid>
	</item>
	<item>
		<title>Make Dynamic Calender</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28514</link>
		<description><![CDATA[Can any one help me please?<br /><br />I want to create a calender in whick i store the birthday date and at that date when i open the site a pop up window apear and tell me Happy Birth Day to you. <br /><br />Its very important task for me.<br /><br />Help me, help me plz<br /> Thanks in advance.]]></description>
		<pubDate>Tue, 10 Nov 2009 05:18:10 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28514</guid>
	</item>
	<item>
		<title>Imagecreate()</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28511</link>
		<description><![CDATA[I have a picture generator that adds text but I want my text to be styled like the one below, how do i do this?<br /><br /><img src="http://img198.imageshack.us/img198/7536/83559779.png" border="0" class="linked-image" />]]></description>
		<pubDate>Tue, 10 Nov 2009 01:17:36 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28511</guid>
	</item>
	<item>
		<title>How To Add Weapon</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28510</link>
		<description><![CDATA[In this header I am going to show you, how do I make it so I can equip a weapon or item.<br /><br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br /><br />class headers {<br />function startheaders&#40;&#41; {<br />global $ir, $set;<br />echo &#60;&#60;&#60;EOF<br />&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;<br />&#60;html xmlns=&#34;http&#58;//www.w3.org/1999/xhtml&#34;&#62;<br />&#60;head&#62;<br />&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=iso-8859-1&#34; /&#62;<br />&#60;title&#62;{$set&#91;'game_name'&#93;}&#60;/title&#62;<br />&#60;style type=&#34;text/css&#34;&#62;<br />&lt!--<br />body {<br />background-color&#58; #000000;<br />background-image&#58;url&#40;&#41;;<br />margin-top&#58; 0px;<br />margin-bottom&#58; 0px;<br />font-family&#58;Palatino Linotype;font-size&#58;12px;color&#58; white;<br />&nbsp;&nbsp; scrollbar-base-color&#58; white;<br />&nbsp;&nbsp; scrollbar-arrow-color&#58; black;<br />&nbsp;&nbsp; scrollbar-DarkShadow-Color&#58; black;<br />}<br />a&#58;visited,a&#58;active,a&#58;link { color&#58;#F5D04C&#59;text-decoration&#58; none; }<br />a&#58;hover { color&#58; silver;text-decoration&#58; overline underline;background&#58; none; }<br />table,tr,td { font-family&#58;Palatino Linotype;font-size&#58; 12px; }<br />.button<br />{<br />font-family&#58;Palatino Linotype;<br />font-size&#58;16;<br />color&#58;#000000;<br />background-color&#58; black;<br />}<br />input,textarea,dropdown{<br />font-family&#58;Palatino Linotype;<br />font-size&#58;12;<br />color&#58;#000000;<br />background-color&#58; white;<br />}<br />..submit{<br />font-family&#58;Palatino Linotype;<br />font-size&#58;12;<br />color&#58;#000000;<br />background-color&#58; white;<br />}<br />img { border&#58;none; }<br />textarea { font-family&#58;Palatino Linotype;font-size&#58;12px;color&#58; black; }<br />.table2 {<br />}<br />.lgrad {<br />background-color&#58;#000000<br />background-repeat&#58;repeat-y;<br />width&#58;19px;<br />}<br />.linegrad {<br />background-color&#58;#000000<br />background-repeat&#58;repeat-y;<br />background-align&#58; center;<br />width&#58;2px;<br />}<br />.rgrad {<br />background-color&#58;#000000<br />background-repeat&#58;repeat-y;<br />width&#58;19px;<br />}<br />.dgrad {<br />background-color&#58;#000000<br />background-repeat&#58;repeat-x;<br />height&#58;38px;<br />}<br />.dgradl {<br />background-color&#58;#000000<br />background-repeat&#58;no-repeat;<br />height&#58;38px;<br />width&#58;38px;<br />}<br />.dgradr {<br />background-color&#58;#000000<br />background-repeat&#58;no-repeat;<br />height&#58;38px;<br />width&#58;38px;<br />}<br />.center {<br />width&#58;932px;<br />// background-color&#58;#000000;<br />background-color&#58;#000000;<br />vertical-align&#58;top;<br />text-align&#58;center;<br />}<br />.table {<br />background-color&#58;#000000;<br />}<br />.table3 {<br />background-color&#58;#000000;<br />}<br />.table td {<br />background-color&#58;#000000;<br />height&#58;22px;<br />}<br />.table3 td {<br />background-color&#58;#000000;<br />}<br />td .alt {<br />background-color&#58;#000000;<br />height&#58;22px;<br />}<br />td .h {<br />background-image&#58;url&#40;&#41;;<br />background-repeat&#58;repeat-x;<br />font-weight&#58; bold;<br />background-color&#58; #000000;<br />}<br />.table th {<br />background-image&#58;url&#40;&#41;;<br />background-repeat&#58;repeat-x;<br />font-weight&#58; bold;<br />background-color&#58; #000000;<br />}<br />--&gt;<br />&#60;/style&#62;&#60;/head&#62;<br />&#60;body&#62;<br />&#60;center&#62;<br />&#60;table width=&#34;970&#34; border=&#34;0&#34; cellpadding=&#34;0&#34; cellspacing=&#34;0&#34; class=&#34;table2&#34;&#62;<br />&#60;tr&#62;<br />&#60;td class=&#34;lgrad&#34;&#62;&#60;/td&#62;<br />&#60;td class=&#34;center&#34;&#62;<br />EOF;<br />}<br />function userdata&#40;$ir,$lv,$fm,$cm,$dosessh=1&#41;<br />{<br />global $db,$c,$userid, $set;<br />$IP = &#40;$_SERVER&#91;'HTTP_X_FORWARDED_FOR'&#93;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;?&nbsp;&nbsp;$_SERVER&#91;'HTTP_X_FORWARDED_FOR'&#93;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#58;&nbsp;&nbsp;$_SERVER&#91;'REMOTE_ADDR'&#93;;<br />$db-&#62;query&#40;&#34;UPDATE users SET laston=unix_timestamp&#40;&#41;,lastip='$IP' WHERE userid=$userid&#34;&#41;;<br />if&#40;!$ir&#91;'email'&#93;&#41;<br />{<br />global $domain;<br />die &#40;&#34;&#60;body&#62;Your account may be broken. Please mail help@{$domain} stating your username and player ID.&#34;&#41;;<br />}<br />if&#40;$dosessh && &#40;$_SESSION&#91;'attacking'&#93; || $ir&#91;'attacking'&#93;&#41;&#41;<br />{<br />print &#34;You lost all your EXP for running from the fight.&#34;;<br />$db-&#62;query&#40;&#34;UPDATE users SET exp=0,attacking=0 WHERE userid=$userid&#34;&#41;;<br />$_SESSION&#91;'attacking'&#93;=0;<br />}<br />$enperc=&#40;int&#41; &#40;$ir&#91;'energy'&#93;/$ir&#91;'maxenergy'&#93;*100&#41;;<br />$wiperc=&#40;int&#41; &#40;$ir&#91;'will'&#93;/$ir&#91;'maxwill'&#93;*100&#41;;<br />$experc=&#40;int&#41; &#40; $ir&#91;'exp'&#93;/$ir&#91;'exp_needed'&#93;*100&#41;;<br />$brperc=&#40;int&#41; &#40;$ir&#91;'brave'&#93;/$ir&#91;'maxbrave'&#93;*100&#41;;<br />$hpperc=&#40;int&#41; &#40;$ir&#91;'hp'&#93;/$ir&#91;'maxhp'&#93;*100&#41;;<br />$enopp=100-$enperc;<br />$wiopp=100-$wiperc;<br />$exopp=100-$experc;<br />$bropp=100-$brperc;<br />$hpopp=100-$hpperc;<br />$d=&#34;&#34;;<br />$u=$ir&#91;'username'&#93;;<br />if&#40;$ir&#91;'donatordays'&#93;&#41; { $u = &#34;&#60;font color=red&#62;{$ir&#91;'username'&#93;}&#60;/font&#62;&#34;;$d=&#34;&#60;img src='donator.gif' alt='Donator&#58; {$ir&#91;'donatordays'&#93;} Days Left' title='Donator&#58; {$ir&#91;'donatordays'&#93;} Days Left' /&#62;&#34;; }<br /><br /> $gn=&#34;&#34;;<br />global $staffpage;<br /><br />$bgcolor = '#000000';<br /><br />print &#60;&#60;&#60;OUT<br />&#60;img src=&#34;//Add your top banner url here&#34; alt=&#34;Godfather&#34; /&#62;&#60;br /&#62;<br />&#60;size=12&#62;&#60;u&#62;&#60;a href='donator.php'&#62;Donate To Game For Game Benefits&#60;/a&#62;&#60;/u&#62;&#60;/size&#62;&#60;br /&#62;<br />&lt!-- Begin Main Content --&gt;<br />&#60;table width=&#34;100%&#34; border=&#34;0&#34; cellpadding=&#34;0&#34; cellspacing=&#34;0&#34;&#62;<br />&#60;tr&#62;<br />&#60;td width=&#34;20%&#34; bgcolor=&#34;#030303&#34; valign=&#34;top&#34;&#62;<br />&lt!-- Side Panel --&gt;<br /><br />&#60;b&#62;Name&#58;&#60;/b&#62; $gn{$u} &#91;{$ir&#91;'userid'&#93;}&#93; $d&#60;br /&#62;<br />&#60;b&#62;Money&#58;&#60;/b&#62; {$fm}&#60;br /&#62;<br />&#60;b&#62;Level&#58;&#60;/b&#62; {$ir&#91;'level'&#93;}&#60;br /&#62;<br />&#60;b&#62;Crystals&#58;&#60;/b&#62; {$ir&#91;'crystals'&#93;}&#60;br /&#62;<br />&#91;&#60;a href='logout.php'&#62;Emergency&nbsp;&nbsp; Logout&#60;/a&#62;&#93;<br />&#91;&#60;a href='voting.php'&#62;Vote&#60;/a&#62;&#93;<br />&#60;hr /&#62;<br />&#60;b&#62;Energy&#58;&#60;/b&#62; {$enperc}%&#60;br /&#62;<br />&#60;img src=greenbar.png width=$enperc height=10&#62;&#60;img src=redbar.png width=$enopp height=10&#62;&#60;br /&#62;<br />&#60;b&#62;Will&#58;&#60;/b&#62; {$wiperc}%&#60;br /&#62;<br />&#60;img src=bluebar.png width=$wiperc height=10&#62;&#60;img src=redbar.png width=$wiopp height=10&#62;&#60;br /&#62;<br />&#60;b&#62;Brave&#58;&#60;/b&#62; {$ir&#91;'brave'&#93;}/{$ir&#91;'maxbrave'&#93;}&#60;br /&#62;<br />&#60;img src=yellowbar.png width=$brperc height=10&#62;&#60;img src=redbar.png width=$bropp height=10&#62;&#60;br /&#62;<br />&#60;b&#62;EXP&#58;&#60;/b&#62; {$experc}%&#60;br /&#62;<br />&#60;img src=navybar.png width=$experc height=10&#62;&#60;img src=redbar.png width=$exopp height=10&#62;&#60;br /&#62;<br />&#60;b&#62;Health&#58;&#60;/b&#62; {$hpperc}%&#60;br /&#62;<br />&#60;img src=greenbar.png width=$hpperc height=10&#62;&#60;img src=redbar.png width=$hpopp height=10&#62;&#60;br /&#62;&#60;hr /&#62;<br /><br />&lt!-- Links --&gt;<br />OUT;<br /><br />if&#40;$ir&#91;'fedjail'&#93;&#41;<br />{<br />$q=$db-&#62;query&#40;&#34;SELECT * FROM fedjail WHERE fed_userid=$userid&#34;&#41;;<br />$r=$db-&#62;fetch_row&#40;$q&#41;;<br />die&#40;&#34;&#60;b&#62;&#60;font color=red size=+1&#62;You have been put in the {$set&#91;'game_name'&#93;} Federal Jail for {$r&#91;'fed_days'&#93;} day&#40;s&#41;.&#60;br /&#62;<br />Reason&#58; {$r&#91;'fed_reason'&#93;}&#60;/font&#62;&#60;/b&#62;&#60;/body&#62;&#60;/html&#62;&#34;&#41;;<br />}<br />if&#40;file_exists&#40;'ipbans/'.$IP&#41;&#41;<br />{<br />die&#40;&#34;&#60;b&#62;&#60;font color=red size=+1&#62;Your IP has been banned from {$set&#91;'game_name'&#93;}, there is no way around this.&#60;/font&#62;&#60;/b&#62;&#60;/body&#62;&#60;/html&#62;&#34;&#41;;<br />}<br />}<br />function menuarea&#40;&#41;<br />{<br />include &#34;mainmenu.php&#34;;<br />global $ir,$c;<br />$bgcolor = '#000000';<br />print '&#60;/td&#62;&#60;td width=&#34;2&#34; class=&#34;linegrad&#34; bgcolor=&#34;#B03060'.$bgcolor.'&#34;&#62;&nbsp;&#60;/td&#62;&#60;td width=&#34;80%&#34;&nbsp;&nbsp;bgcolor=&#34;#'.$bgcolor.'&#34; valign=&#34;top&#34;&#62;&#60;br /&#62;&#60;center&#62;';<br />if&#40;$ir&#91;'hospital'&#93;&#41;<br />{<br />&nbsp;&nbsp;print &#34;&#60;b&#62;NB&#58;&#60;/b&#62; You are currently in hospital for {$ir&#91;'hospital'&#93;} minutes.&#60;br /&#62;&#34;;<br />}<br />if&#40;$ir&#91;'jail'&#93;&#41;<br />{<br />&nbsp;&nbsp;print &#34;&#60;b&#62;NB&#58;&#60;/b&#62; You are currently in jail for {$ir&#91;'jail'&#93;} minutes.&#60;br /&#62;&#34;;<br />}<br />}<br />function smenuarea&#40;&#41;<br />{<br />include &#34;smenu.php&#34;;<br />global $ir,$c;<br />$bgcolor ='#000000';<br />print '&#60;/td&#62;&#60;td width=&#34;2&#34; class=&#34;linegrad&#34; bgcolor=&#34;#000000'.$bgcolor.'&#34;&#62;&nbsp;&#60;/td&#62;&#60;td width=&#34;80%&#34;&nbsp;&nbsp;bgcolor=&#34;#'.$bgcolor.'&#34; valign=&#34;top&#34;&#62;&#60;center&#62;';<br />}<br />function endpage&#40;&#41;<br />{<br />global $db;<br />print &#60;&#60;&#60;OUT<br />&#60;/center&#62;<br />&#60;/td&#62;<br />&#60;/tr&#62;<br />&#60;/table&#62;&#60;/td&#62;<br />&#60;td class=&#34;rgrad&#34;&#62;&#60;/td&#62;<br />&#60;/tr&#62;<br />&#60;tr&#62;<br />&#60;td colspan=&#34;3&#34;&#62;<br />&#60;table cellpadding=&#34;0&#34; cellspacing=&#34;0&#34; border=&#34;0&#34; width=&#34;100%&#34;&#62;<br />&#60;tr&#62;<br />&#60;td class=&#34;dgradl&#34;&#62;&nbsp;&#60;/td&#62;<br />&#60;td class=&#34;dgrad&#34;&#62;&nbsp;&#60;/td&#62;<br />&#60;td class=&#34;dgradr&#34;&#62;&nbsp;&#60;/td&#62;<br />&#60;/tr&#62;<br />&#60;/table&#62;<br />&#60;/td&#62;<br />&#60;/tr&#62;<br />&#60;/table&#62;<br />{$db-&#62;num_queries} queries&#60;/body&#62;<br />&#60;/html&#62;<br />OUT;<br />}<br />}<br />?&#62;<!--c2--></div><!--ec2--><br /><br /><br /><br />Please help thanks.]]></description>
		<pubDate>Mon, 09 Nov 2009 21:06:44 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28510</guid>
	</item>
	<item>
		<title><![CDATA[What's Difference Between For Ex Name=&#092;"com&#092;" And Name="com"]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28509</link>
		<description><![CDATA[i know my q is stupid but i am abeginner and i read many scripts S.C for learning<br /><br />what's the difference between the value of name in the form name=<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->&#092;"com&#092;" <!--colorc--></span><!--/colorc-->and name=<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->"com"<!--colorc--></span><!--/colorc--><br /><br />i mean &#092;""&#092;            ?<br /><br /><br />othe questions:<br /><br />enctype='multipart/form-data' what's this do ?<br />]]></description>
		<pubDate>Mon, 09 Nov 2009 19:07:04 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28509</guid>
	</item>
	<item>
		<title>Activated Not Working</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28507</link>
		<description><![CDATA[This is only part of the activation I am doing so do not say it is not finished.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br /><br />session_start&#40;&#41;;<br /><br />if &#40;isset&#40;$_POST&#91;'username'&#93;&#41; and isset&#40;$_POST&#91;'password'&#93;&#41;&#41; {<br /><br />&nbsp;&nbsp;$connect = mysql_connect&#40;'_____.byethost5.com', '_____', '_____'&#41; or die&#40;'Couldn&#092;'t connect!'&#41;;<br />&nbsp;&nbsp;mysql_select_db&#40;'__________'&#41; or die&#40;'Couldn&#092;'t find db'&#41;;<br /><br /><br /><br />&nbsp;&nbsp;$username = mysql_real_escape_string&#40;$_POST&#91;'username'&#93;&#41;;<br />&nbsp;&nbsp;$password = mysql_real_escape_string&#40;$_POST&#91;'password'&#93;&#41;;<br />&nbsp;&nbsp;$activated = &#91;activated&#93;;<br /><br />&nbsp;&nbsp;if &#40;$activated=='0'&#41;<br />&nbsp;&nbsp; <br />{<br />&nbsp;&nbsp;&nbsp;&nbsp; die&#40;&#34;Your account is not yet activated. Please check your email.&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp; exit&#40;&#41;;<br />}<br /><br />$password = md5&#40;$password&#41;;<br /><br />&nbsp;&nbsp;$query = mysql_query&#40;&#34;SELECT * FROM users WHERE username = '$username' AND password = '$password'&#34;&#41;;<br /><br />&nbsp;&nbsp;if &#40;mysql_num_rows&#40;$query&#41; == 1&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;echo 'You&#092;'re in! &#60;a href=&#34;member.php&#34;&#62;Click Here&#60;/a&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION&#91;'username'&#93;=$username;<br />&nbsp;&nbsp;} else echo 'Incorrect username/password!';<br />} else die&#40;'User/pass not POSTed!'&#41;;<br /><br />?&#62;<!--c2--></div><!--ec2--><br /><br /><br />Now when I try this it keeps saying you are successfully logged in, but it is suppose to say, your account is not yet activated.<br /><br />Does anyone know why and can anyone help me thanks.]]></description>
		<pubDate>Mon, 09 Nov 2009 15:32:24 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28507</guid>
	</item>
	<item>
		<title>Show Contents Of Array</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28504</link>
		<description><![CDATA[Hi<br /><br />I aplogise for asking such a basic question but I cant find the answer anywhere. I want to print the contents of an array but it is displaying array??? Below is the code I am using:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->$aaa = array&#40;&#34;something&#34;, &#34;something else&#34;&#41;;<br />echo&#40;$aaa&#41;;<!--c2--></div><!--ec2--><br /><br />Can anyone help???]]></description>
		<pubDate>Mon, 09 Nov 2009 14:18:05 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28504</guid>
	</item>
	<item>
		<title>Security Issue</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28505</link>
		<description><![CDATA[Okay, so after a while of not changing anything on my site (code wise) I went to change it the other day and found this at the top of nearly every page for my site. <br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><br />...<br />&lt;?php @register_shutdown_function("__sfd1256198085__");function __sfd1256198085__() { global $__sdv1256198085__; if (!empty($__sdv1256198085__)) return; $__sdv1256198085__=1; echo &lt;&lt;&lt;DOC__DOC<br />&lt!-- [0357296b56fd5c65b7e82ac1abb04107 --&gt;&lt!-- 5808916521 --&gt;&lt;div id="block7" style="display:none"&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1481"&gt;chloroquine usa and canada&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2936"&gt;order chloroquine overnight without prescription&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1044"&gt;anti malarial tablets aralen&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=188"&gt;cheap chloroquine no rx&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3507"&gt;order cialis soft without prescription&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1755"&gt;how to get cialis soft&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=948"&gt;buy cialis soft online&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=936"&gt;cialis soft usa and canada&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1903"&gt;cialis soft tab discount generic&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=443"&gt;cialis soft tab&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3650"&gt;buying cialis soft online without prescription&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=693"&gt;buy cialis soft overnight shipping&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=949"&gt;cialis soft drug generic&lt;/a&gt;&lt;/li&gt; ... &lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2886"&gt;online glucophage order&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3540"&gt;order glipizide sr cash on delivery&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3983"&gt;glucotrol for sale online&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=3584"&gt;where can i buy glucotrol without a prescription&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=2617"&gt;order glipizide sr without prescription&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1886"&gt;purchase glucotrol without prescription&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1447"&gt;order glucotrol overnight without prescription&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://astronomy2009.ie/faq.php?shop_cat=1&tablet=1920"&gt;glucotrol xl without a prescription&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a url="java script:document.getElementById('block7').style.display='block';"&gt;show&lt;/a&gt;&lt;/div&gt;&lt!-- 0357296b56fd5c65b7e82ac1abb04107] --&gt;<br />DOC__DOC;<br />} ?&gt;<br />&lt;?php @register_shutdown_function("__sfd1255552743__");function __sfd1255552743__() { global $__sdv1255552743__; if (!empty($__sdv1255552743__)) return; $__sdv1255552743__=1; echo &lt;&lt;&lt;DOC__DOC<br />&lt!-- [5f450d6036674811393fc8f4819a24fe --&gt;&lt!-- 3472555521 --&gt;&lt;a url="java script:document.getElementById('block86').style.display='block';" title="more"&gt; &lt;/a&gt;<br />&lt!-- 5f450d6036674811393fc8f4819a24fe] --&gt;<br />DOC__DOC;<br />} ?&gt;<br />&lt;?php @register_shutdown_function("__sfd1254818713__");function __sfd1254818713__() { global $__sdv1254818713__; if (!empty($__sdv1254818713__)) return; $__sdv1254818713__=1; echo &lt;&lt;&lt;DOC__DOC<br />&lt!-- [c93f87702ce98115cff818490aecc712 --&gt;&lt!-- 3178184521 --&gt;&lt;div style="overflow:auto; visibility:hidden; height: 1px; "&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://rtbi30h3h34h34.cc/1"&gt;.&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt!-- c93f87702ce98115cff818490aecc712] --&gt;<br />DOC__DOC;<br />} ?&gt;<br />&lt;?php require("/home/ledger6/public_html/Resources/Includes/header.php"); ?&gt;<br />...</div><br /><br />where the only thing that was there originally was my require function for the header.php<br /><br />Not knowing where it came from, I posted this in the html forums and Ingolme replied stating that it was probably an unguarded php form.<br /><br />now, i have a few throughout my site (all email/contact forms) and I was hoping someone could help in how to guard it.<br /><br />I initially got the code for the form in the w3 tutorial and followed it through and also went with the more secure one discussed later on (for spam I believe).<br /><br />I'm fairly new to php and I'm not really sure how to guard it let alone how the code is being exploited.<br /><br />My form code:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><br />&lt;?php<br />function spamcheck($field)<br />{<br />//filter_var() sanitizes the e-mail<br />//address using FILTER_SANITIZE_EMAIL<br />$field=filter_var($field, FILTER_SANITIZE_EMAIL);<br /><br />//filter_var() validates the e-mail<br />//address using FILTER_VALIDATE_EMAIL<br />if(filter_var($field, FILTER_VALIDATE_EMAIL))<br />{<br />return TRUE;<br />}<br />else<br />{<br />return FALSE;<br />}<br />}<br /><br />if (isset($_REQUEST['email']))<br />{//if "email" is filled out, proceed<br /><br />//check if the email address is invalid<br />$mailcheck = spamcheck($_REQUEST['email']);<br />if ($mailcheck==FALSE)<br />{<br />echo "Invalid input";<br />}<br />else<br />{//send email<br />$email = $_REQUEST['email'] ;<br />$subject = $_REQUEST['subject'] ;<br />$message = $_REQUEST['message'] ;<br />mail("an_email@domain.com", "$subject",<br />$message, "From: $email" );<br />echo "Thank you for your submission";<br />}<br />}<br />else<br />{//if "email" is not filled out, display the form<br />echo "&lt;form method='post' action='/Contact/support.php'&gt;<br />Email: &lt;input name='email' type='text' /&gt;&lt;br /&gt;<br />Subject:<br />&lt;select name='subject'&gt;<br />&lt;option value='FAQ Submission'&gt;FAQ Submission&lt;/option&gt;<br />&lt;option value='Recipe Submission'&gt;Recipe Submission&lt;/option&gt;<br />&lt;/select&gt;<br />&lt;br /&gt;<br />Message:&lt;br /&gt;<br />&lt;textarea name='message' rows='15' cols='40'&gt;<br />&lt;/textarea&gt;&lt;br /&gt;<br />&lt;input type='submit' value='Send Message'/&gt;<br />&lt;/form&gt;</div><br /><br />If you come up with anything please let me know.<br /><br />thanks,<br /><br />also, the original post should probably be deleted.<br />]]></description>
		<pubDate>Mon, 09 Nov 2009 14:18:05 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28505</guid>
	</item>
	<item>
		<title>Cannot Perform An Aggregate Function...</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28500</link>
		<description><![CDATA[Hi all,<br /><br />I have a procedure as below;<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->ALTER PROCEDURE &#91;dbo&#93;.&#91;GetActivePeriod&#93;<br />AS<br /> <br />SELECT&nbsp;&nbsp;w.WorkKeeper, SUM &#40;DATEDIFF &#40;ss, a.ProcessDate, MIN&#40;b.ProcessDate&#41; &#41; &#41; AS 'ActivePeriod' <br /><br />FROM Work w, ProcessLog a INNER JOIN ProcessLog b ON &#40;b.ProcessId &#62; a.ProcessId AND b.WorkId=a.WorkId&#41;<br /><br />WHERE CONVERT&#40; varchar&#40;10&#41;, a.ProcessDate, 111&#41; = CONVERT&#40; varchar&#40;10&#41;, GETDATE&#40;&#41;, 111&#41;<br />AND CONVERT&#40; varchar&#40;10&#41;, b.ProcessDate, 111&#41; = CONVERT&#40; varchar&#40;10&#41;, GETDATE&#40;&#41;, 111&#41;<br />AND a.ProcessNum=1<br />AND &#40; b.ProcessNum=2 OR b.ProcessNum=4 OR b.ProcessNum=5 OR b.ProcessNum=6 &#41;<br />AND w.WorkId=a.WorkId<br /><br />GROUP BY w.WorkKeeper<!--c2--></div><!--ec2--><br /><br />And I get this error, "Cannot perform an aggregate function on an expression containing an aggregate or a subquery." When I remove <b>MIN</b>, it sums all the rows that matches the criteria <img src="http://w3schools.invisionzone.com/style_emoticons/default/sorry.gif" style="vertical-align:middle" emoid=":sorry:" border="0" alt="sorry.gif" /> , but I only want the one with min ProcessDate. <br /><br />Could you please help me?<br /><br />Thanks.]]></description>
		<pubDate>Mon, 09 Nov 2009 08:22:00 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28500</guid>
	</item>
	<item>
		<title>Create A Login And Password Page</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28496</link>
		<description>Hi,  I want to insert a section on my website that allows pre-selected customers (with given id/passwds in advance) to enter only by a password and id and then give that user access to secured information such as bureau data and analysis.  First of all, I have no idea where to start and need a stepping stone.  Secondly, do I need a secured https, and I already use MySQL for my current data, but will I need it for this data and how do I incorporate it on a id/password portion of the site.   Thanks in advance..</description>
		<pubDate>Sun, 08 Nov 2009 22:25:45 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28496</guid>
	</item>
	<item>
		<title>Error With Rename() Function</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28492</link>
		<description><![CDATA[Ok, I'm trying to use this script:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if &#40;file_exists&#40;&#34;D&#58;/website/account/leden/&#34; . $name_old&#41;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rename&#40;&#34;D&#58;/website/account/leden/&#34; . $name_old,&#34;D&#58;/website/account/leden/&#34; . $name_new&#41;;<!--c2--></div><!--ec2--><br />To rename a certain directory.<br /><br />The links used are all valid, and I'm running PHP on a computer with admin rights.<br /><br />Still I get this error message:<br /><br />PHP Warning: rename(D:/website/account/leden/oldname,D:/website/account/leden/newname) [function.rename]: Permission denied in ...file<br /><br />What's going wrong here, and how can I fix this.<br /><br />Thanks.Villermen<br /><br /><b>SOLUTION:<br />Some map setting for windows explorer was checked where it should be unchecked.<br />Help for this can be found <a href="http://www.mydigitallife.info/2006/07/19/missing-or-no-security-tab-found-in-windows-xp-professional/" target="_blank">here</a> </b>]]></description>
		<pubDate>Sun, 08 Nov 2009 11:30:13 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28492</guid>
	</item>
	<item>
		<title>Div In An While Loop</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28491</link>
		<description><![CDATA[<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />&#60;td class=&#34;dr&#34; colspan=&#34;10&#34;&#62; &#60;div id=&#34;details&#34;&#62; &#60;/div&#62; &#60;/td&#62;<br />?&#62;<!--c2--></div><!--ec2--><br />This div above from the code below is always shown belows my first line in the table instead of below each line where it belongs to. What is wrong?<br />(the div is filled bij AJAX)<br /><br />When I use tis the part xxxxxxx is below each line as it should.<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />&#60;td class=&#34;dr&#34; colspan=&#34;10&#34;&#62; &#60;div id=&#34;details&#34;&#62; xxxxxxx &#60;/div&#62; &#60;/td&#62;<br />?&#62;<!--c2--></div><!--ec2--><br /><br />Part of code:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />while &#40;$row = mysql_fetch_array&#40;$res&#41;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#40;$row&#91;'actief'&#93; == &#34;ja&#34;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;tr onmouseover=&#34;this.className=&#092;'dr_highlight&#092;'&#34; onmouseout=&#34;this.className=&#092;'dr&#092;'&#34; onclick=&#34;showDetails&#40;'.$row&#91;'id'&#93;.'&#41;&#34; class=&#34;dr&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td&#62;&#60;a href=adres_edit.php?id='.$row&#91;'id'&#93;.' title=&#34;Bewerk item&#34;&#62;&#60;img border=&#34;0&#34; src=&#34;images/icon/edit.png&#34;&#60;/a&#62;&nbsp;&nbsp;&#60;a href=contactpersoon.php?id='.$row&#91;'id'&#93;.' title=&#34;Bekijk contactpersonen&#34;&#62;&#60;img border=&#34;0&#34; src=&#34;images/icon/contacts.png&#34;&#60;/a&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td&#62;'. htmlentities&#40; $row&#91;'klantnaam'&#93; &#41;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#40;$row&#91;'aflever_adres'&#93;==$row&#91;'adres'&#93;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td width=&#34;150&#34;&#62;'.$row&#91;'aflever_adres'&#93;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td width=&#34;150&#34;&#62;'.$row&#91;'aflever_adres'&#93;.' &#60;br /&#62; '.$row&#91;'adres'&#93;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#40;$row&#91;'aflever_postcode'&#93;==$row&#91;'postcode'&#93;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td&#62;'.$row&#91;'aflever_postcode'&#93;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td&#62;'.$row&#91;'aflever_postcode'&#93;.' &#60;br /&#62; '.$row&#91;'postcode'&#93;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#40;$row&#91;'aflever_plaats'&#93;==$row&#91;'plaats'&#93;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td&#62;'. htmlentities&#40; $row&#91;'aflever_plaats'&#93; &#41;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td&#62;'. htmlentities&#40; $row&#91;'aflever_plaats'&#93; &#41;.' &#60;br /&#62; '. htmlentities&#40; $row&#91;'plaats'&#93; &#41;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#40;$row&#91;'aflever_land'&#93;==$row&#91;'land'&#93;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td&#62;'. htmlentities&#40; $row&#91;'aflever_land'&#93; &#41;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td&#62;'. htmlentities&#40; $row&#91;'aflever_land'&#93; &#41;.' &#60;br /&#62; '. htmlentities&#40; $row&#91;'land'&#93; &#41;.'&#60;/td&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#60;td width=&#34;125&#34;&#62;'.$row&#91;'tel'&#93;.'&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width=&#34;125&#34;&#62;'.$row&#91;'fax'&#93;.'&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td&#62;&#60;a href=&#34;mailto&#58;'.$row&#91;'email'&#93;.'&#34; title=&#34;Verstuur e-mail&#34;&#62;'.$row&#91;'email'&#93;.'&#60;/a&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td&#62;&#60;a href=&#34;'.$row&#91;'www'&#93;.'&#34; title=&#34;Bezoek website&#34; target=&#34;_blank&#34;&#62;'.$row&#91;'www'&#93;.'&#60;/a&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td&#62;'.$row&#91;'betalingstermijn'&#93;.'&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/tr&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;tr&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td class=&#34;dr&#34;&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td class=&#34;dr&#34; colspan=&#34;10&#34;&#62; &#60;div id=&#34;details&#34;&#62; &#60;/div&#62; &#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;/tr&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />?&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Sun, 08 Nov 2009 10:16:26 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28491</guid>
	</item>
	<item>
		<title>Checkout Process Design Advice Sought</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28490</link>
		<description><![CDATA[I am creating the checkout process for my site and am having a little bit of difficulty thinking of the best way to handle orders.<br /><br />At the moment, items are added to either a temporary sessionBasket or a permanent userBasket db table and have identifiers in the form of the session_id and/or userid (depending on the user being logged in).  When the user wants to start the checkout process, they have to log in, regardless of whether they already have (so if you leave the comp unattended nobody else can complete your order).  So at the start of the order process, the items a user has in basket are in the table userBasket.  Each item here has the current session_id associated with it, regardless of when it was added.  I had planned on using the session_id as an order number.  But I have lots of concerns.  <br /><br />How best to proceed with an order?  Should I move the items into an unchangeable &#96;orders&#96; table and use the sessionid and userid as identifier, or use the date?  What do I do if a user bails on the purchase?  Any general advice would be wonderful before I commit to silly code.]]></description>
		<pubDate>Sat, 07 Nov 2009 19:24:40 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28490</guid>
	</item>
	<item>
		<title>Coding</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28489</link>
		<description><![CDATA[I want to become a coder and I know html/php/some css<br /><br />I want to do only php and wanted to know if anyone could give me ideas of what I should start with/sell<br /><br /><br />Also if anyone wants to help me and become partners email me kirbyfrogfan@gmail.com Thanks.]]></description>
		<pubDate>Sat, 07 Nov 2009 14:06:58 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28489</guid>
	</item>
	<item>
		<title>Gridlines Not Showing Up On Sql Services Report</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28484</link>
		<description><![CDATA[I created a SQL Services Report using MS Visual Studio from an existing report. The existing report shows the gridlines when I select the 'preview' tab and also when I open the report on the server, however, the newly created report doesn't show the gridlines on the 'preview' tab or when I open it up on the server. <br /><br />I've checked the properties section and everywhere else in the application, but have not found where the option is located so that I can get the gridlines to appear within the report.<br /><br />Anyone having any suggestions or can point me in the right direction is greatly appreciated and welcomed.<br /><br />Thanks!]]></description>
		<pubDate>Fri, 06 Nov 2009 22:53:41 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28484</guid>
	</item>
	<item>
		<title>Singleton Pattern</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28482</link>
		<description><![CDATA[Hi there.<br /><br />I am trying to make a singleton on PHP, but it doesn't work.<br />As far as I know, a singleton is a class that can have only one instance.<br /><br />I am trying to call the class from another file, but it resets all its values. Is that it? I can't call the class from another file?<br /><br />Here's an example of what I mean:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->class SingletonClass<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;protected static $_instance = null;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;protected function __construct&#40;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;static public function getInstance&#40;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#40; self&#58;&#58;$_instance === null &#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self&#58;&#58;$_instance = new self&#40;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;instance&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return self&#58;&#58;$_instance;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<!--c2--></div><!--ec2--><br /><br />index.php<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->include&#40; &#34;classes/SingletonClass.php&#34; &#41;;<br /><br />$singleton = SingletonClass&#58;&#58;getInstance&#40;&#41;;<!--c2--></div><!--ec2--><br /><br />anotherFile.php<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->include&#40; &#34;classes/SingletonClass.php&#34; &#41;;<br /><br />$singleton = SingletonClass&#58;&#58;getInstance&#40;&#41;;<!--c2--></div><!--ec2--><br /><br />Suppose I go to index.php and index.php redirects me to anotherFile. In both cases it echoes "instance". It should echo it just one, right?<br /><br />Anyone can help me?<br /><br />Thanks.]]></description>
		<pubDate>Fri, 06 Nov 2009 21:53:07 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28482</guid>
	</item>
	<item>
		<title>Newbie Going Out Of His Mind</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28481</link>
		<description><![CDATA[I am using a windows pc with xampp and I am trying to import a sql file into a mysql database through the terminal and I have looked through various forums and have came up with nothing this is what I have been using, I have tried log in the terminal and while logged out and it dosen't work , it say syntax error while I am logged in and when I try it when I am logged out it says It can't find the file even through I put in the full path name C:&#092;mysql&#092;data&#092;query_file.sql<br /><br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->mysql -u username -ppassword &lt; query_file.sql<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><br />Hope someone can help]]></description>
		<pubDate>Fri, 06 Nov 2009 21:21:39 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28481</guid>
	</item>
	<item>
		<title>Rank Based On Score?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28480</link>
		<description><![CDATA[Hi, in my table I have a player name and score...<br /><br /><br />Rodrigo - 2700<br />Rick -2200<br />Tammy - 1000<br />Jennifer - 400<br /><br />The scores change constantly.<br /><br />I am just wondering:  say each person has a profile... how would you display their rank?  in Rodrigo's #1  Ricks #2  etc...<br /><br />it sounded like something simple in my mind at first but I started confusing it.<br /><br /><br />right now I think I can make it work by looping through the table and incrementing a variable then breaking the loop once it reaches the right user..?<br /><br /><br />anyway, I was just wondering how you guys would do it.]]></description>
		<pubDate>Fri, 06 Nov 2009 20:21:49 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28480</guid>
	</item>
	<item>
		<title>Connecting With Mysqli</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28479</link>
		<description><![CDATA[This script works with require_once and produces warnings for line 6 when I try to use $mysqli = new... (which I've commented out).  Please help my with this script:<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;?php<br />require_once "connect_to_mysql.php";<br /><br />//$mysqli = new mysqli("localhost","user","pw","db");<br /><br />$result = mysql_query("SELECT * FROM example") <br />or die(mysql_error());  <br />echo "&lt;table border='1'&gt;";<br />echo "&lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Age&lt;/th&gt; &lt;/tr&gt;";<br />while($row = mysql_fetch_array( $result )) {<br />	echo "&lt;tr&gt;&lt;td&gt;"; <br />	echo $row['name'];<br />	echo "&lt;/td&gt;&lt;td&gt;"; <br />	echo $row['age'];<br />	echo "&lt;/td&gt;&lt;/tr&gt;"; <br />} <br />echo "&lt;/table&gt;";<br /><br />//mysqli_close($mysqli);<br /><br />?&gt;             </div><br /><br />Thank-you]]></description>
		<pubDate>Fri, 06 Nov 2009 18:27:20 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28479</guid>
	</item>
	<item>
		<title>Can Not Perform The New Script</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28477</link>
		<description><![CDATA[Hello,<br />bellow are my test PHP codes.<br />the first one is used to get a pull down list from exist mysql table and pass a selected value to a post variable and perfrom the next PHP code. when click go button.  it seems work (not sure, but no error message come out when I run the code).<br />the second code is used to present the values by using the difference method to transfer. <br />The problem is that can not go to the next page and stay at the current page.<br />Where is the wrong?<br />Thanks,<br /><br />code 1:<br />&lt;?php<br /><br /><br />mysql_connect("localhost","root","*****");<br />mysql_select_db("mytest") or die( "Unable to select database/ this is my note");<br /><br />echo "&lt;form action='./update2.php' method='post'&gt;";<br />        echo "Please choose a patient for update: &nbsp";<br /><br />        echo "&lt;select id='num' Onchange='changeLocation(this)' name=getid&gt;";<br /><br />        echo "&lt;option selected &gt;";<br />                $i=0;<br />                $query="SELECT p_id from mytest.p2 order by P_ID;";<br />                $results = mysql_query($query) or die('no such table exist ' . mysql_error());;<br /><br /><br />        while ($row=mysql_fetch_row($results))<br />                {<br />                        if ($i == 0) {<br />                        $i++;<br />                                echo "&lt;option value='p_id=$row[0]'&gt;$row[0] &lt;/option&gt;";<br />                                     }<br />                        else {<br />                                echo "&lt;option value='p_id=$row[0]'&gt;$row[0]&lt;/option&gt;";<br />                                echo "$row[0]";<br />                             }<br />                }<br />        echo "&lt;/select&gt;";<br />        echo "&lt;input type='submit' name='go' value='go'&gt;";<br /><br />echo "&lt;/form&gt;";<br /><br />++$i;<br /><br /><br /><br />?&gt;<br /><br /><br />second one:<br /><br />&lt;?php<br /><br />$p_id = $row[0];<br />$p_id2= $_get($getid);<br />$p_id3= $_post($getid);<br />echo $p_id ;<br />echo $p_id2 ;<br />echo $p_id3 ;<br /><br /><br />?&gt;]]></description>
		<pubDate>Fri, 06 Nov 2009 14:40:03 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28477</guid>
	</item>
	<item>
		<title>Need Help On A Simple Function</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28469</link>
		<description><![CDATA[hey guys, It's been a while since i;ve been working with PHP but now i'm trying to write a simple<br />function for a website. I have included the function.php file into the index page so no problems there.<br />It just wont show if the function is actually working or not.<br />this is my code i hope someone can help me out or send me off in the right direction:<br />&lt;?php<br />function date_switcher($date_switcher)<br />{<br />$switch = date("Y/m");<br />if ($switch==("2009/11"))<br />	{<br />	echo("succes");<br />	include("style_succes.css");<br />	?&gt;<br />	&lt;link rel="stylesheet" href="style_standard.css" type="text/css"&gt;<br />	&lt;?php<br />	}<br />else<br />	{<br />	include("style_standard.css");<br />	}<br />}<br />?&gt;<br />as you see i'm trying to make the function look at the date that's on the computer and based on that<br />to pick a stylesheet.<br />thanks for the help in advance i appreciate it.]]></description>
		<pubDate>Fri, 06 Nov 2009 05:48:54 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28469</guid>
	</item>
	<item>
		<title>Sending Mail  Using Smtp</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28466</link>
		<description><![CDATA[I'm having trouble sending mail using smtp. I search the web and found codes but not sure how to implement it.<br />here is what I want to do<br /><br />I have a godaddy account. My site allows users to sign up and login using their username and password. If the user forgot his/her password, they can type in their email in a form and an email will be sent to the email entered with their password.<br /><br />I'm using a Access database. Primary key is just an integer that increases. Lets say for example my file is users.mdb and the table is tblUsers. Can someone write a code for me to use? Like the whole thing and i copy and paste and change what needs to be changed? I've been working on this one thing for about 2 weeks now. Any help wi=ould be greatly appreciated.]]></description>
		<pubDate>Thu, 05 Nov 2009 17:40:18 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28466</guid>
	</item>
	<item>
		<title>Using Php For Form Behaviors</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28463</link>
		<description><![CDATA[I don't know Javascript and I was wondering if I could use PHP instead to do my idea.  I want to have a FORM with images instead of radio buttons.  Like WANT or SELL and instead of having two radio buttons (want and sell) instead have them be two images like want could be be a guitar and sell could be an amplifier.  After clicking one of the two images, a check mark replaces the image showing that you have selected that radio (image).  And like wise, if you click on the other pic, the original picture comes back and the other is now a check mark.  Any ideas?<br /><br />Thanks in advance - Joe]]></description>
		<pubDate>Thu, 05 Nov 2009 14:31:22 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28463</guid>
	</item>
	<item>
		<title>Pass The Selected Value To A Post Variable</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28461</link>
		<description><![CDATA[Hello,<br /><br />I can use the following PHP code to retrive values as a pull donw list.<br />I tried to pass the selected value to a post variable, like $p_id. But it doesn't work.<br />How to do that?<br />Thank you, <br /><br />echo "Please choose a patient for update: &nbsp";<br /><br />echo "&lt;select id='num' Onchange='changeLocation(this)' &gt;";<br /><br />echo "&lt;option selected&gt;";<br />$i=0;<br />$query="SELECT p_id from mytest.p2 order by P_ID;";<br />$results = mysql_query($query) or die('no such table exist ' . mysql_error());;<br /><br /><br />while ($row=mysql_fetch_row($results))<br />{<br />  if ($i == 0) {<br />      $i++;<br /><br />      echo "&lt;option value='./mytest2/update2.php?p_id=$row[0]'&gt;$row[0] &lt;/option&gt;";<br />  }<br />else {<br />      echo "&lt;option value='./mytest2/update2.php?p_id=$row[0]'&gt;$row[0]&lt;/option&gt;";<br />  echo "$row[0]";<br />  }<br />}<br /><br />echo "&lt;/select&gt;";<br /><br />$row=$p_id;<br />echo $p_id;<br /><br />++$i;]]></description>
		<pubDate>Thu, 05 Nov 2009 12:55:10 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28461</guid>
	</item>
	<item>
		<title>Database Over Counties And Cities?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28459</link>
		<description><![CDATA[Hello!<br /><br />Where can i fetch data from an database over cities, counties and maybee municipalities so i don't have to write my own database for a whole coutry.<br /><br />thanks.]]></description>
		<pubDate>Thu, 05 Nov 2009 06:12:40 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28459</guid>
	</item>
	<item>
		<title>Content Management With Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28456</link>
		<description><![CDATA[Hi, I know how to create a content management, but I want to know how can I make an automatic HTML elements creator. For example when I drop a line, it's automatically insert &lt;p&gt; element to the DB, but I don't see it in the visual editor (like in the forum). How can I do it in PHP? Is there any manual for it?]]></description>
		<pubDate>Wed, 04 Nov 2009 18:15:14 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28456</guid>
	</item>
	<item>
		<title>Create A Pull Down List</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28455</link>
		<description><![CDATA[Hello,<br />I need to create a pull down list from exist mysql table for update or view only.<br />Is there any sample code I can learn?<br />Thanks,]]></description>
		<pubDate>Wed, 04 Nov 2009 17:03:19 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28455</guid>
	</item>
	<item>
		<title>File Uploads</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28454</link>
		<description><![CDATA[Hello. I will describe my problem:<br /><br />I have a form that uploads a file. When the user submit the form, I want to get that uploaded file ($_FILES['file']) and use it as input on the form that will appear on the redirected page.<br /><br />I didn't find a solution for that problem. Could anybody help me?<br /><br />I hope I was clear on my post.<br /><br />Thanks.]]></description>
		<pubDate>Wed, 04 Nov 2009 16:54:13 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28454</guid>
	</item>
	<item>
		<title>Register Script Not Working?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28453</link>
		<description><![CDATA[I watched the php academy videos and I watched the one where you make a register script.<br /><br />Here is the code I made while watching it:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;php<br /><br />echo &#34;&#60;h1&#62;Register&#60;/h1&#62;&#34;;<br /><br />$submit = strip_tags&#40;$_POST&#91;'submit'&#93;&#41;;<br />$firstname = strip_tags&#40;$_POST&#91;'firstname'&#93;&#41;;<br />$username = strip_tags&#40;$_POST&#91;'username'&#93;&#41;;<br />$password = strip_tags&#40;$_POST&#91;'password'&#93;&#41;&#41;;<br />$repeatpassword = strip_tags&#40;$_POST&#91;'repeatpassword'&#93;&#41;&#41;;<br />$date = date&#40;&#34;Y-m-d&#34;&#41;;<br /><br /><br />if &#40;$submit&#41;<br />{<br />if &#40;$firstname&&$username&&$password&&$repeatpassword&#41;<br />{<br /><br />$password = md5&#40;$password&#41;;<br />$repeat = md5&#40;$repeatpassword&#41;;<br /><br />if &#40;$password==$repeatpassword&#41;;<br />{<br /><br />if &#40;strlen&#40;$firstname&#41;&#62;25||strlen&#40;$username&#41;&#62;25&#41;<br />{<br />echo &#34;Max character length for first name or username is 25.&#34;;<br />}<br />else<br />{<br />if &#40;strlen&#40;$password&#41;&#62;25||strlen&#40;password&#41;&#60;6&#41;<br />{<br />echo &#34;Password is only allowed 6-25 characters long.&#34;;<br />}<br />{<br />....<br />}<br /><br />}<br />else<br />echo &#34;Your passwords do not match.&#34;;<br />}<br />else<br />echo &#34;Please fill in all fields.&#34;;<br />}<br />?&#62;<br /><br />&#60;html&#62;<br /><br />&#60;p&#62;<br /><br />&#60;form action='register.php' method='POST'&#62;<br /><br />&#60;table&#62;<br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Your first name&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='text' name='register'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Choose a username&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='text' name='username'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Choose a password&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='password' name='password'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br /><br />&#60;tr&#62;<br /><br />&#60;td&#62;<br /><br />Repeat your password&#58;<br /><br />&#60;/td&#62;<br /><br />&#60;td&#62;<br /><br />&#60;input type='password' name='repeatpassword'&#62;<br /><br />&#60;/td&#62;<br /><br />&#60;/tr&#62;<br /><br />&#60;/table&#62;<br /><br />&#60;p&#62;<br />&#60;input type='submit' name='submit value='register'&#62;<br /><br />&#60;/form&#62;<br /><br />&#60;/html&#62;<!--c2--></div><!--ec2--><br /><br /><br />What is the problem with this code, here is the link to the video thanks.<br /><br /><br /><br /><a href="http://www.youtube.com/user/phpacademy#p/search/0/IUCEEh-ASH8" target="_blank">http://www.youtube.com/user/phpacademy#p/s...h/0/IUCEEh-ASH8</a><br /><br /><br />this is only the 3rd tutorial on this, but this is where I got stuck.]]></description>
		<pubDate>Wed, 04 Nov 2009 14:29:07 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28453</guid>
	</item>
	<item>
		<title>Exist Value Check</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28451</link>
		<description><![CDATA[hello,<br />I wrote a short PHP code. the goal is to check if the ID has been entered and give a message out. When I test the code, I couldn't get the message. where is the problem in the code?<br />Thanks,<br />&lt;?php<br />//check if p_id exist in the table;<br />$chk==$_POST["p_id"];<br />mysql_connect("localhost","root","Openit4me");<br /><br />//select a database;<br />mysql_select_db("mytest") or die( "Unable to select database/ this is kai.yang note");<br /><br />//note: add the database name in front of table name;<br />$query = "select p_id from mytest.p2 where p_id=$chk;";<br /><br />$num = @mysql_num_rows($query);<br /><br />if ($num &gt; 0) {<br /><br />echo 'the patient exist in the database';<br />echo 'please check the patient ID';<br /><br /><br /><br /> }<br />?&gt;]]></description>
		<pubDate>Wed, 04 Nov 2009 13:22:49 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28451</guid>
	</item>
	<item>
		<title>Need Help Getting 2 Text To Display Items To Far Left And Far Right</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28450</link>
		<description><![CDATA[Is there a way of displaying 2 items of text, one to the far left and one to far right of the page without resorting to the cheesy method of using a million non-blank spaces to separate the two items of text? Below is the code currently being used for this simple, yet complicated, approach....(try not to laugh too hard..lol)<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;table width="100%" border="0" cellpadding="2"&gt;<br />    &lt;tr&gt;<br />      &lt;td colspan="2" nowrap="nowrap" bgcolor="#ddecc3" class="fstyle_3"&gt;&lt;div id="list_item2"&gt;&lt;?php echo $title ?&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href="BasicTutorial.htm" target="_blank" class="style6"&gt;&gt;Search Tutorial&lt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;<br />	  &lt;/tr&gt;<br />    &lt;tr&gt;<br />      &lt;td class="fstyle_1"&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href="search.php" class="style1"&gt;Main&lt;/a&gt; &lt;?php echo($string); ?&gt;&lt;/td&gt;<br />    &lt;/tr&gt;<br />  &lt;/table&gt;</div><br /><br />If you have a better and more efficient use of programming techniques to solve this dilemma, I'd greatly appreciate your help.<br /><br />Thanks!]]></description>
		<pubDate>Wed, 04 Nov 2009 11:49:57 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28450</guid>
	</item>
	<item>
		<title>Calculating Route Trough Map</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28449</link>
		<description><![CDATA[Hey people, I am really getting used php and I have made some neat systems on witch visitors replied with great respect. A few weeks ago I decided to take my coding to the next step. I am currently building a game on witch you actually see army's walking on a map from point A to B.<br /><br />My goal is to make this game for everyone. This includes people that are using browsers witch not even support javascript and java applets etc. I came to the conclusion that I was only able to use php with basic css for when it comes to the actual system behind the game. I use javascript/Ajax to insert some dynamics like making the army's walk without a page refresh. (letting ajax refresh the army coordinates)<br /><br />My systems works as follows: <br /><br />-First I made a game-map with a normal table with one column (1000*1000 pixels width)<br />-Php loads div's with coordinates witch repressend the bases (goals)<br />-Second, php loads the army div's witch repressend the current possition of the army's<br />-php calculates the distance between the base (point <img src="http://w3schools.invisionzone.com/style_emoticons/default/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> and the army (point A) by using A2 * B2 = C2:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />function pythagoras&#40;$x,$y,$z=0&#41; <br />{<br />&nbsp;&nbsp;return sqrt&#40;$x*$x + $y*$y + $z*$z&#41;;<br />} <br />?&#62;<!--c2--></div><!--ec2--><br /><br />-php has now the sides of a tri-angle and it knows that one of the sides is 90 degrees so it can calculate the corner in witch the army walks<br />-php checks if Y-distance or X-distance are positive or negative. Based on that it decides wether to use tan, sin or cos.<br />-php now has a distance and (unix) time, so it can calculate the current position of the army. <br />-put al of this in a loop and the army will walk and stop at the given point B. <br /><br />Now I want to take this a little step further. The army's walk and everything will be updated on page refresh. (or with help of AJAX only the army div's)<br />My second goal is letting the army avoid any obstacles. So when I say that coordinate X:Y is an obstacle, php has to calculate a path around it. I can do this easily by letting the army's walk trough checkpoints (fixed paths) but I php to actually calculate the shortest way automaticly.<br /><br />Can anyone give me a hint where to start? to be clear:<br />Point A wants to go to point B, but in between there is a lake. Now point A has to walk along the edge of the lake to get to point B]]></description>
		<pubDate>Wed, 04 Nov 2009 11:01:20 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28449</guid>
	</item>
	<item>
		<title>Php And Asp Voting!</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28448</link>
		<description><![CDATA[<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><b><!--sizeo:5--><span style="font-size:18pt;line-height:100%"><!--/sizeo-->Hello to all the users!!!<br /><br />Here is a PHP and ASP poll and I will be very happy that you all will take part in it!!!<br /><br />Please publish this poll and notify on it to all your friends!!! <!--sizec--></span><!--/sizec--></b><!--colorc--></span><!--/colorc--> <img src="http://w3schools.invisionzone.com/style_emoticons/default/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />  <img src="http://w3schools.invisionzone.com/style_emoticons/default/laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" />  <img src="http://w3schools.invisionzone.com/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />]]></description>
		<pubDate>Wed, 04 Nov 2009 04:20:08 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28448</guid>
	</item>
	<item>
		<title>Highlight After Search</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28446</link>
		<description><![CDATA[Im using this code to search my database:<br /><br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->&lt;?php<br />include'connect.php';<br />mysql_select_db($dbname);<br /><br />$search=$_POST["search"];<br />echo "&lt;div class='searchheader'&gt;&lt;h2 style='margin: auto;'&gt;Search results for '$search'&lt;/h2&gt;&lt;/div&gt;";<br />$result = mysql_query("SELECT * FROM table WHERE title OR description LIKE '%$search%'");<br /><br />while($r=mysql_fetch_array($result))<br />{  <br />   $title=$r["title"];<br />   $description=$r["description"];<br /><br />    echo "&lt;div class='text alternative'&gt;&lt;h2&gt;$title&lt;/h2&gt;" .<br />	 "&lt;p&gt;$description&lt;/p&gt;&lt;/div&gt;";<br /><br />}<br /><br /><br />?&gt;<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />After it finds the results I want the $search to be highlighted, how would I do that?]]></description>
		<pubDate>Tue, 03 Nov 2009 23:51:53 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28446</guid>
	</item>
	<item>
		<title>Https Aspx Swf</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28439</link>
		<description><![CDATA[I have few flash (swf) files that are on a secured web application. Now each time a user visits this page, they get a message saying <b>"This page contains both secure and non secure items"</b>. Is there a way to get rid of this message? Also, is there a way to secure swf files so they don't get downloaded to the user's temp folder?<br /><br />The whole idea is to secure the swf files but at the same time allow a small group of users to view them online. Is this even possible?<br /><br />Thanks in advance.]]></description>
		<pubDate>Tue, 03 Nov 2009 09:17:00 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28439</guid>
	</item>
	<item>
		<title>Suggest Function For This Work...</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28438</link>
		<description><![CDATA[Please function for this work...<br />it inputs and removes all the "&#092;" coming before ' or "<br />for eg...<br />input----(&#092;' string...)<br />should return...('string...)]]></description>
		<pubDate>Tue, 03 Nov 2009 08:34:33 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28438</guid>
	</item>
	<item>
		<title>To Send Email</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28437</link>
		<description><![CDATA[Dear friends <br /><br />I am designing a web page for an company which I have almost finished with but I am facing a problem in one area <br />the company as asked me to design an contact us page in which I should create a user interface where a person can enter his contact details and on submit it should be mailed to companies email address for example info@mycompany.com<br /><br />I am really stuck with it I don't understand how should I do it, I have tried CDOSYS but I am not able to understand its concept or how it function <br /><br />I hoping that if you people could help me with your knowledge <br /><br />kindly post some code or example for me to understand <br /><br />OR some guidelines from where to start will be of great help<br /><br />Thanking you in advance<br />waiting for you reply]]></description>
		<pubDate>Tue, 03 Nov 2009 07:35:26 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28437</guid>
	</item>
	<item>
		<title>Add Variations To Cart</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28436</link>
		<description><![CDATA[I have a simple shopping cart page running so far (adding main items and updating the basket). The code is:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>if (isset($_REQUEST['do']) && ($_REQUEST['do'] == 'add'))<br />{<br />	if (isset($_GET['qty2']))<br />	{<br />	$qty2 = (int) $_GET['qty2'];<br />	}<br />	else<br />	{<br />	$qty2 = 1;<br />	}<br />	if (isset($_GET['fn']))<br />	{<br />	$fn = (int) $_GET['fn'];<br />	}<br />	elseif (isset($_POST['fn']))<br />	{<br />	$fn = (int) $_POST['fn'];<br />	}<br />	else<br />	{<br />	$fn = 0;<br />	}<br />	if (isset($_GET['var']))<br />	{<br />	$var = (int) $_GET['var'];<br />	}<br />	elseif (isset($_POST['var']))<br />	{<br />	$var = (int) $_POST['var'];<br />	}<br />	else<br />	{<br />	$var = 0;<br />	}<br />	if (isset($_GET['age']))<br />	{<br />	$age = (int) $_GET['age'];<br />	}<br />	elseif (isset($_POST['age']))<br />	{<br />	$age = (int) $_POST['age'];<br />	}<br />	else<br />	{<br />	$age = 0;<br />	}<br />	if (isset($_GET['id']))<br />	{<br />	$id = (int) $_GET['id'];<br />		if ($id &gt; 0)<br />		{<br />		$id_query = "SELECT product, price FROM products WHERE product_id = $id";<br />		$id_result = mysqli_query ($dbc, $id_query);<br />			if (mysqli_num_rows($id_result) == 1)<br />			{<br />				if ($fn != 0)<br />				{<br />				$_SESSION['cart'][$id]['fn'] = $fn;<br />				}<br />				if ($var != 0)<br />				{<br />				$_SESSION['cart'][$id]['var'] = $var;<br />				}<br />				if ($age != 0)<br />				{<br />				$_SESSION['cart'][$id]['age'] = $age;<br />				}				<br />			list ($product, $price) = mysqli_fetch_array($id_result, MYSQLI_NUM);<br />				if (isset($_SESSION['cart'][$id]))<br />				{<br />				$_SESSION['cart'][$id]['qty'] += $qty2;<br />				echo "&lt;p&gt;Another copy of the following item has been added to your cart: &lt;strong&gt;$product&lt;/strong&gt;.&lt;/p&gt;&#092;n";<br />				}<br />				else<br />				{<br />				$_SESSION['cart'][$id]['qty'] = $qty2;<br />				echo "&lt;p&gt;The following item has been added to your cart: &lt;strong&gt;$product&lt;/strong&gt;.&lt;/p&gt;&#092;n";<br />				}<br />			}<br />		}<br />	}<br />}<br />elseif (isset($_REQUEST['do']) && ($_REQUEST['do'] == 'update'))<br />{<br />	foreach ($_POST['qty'] as $k =&gt; $v)<br />	{<br />	$pid = (int) $k;<br />	$qty = (int) $v;<br />		if ($qty == 0)<br />		{<br />		unset ($_SESSION['cart'][$pid]);<br />		}<br />		elseif ($qty &gt; 0)<br />		{<br />		$_SESSION['cart'][$pid]['qty'] = $qty;<br />		}<br />	}<br />	foreach ($_POST['fn'] as $u =&gt; $i)<br />	{<br />	$pid = (int) $u;<br />	$fn = (int) $i;<br />	$_SESSION['cart'][$pid]['fn'] = $fn;<br />	}<br />	foreach ($_POST['age'] as $r =&gt; $o)<br />	{<br />	$pid = (int) $r;<br />	$age = (int) $o;<br />	$_SESSION['cart'][$pid]['age'] = $age;<br />	}<br />	echo "&lt;p&gt;The cart has been updated.&lt;/p&gt;&#092;n";<br />}<br />if ($_SESSION['cart'] && !empty($_SESSION['cart']))<br />{<br />$cart_query = "SELECT product_id, product, code, detail, price, discount_id, img1 FROM products WHERE product_id IN (";<br />	foreach($_SESSION['cart'] as $id =&gt; $v)<br />	{<br />	$cart_query .= (int) $id . ',';<br />	}<br />$cart_query = substr ($cart_query, 0, -1) . ") ORDER BY product";<br />$cart_result = mysqli_query ($dbc, $cart_query);<br />	if (mysqli_num_rows($cart_result) &gt; 0)<br />	{<br />	echo "&lt;form action=&#092;"cart.php&#092;" method=&#092;"post&#092;" name=&#092;"cart&#092;" id=&#092;"cart&#092;"&gt;&#092;n";<br />	echo "&lt;table style=&#092;"margin-top:15px;&#092;"&gt;&#092;n";<br />	echo "&lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Qty&lt;/th&gt;&lt;th class=&#092;"right&#092;"&gt;Price&lt;/th&gt;&lt;/tr&gt;&#092;n";<br />	$total = 0;<br />		while ($row = mysqli_fetch_array($cart_result, MYSQLI_ASSOC))<br />		{<br />		$product_name = $row['product'];<br />		$product_code = $row['code'];<br />		$product_detail = $row['detail'];<br />		$price = $row['price'];<br />		$price_unaltered = $row['price'];<br />		if ($row['discount_id'] != '')<br />		{<br />		$discount = $row['discount_id'];<br />		$discount = (int) $discount;<br />		}<br />		else<br />		{<br />		$discount = 0;<br />		}<br />		$img = $row['img1'];<br />		$size = getimagesize("products/basket/{$img}");<br />		$subtotal = $_SESSION['cart'][$row['product_id']]['qty']* $price;<br />		$total += $subtotal;<br />				<br />	// depending on total apply reductions on total<br />	if ($total &gt;= 3000)<br />	{<br />		if ($discount == 2)<br />		{<br />		$price = $price * 0.9;<br />		}<br />		if ($discount == 1)<br />		{<br />		$price = $price * 1;<br />		}<br />		else<br />		{<br />		$price = $price;<br />		}<br />	}<br />	$subtotal2 = $_SESSION['cart'][$row['product_id']]['qty']* $price;<br />	$total2 += $subtotal2;<br />	$grand_total = $total2;<br />	$saving = $total - $total2;<br />	$percent = (100/$total) * $total2;<br />	$percent = 100 - $percent;<br />	$price = number_format($price, 2);	<br />		echo "&lt;tr&gt;";<br />		echo "&lt;td&gt;&lt;img src=&#092;"" . $basketPath . $img . "&#092;" " . $size[3] . " alt=&#092;"" . $product_name . "&#092;" /&gt;&lt;/td&gt;";<br />		echo "&lt;td&gt;" . $product_name . "&lt;br /&gt;Product Code: " . $product_code . "&lt;br /&gt;Size in cm: " . $product_detail . "&lt;br  /&gt;";<br />		$fn_name = $_SESSION['cart'][$row['product_id']]['fn'];<br />		$age_name = $_SESSION['cart'][$row['product_id']]['age'];<br />		echo "&lt;/td&gt;";<br />		echo "&lt;td&gt;&lt;input type=&#092;"text&#092;" style=&#092;"width: 2em&#092;" name=&#092;"qty[{$row['product_id']}]&#092;" value=&#092;"{$_SESSION['cart'][$row['product_id']]['qty']}&#092;" /&gt; &lt;a href='#'&gt;&lt;img src='assets/delete.gif' width='15' height='15' alt='Click to remove item' onclick=&#092;"document.forms['cart'].elements['qty[{$row['product_id']}]'].value='0'; document.forms['cart'].submit()&#092;"&gt;&lt;/a&gt;";<br />		echo "&lt;p style=&#092;"margin-left:0;&#092;"&gt;";<br />		if ($price_unaltered == 0)<br />		{<br />		echo "&lt;span class=&#092;"small&#092;"&gt;POA&lt;/span&gt;";<br />		}<br />		else<br />		{<br />		echo "&lt;span class=&#092;"small&#092;"&gt;Per item: &pound;" . $price_unaltered . "&lt;/span&gt;";<br />		}<br />		echo "&lt;/p&gt;";<br />		echo "&lt;/td&gt;";<br />		if ($subtotal2 == 0)<br />		{<br />		echo "&lt;td class=&#092;"right&#092;"&gt;POA&lt;/td&gt;";<br />		}<br />		else<br />		{<br />		echo "&lt;td class=&#092;"right&#092;"&gt;&pound;" . number_format($subtotal, 2) . "&lt;/td&gt;";<br />		}<br />		echo "&lt;/tr&gt;&#092;n";<br />		}<br />		echo "&lt;tr&gt;&lt;td colspan=&#092;"3&#092;" class=&#092;"right noBorder&#092;"&gt;Sub Total:&lt;/td&gt;&lt;td class=&#092;"right&#092;"&gt;&pound; " . number_format($total, 2) . "&lt;/td&gt;&lt;/tr&gt;&#092;n";<br />		echo "&lt;tr&gt;&lt;td colspan=&#092;"3&#092;" class=&#092;"right noBorder&#092;"&gt;Discount (" . number_format($percent, 2) . "%):&lt;/td&gt;&lt;td class=&#092;"right&#092;"&gt;&pound; " . number_format($saving, 2) . "&lt;/td&gt;&lt;/tr&gt;&#092;n";<br />		echo "&lt;tr&gt;&lt;td colspan=&#092;"3&#092;" class=&#092;"right noBorder&#092;"&gt;&lt;strong&gt;Grand Total (incl. VAT and delivery):&lt;/strong&gt;&lt;/td&gt;&lt;td class=&#092;"right&#092;"&gt;&lt;strong&gt;&pound; " . number_format($grand_total, 2) . "&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&#092;n";<br />		echo "&lt;tr&gt;&lt;td colspan=&#092;"4&#092;" class=&#092;"noBorder&#092;"&gt;&nbsp;&lt;/td&gt;&lt;/tr&gt;&#092;n";<br />		echo "&lt;tr&gt;&lt;td colspan=&#092;"4&#092;" class=&#092;"right noBorder&#092;" style=&#092;"padding-right:0;&#092;"&gt;";<br />		echo "&lt;input type=&#092;"hidden&#092;" name=&#092;"do&#092;" value=&#092;"update&#092;" /&gt;&#092;n";<br />		echo "&lt;input type=&#092;"submit&#092;" value=&#092;"Update Total&#092;" id=&#092;"submitted&#092;" name=&#092;"submitted&#092;" /&gt;";<br />		echo "&lt;/td&gt;&lt;/tr&gt;&#092;n";<br />		echo "&lt;tr&gt;&lt;td colspan=&#092;"4&#092;" class=&#092;"noBorder&#092;"&gt;&nbsp;&lt;/td&gt;&lt;/tr&gt;&#092;n";<br />		echo "&lt;tr&gt;&lt;td colspan=&#092;"4&#092;" class=&#092;"noBorder&#092;"&gt;";<br /><br />		if (isset($_SESSION['back']) && $_SESSION['back'] != '')<br />		{<br />		$backlink = $_SESSION['back'];<br />		}<br />		else<br />		{<br />		$backlink = 'index.php';<br />		}<br />		echo "&lt;a href=&#092;"" . $backlink . "&#092;" title=&#092;"Continue Shopping&#092;"&gt;Continue Shopping&lt;/a&gt; &lt;/td&gt;&lt;/tr&gt;&#092;n";<br />		echo "&lt;/table&gt;&#092;n";<br />		echo "&lt;/form&gt;&#092;n";<br />	}<br />}<br />else<br />{<br />echo "&lt;p&gt;Currently there are no items added to this page.&lt;/p&gt;&#092;n";<br />}</div><br /><br />On product page I had to add now a drop-down called 'var' which always has the main product showing which is stored in products table (in drop down with value of 0 as it is not a product variation as such). Now, some products have variations, which means that they share common characteristics, but differ for example in price. The fields which are different are stored in variations table and the association with main product is done via parent column that references product_id of main product (from products table). They will also show after main product in drop down. I have added now the relevant fields to gather varitation id in cart session, but am lost as in how to display the correct data when a variation is added. The relevant query is:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$cart_query = "SELECT product_id, product, code, detail, price, discount_id, img1 FROM products WHERE product_id IN (";<br />	foreach($_SESSION['cart'] as $id =&gt; $v)<br />	{<br />	$cart_query .= (int) $id . ',';<br />	}<br />$cart_query = substr ($cart_query, 0, -1) . ") ORDER BY product";<br />$cart_result = mysqli_query ($dbc, $cart_query);</div><br /><br />How can I display the data from variation table if relevant product is added with value different to 0 from variation drop down and otherwise display data from products table? Also, how can I easily email the data stored in session to a dedicated email address?<br /><br />Any help, hints, kicks appreciated...<br /><br />Son]]></description>
		<pubDate>Tue, 03 Nov 2009 07:22:48 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28436</guid>
	</item>
	<item>
		<title>If/elseif Help Needed Please</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28431</link>
		<description><![CDATA[in the example below, text searches are not being filtered through each if/else statement, so that, for example, when "good dog" is searched against db, i'm getting echoes from <b>both</b> the echo_light (echo) and echo_dark (echod) tables, when all that should be matching and echoed would be the echo_light table entry (since 'good' is in user string in this example). if i searched "bad dog" all i'd want to echo would be matched row from the echo_dark(echod) table, etc. <br /><br />any help greatly appreciated. justsomeguy wrote/helped me with this last winter and i'm just getting back to it. Thanks!<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if &#40;in_array&#40;strtolower&#40;$word&#41;, array&#40;'you'&#41;&#41;&#41; {<br />echo &#34;You seem to be addressing me, {$post_name}&#60;/br&#62;&#60;/br&#62;&#34;;<br />}<br />elseif &#40;in_array&#40;strtolower&#40;$word&#41;, array&#40;'great', 'good', 'fun', 'wonderful', 'beautiful', 'love', 'happy', 'exciting', 'joy',&#41;&#41;&#41; {<br />echo &#34;You're exuding positive energy. &#60;/br&#62;&#60;/br&#62;&#34;;<br />}<br />$sql = ' ';<br />$sql = &#34;SELECT a.id, a.subject, b.echo FROM terms AS a, echo_light AS b WHERE a.id=b.id AND &#40;a.subject LIKE '%$word%' OR a.subject LIKE '%$word%'&#41;&#34;;<br />$result = mysql_query&#40;$sql&#41; or die &#40;mysql_error &#40;&#41;&#41;;<br />$n=0;<br />while&#40;$row = mysql_fetch_assoc&#40;$result&#41;&#41; <br />{<br />$n++;<br />echo nl2br&#40;stripslashes&#40;$row&#91;'echo'&#93;&#41;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;br&#62;&#34;;<br />}<br />if &#40;in_array&#40;strtolower&#40;$word&#41;, array&#40;'desperate','anxious', 'panic', 'distressed', 'negative', 'stress', 'stressed', 'dark', 'sad', 'depressed', 'hurt', 'bleak', 'gloom', 'bad', 'lonely', 'alone', 'alien',&#41;&#41;&#41; {<br />echo &#34;Your tone seems grim or distressing, {$post_name}.&#34;;<br />}<br />$sqld = ' ';<br />$sqld = &#34;SELECT a.id, a.subject, b.echod FROM terms AS a, echo_dark AS b WHERE a.id=b.id AND &#40;a.subject LIKE '%$word%' OR a.subject LIKE '%$word%'&#41;&#34;;<br />$result = mysql_query&#40;$sqld&#41; or die &#40;mysql_error &#40;&#41;&#41;;<br />$n=0;<br />while&#40;$row = mysql_fetch_assoc&#40;$result&#41;&#41; <br />{<br />$n++;<br />echo nl2br&#40;stripslashes&#40;$row&#91;'echod'&#93;&#41;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;br&#62;&#34;;<br />}<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Mon, 02 Nov 2009 22:27:42 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28431</guid>
	</item>
	<item>
		<title>Selecting Records Within A Date Range</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28429</link>
		<description><![CDATA[This is using mysql.<br /><br />A table contains records with a start date and an end date (used to indicate when a service was provided).  Each record has a start date but may have a null end date if the service is ongoing.  The dates are stored in the standard 2009-06-20 format.<br /><br />What I'm trying to do is produce a query to pick out records that were provided with a service between two dates eg 2009-05-01 to 2009-05-31, but it appears to be more complicated than I thought.<br /><br />The fields are called &#96;start&#96; and &#96;end&#96;, the dates for the query are called $rsd (report start date) and $red (report end date).<br /><br />Suppose a record has start and end dates of 2009-06-20 to 2009-08-13.  Running a report for 2009-05-01 to 2009-05-31 should not pick out this record.  Using dates 2009-06-01 to 2009-06-30 WILL pick it out, as will 2009-08-01 to 2009-08-31 etc.  Running a report for 2009-09-01 to 2009-09-30 should not pick it out.<br /><br />It gets more complicated when the report dates fall completely within the record's dates eg running a report for 2009-07-08 to 2009-07-14, and also if the record's end date is null.<br /><br />I've been trying to write a select query using where... and/or... for every conceivable scenario but I'm sure there must be an easier way - perhaps by excluding records that don't fall within the dates, rather than trying to select records that do match?<br /><br />Can anyone help me?  Perhaps someone has already written such a query?]]></description>
		<pubDate>Mon, 02 Nov 2009 20:12:38 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28429</guid>
	</item>
	<item>
		<title>Keep Null Value If Not Input</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28427</link>
		<description><![CDATA[Hello,<br /><br />I wrote a very simple PHP code to insert record into MySQL database. So far, it works.<br /><br />But I found a bug in the program. when I left a blank at a field and insert the data into DB, the field will automatic bacome 0 (for numeric field) or blank (in chr field). But I realy want to keep it as null. <br /><br />How should I modify my code to do that?<br /><br />Thank you,<br /><br /><br />code:<br />&lt;?php<br />$p_id=$_POST["p_id"];<br />$v1=$_POST["v1"];<br />$v2=$_POST["v2"];<br />$v3=$_POST["v3"];<br />$v4=$_POST["v4"];<br /><br />mysql_connect("localhost","root","Openit4me");<br /><br />mysql_select_db("mytest") or die( "Unable to select database/ this is kai.yang note");<br /><br />//echo $$v1;<br />//echo $$v2;<br />//echo $$v3;<br />//echo $$v4;<br /><br /><br />$query = "INSERT INTO mytest.p2 (p_id, v1, V2, V3, V4) VALUES ('$p_id','$v1','$v2','$v3',$v4);";<br /><br />//echo "$query";<br /><br /><br />if (!mysql_query($query))<br />  {<br />  die('Error: ' . mysql_error());<br />  }<br /><br />echo '1 record was added';<br /><br /><br /><br />mysql_close();<br /><br /><br />?&gt; <br /><br />&lt;! this part is go back to add home page&gt;<br /><br />&lt;form action="add.htm" method="post"&gt;<br /><br />&lt;p&gt;&lt;input type="submit" value="add more record" name="add more record" /n&gt; &lt;/p&gt;<br /><br />&lt;/form&gt;<br /><br />&lt;BUTTON onclick="window.close();"&gt;Finish input&lt;/BUTTON&gt;]]></description>
		<pubDate>Mon, 02 Nov 2009 18:54:01 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28427</guid>
	</item>
	<item>
		<title>Emailing An Attachment?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28424</link>
		<description><![CDATA[Hello<br /><br />I am completely new to PHP and I am writing a script to email information enter from a HTML form to myself. This script appears to be working, but I was also thinking about adding some script that, based on what the user enters, emails a PDF document to them. I did not see any parameter with the mail() command to include an attachment, so I was wondering if there is another way of handling this?<br /><br />Thank you!<br />Chris]]></description>
		<pubDate>Mon, 02 Nov 2009 14:59:50 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28424</guid>
	</item>
	<item>
		<title><![CDATA[Php Insert Code Doesn't Work]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28423</link>
		<description><![CDATA[Hello,<br />I just learn how to use PHP to insert a record to MySQL.<br />This is my code:<br />&lt;?php<br /><br />mysql_connect("localhost","root","Openit4me");<br /><br />mysql_select_db("mytest") or die( "Unable to select database/ this is my note");<br /><br />$query = "INSERT INTO p2 ( v1, v2, v3, v4 ) VALUES ('$v1','$v2','$v3','$v4');";<br /><br />mysql_query($query);<br /><br />if (!mysql_query($query))<br />  {<br />  die('Error: ' . mysql_error());<br />  }<br />echo "1 record added";<br /><br /><br />mysql_close();<br /><br /><br />?&gt; <br /><br />There are two problems:<br />1. when I submit the data, it insert 2 duplicate records for me. <br />2. the values in $v1 ... $v4 were not entered into database.<br /><br />I would like to know where cause the error form the code.<br />Thanks,<br /><br /><br /><br />]]></description>
		<pubDate>Mon, 02 Nov 2009 14:59:25 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28423</guid>
	</item>
	<item>
		<title><![CDATA[Can't Get My Site To Work In Ssl]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28420</link>
		<description><![CDATA[I'm using Yahoo as my web host, and, following their ssl help instructions, I moved ALL of my files to the ssl folder.  Now, none of the pages that reference my database (MySQL) will work; in fact those pages don't even display anything.  I called Yahoo for help, but they tell me that; 1) their tech support doesn't support ssl and, 2) that ssl is not a very good method for security.  They said that I need to write custom code, but wouldn't give me a clue about what kind of custom code, and where.  Currently, I have a php script that makes the connection to my database, which is included in my login page:<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;?php<br /># FileName="Connection_php_mysql.htm"<br /># Type="MYSQL"<br /># HTTP="true"<br />$hostname_login = "mysql";    // This is the name that Yahoo requires - was working fine before I moved all to ssl folder<br />$database_login = "infoondemand";<br />$username_login = "creacontech";  // This is my domain name and username that I set up in Yahoo<br />$password_login = "**********";<br />$login = mysql_pconnect($hostname_login, $username_login, $password_login) or trigger_error(mysql_error(),E_USER_ERROR);<br /><br />$_SESSION['MM_login'] = $login;<br /><br />?&gt;</div><br /><br />Here's the very first line in my sign-in page:<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;?php require_once("connections/login.php') ?&gt;</div><br /><br />connections is a folder now within ssl, but at this point I don't know if I'm supposed to change something in that path, or change the names in the login script.<br /><br /><br />I'm in a quandry, because I have pages that use a  MySQL database for login security, and to store data collected from forms, so I need my pages/forms to be in a secured site.  Would someone please help me to understand this, and to make it work?]]></description>
		<pubDate>Mon, 02 Nov 2009 11:36:43 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28420</guid>
	</item>
	<item>
		<title>Php Aplication Help.</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28414</link>
		<description><![CDATA[I can't understand why it is doing this to me! <br /><br /><br />Okay I have a xml document named "name.xml":<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?xml version=&#34;1.0&#34; ?&#62;<br /> &#60;person&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp; &#60;name&#62;Laura Long&#60;/name&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp; &#60;age&#62;34&#60;/age&#62;<br /> &#60;/person&#62;<!--c2--></div><!--ec2--><br /><br />I have a page that is going to load and display the code:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;&#60;html&#62;<br />&#60;html&#62;<br /><br />&#60;head&#62;<br /><br />&lt;script type=&#34;text/javascript&#34;&#62;<br />var xmlDoc;<br />if &#40;window.XMLHttpRequest&#41;<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;xhttp=new XMLHttpRequest&#40;&#41;;<br />&nbsp;&nbsp;}<br />else // Internet Explorer 5/6<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;xhttp=new ActiveXObject&#40;&#34;Microsoft.XMLHTTP&#34;&#41;;<br />&nbsp;&nbsp;}<br />xhttp.open&#40;&#34;GET&#34;,&#34;name.xml&#34;,false&#41;;<br />xhttp.send&#40;&#34;&#34;&#41;;<br />xmlDoc=xhttp.responseXML;<br /><br />var x=xmlDoc.getElementsByTagName&#40;&#34;person&#34;&#41;;<br /><br />function show&#40;i&#41;<br />{<br />name=&#40;x&#91;i&#93;.getElementsByTagName&#40;&#34;name&#34;&#41;&#91;0&#93;.childNodes&#91;0&#93;.nodeValue&#41;;<br />age=&#40;x&#91;i&#93;.getElementsByTagName&#40;&#34;age&#34;&#41;&#91;0&#93;.childNodes&#91;0&#93;.nodeValue&#41;;<br />txt=&#34;Name&#58; &#34;+name+&#34;&#60;br /&#62;Title&#58; &#34;+age+&#34;&#60;br /&#62;;<br />document.getElementById&#40;&#34;show&#34;&#41;.innerHTML=txt;<br />}<br />&#60;/script&#62;<br /><br />&#60;/head&#62;<br />&#60;body&#62;<br />&#60;div id='show'&#62;Names and age will be here&#60;/div&#62;<br />&#60;br /&#62;<br />&lt;script type=&#34;text/javascript&#34;&#62;<br />document.write&#40;&#34;&#60;table border='1'&#62;&#34;&#41;;<br />for &#40;var i=0;i&#60;x.length;i++&#41;<br />&nbsp;&nbsp;{ <br />&nbsp;&nbsp;document.write&#40;&#34;&#60;tr onclick='show&#40;&#34; + i + &#34;&#41;'&#62;&#34;&#41;;<br />&nbsp;&nbsp;document.write&#40;&#34;&#60;td&#62;&#34;&#41;;<br />&nbsp;&nbsp;document.write&#40;x&#91;i&#93;.getElementsByTagName&#40;&#34;name&#34;&#41;&#91;0&#93;.childNodes&#91;0&#93;.nodeValue&#41;;<br />&nbsp;&nbsp;document.write&#40;&#34;&#60;/td&#62;&#60;td&#62;&#34;&#41;;<br />&nbsp;&nbsp;document.write&#40;x&#91;i&#93;.getElementsByTagName&#40;&#34;age&#34;&#41;&#91;0&#93;.childNodes&#91;0&#93;.nodeValue&#41;;<br />&nbsp;&nbsp;document.write&#40;&#34;&#60;/td&#62;&#60;/tr&#62;&#34;&#41;;<br />&nbsp;&nbsp;}<br />document.write&#40;&#34;&#60;/table&#62;&#34;&#41;;<br />&#60;/script&#62;<br />&#60;/body&#62;<br />&#60;/html&#62;<!--c2--></div><!--ec2--><br /><br />It just displays:<br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Names and age will be here<br /><br />-<!--QuoteEnd--></div><!--QuoteEEnd--><br />and nothing else!<br /><br />I believe my problem is somewhere in the body part of the document but I am not sure I have bean messing around with if for 3 hours and am getting very angry with it.<br /><br />So any help would be MUCH appreciated. <br /><br />THANK YOU.]]></description>
		<pubDate>Mon, 02 Nov 2009 00:39:34 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28414</guid>
	</item>
	<item>
		<title>Sql Error...on Inserting Record</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28413</link>
		<description><![CDATA[table scrap has these columns...<br />id(autoincrement),scrapfrom(number),time(number),scrapto(number),message(text)<br /><br />i had executed this query<br />INSERT INTO scrap (scrapfrom,time,scrapto,message) VALUES (1,1257148511,1,'Hellow akdkjlasdkjlsaasdkjl')<br /><br />and the following error came...<br /><b>Warning</b>: odbc_exec() [<a href="http://localhost/php_new/function.odbc-exec" target="_blank">function.odbc-exec</a>]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement., SQL state 37000 in SQLExecDirect in <b>C:&#092;Inetpub&#092;wwwroot&#092;php_new&#092;scrap.php</b> on line <b>24</b><br /><br />please help me with this...<br />i am using access database....<br /><br />]]></description>
		<pubDate>Sun, 01 Nov 2009 23:37:17 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28413</guid>
	</item>
	<item>
		<title>Image Upload Info Help-o</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28411</link>
		<description><![CDATA[Why does this not work?  My error message is :  Notice: Undefined index: screenshot in C:&#092;wamp&#092;www&#092;site&#092;picresult.php on line 3<br /><br />This:<br /><br />&lt;form enctype="multipart/form-data" action="picresult.php" method="post"&gt;<br />&lt;input type="file" name="screenshot" /&gt;<br />&lt;input type="submit" /&gt;<br />&lt;/form&gt;<br /><br />And then this:<br /><br />&lt;?php<br /><br />$picture=$_FILES['screenshot']['name'];<br />echo $picture;<br /><br />?&gt;]]></description>
		<pubDate>Sun, 01 Nov 2009 20:46:15 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28411</guid>
	</item>
	<item>
		<title>Php Class</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28409</link>
		<description><![CDATA[I get the basic concept of classes. But what I don't get it how exactly is it helpful. It's basically a function in a function, there would be no problems in just calling the functions that I need and just completely ignore putting them in a class. I'm trying to get into using classes and I understand it's a big step in OOP.<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />class FormValidator {<br />&nbsp;&nbsp;function isEmpty&#40;$field, $msg&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;$value = $this-&#62;_getValue&#40;$field&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;if &#40;trim&#40;$value&#41; == &#34;&#34;&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&#62;_errorList&#91;&#93; = array&#40;&#34;field&#34; =&#62; $field, &#34;value&#34; =&#62; $value, &#34;msg&#34; =&#62; $msg&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br />}<br />?&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Sun, 01 Nov 2009 19:13:53 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28409</guid>
	</item>
	<item>
		<title>Display Xml Data In Any Html Element- Lesson Help</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28407</link>
		<description><![CDATA[Okay so I was looking at the XML application Part in the XML tutorial and I have a few questions.<br /><br />Here is the link to the lesson: <a href="http://w3schools.com/xml/xml_applications.asp" target="_blank">http://w3schools.com/xml/xml_applications.asp</a><br /><br />Here is the code that they give:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;html&#62;<br />&#60;head&#62;<br /><br />&lt;script type=&#34;text/javascript&#34;&#62;<br />var xmlDoc;<br />if &#40;window.XMLHttpRequest&#41;<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;xhttp=new XMLHttpRequest&#40;&#41;;<br />&nbsp;&nbsp;}<br />else // Internet Explorer 5/6<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;xhttp=new ActiveXObject&#40;&#34;Microsoft.XMLHTTP&#34;&#41;;<br />&nbsp;&nbsp;}<br />xhttp.open&#40;&#34;GET&#34;,&#34;cd_catalog.xml&#34;,false&#41;;<br />xhttp.send&#40;&#34;&#34;&#41;;<br />xmlDoc=xhttp.responseXML;<br /><br />var x=xmlDoc.getElementsByTagName&#40;&#34;CD&#34;&#41;;<br />i=0;<br /><br />function display&#40;&#41;<br />{<br />artist=&#40;x&#91;i&#93;.getElementsByTagName&#40;&#34;ARTIST&#34;&#41;&#91;0&#93;.childNodes&#91;0&#93;.nodeValue&#41;;<br />title=&#40;x&#91;i&#93;.getElementsByTagName&#40;&#34;TITLE&#34;&#41;&#91;0&#93;.childNodes&#91;0&#93;.nodeValue&#41;;<br />year=&#40;x&#91;i&#93;.getElementsByTagName&#40;&#34;YEAR&#34;&#41;&#91;0&#93;.childNodes&#91;0&#93;.nodeValue&#41;;<br />txt=&#34;Artist&#58; &#34; + artist + &#34;&#60;br /&#62;Title&#58; &#34; + title + &#34;&#60;br /&#62;Year&#58; &#34;+ year;<br />document.getElementById&#40;&#34;show&#34;&#41;.innerHTML=txt;<br />}<br />&#60;/script&#62;<br />&#60;/head&#62;<br /><br />&#60;body onload=&#34;display&#40;&#41;&#34;&#62;<br />&#60;div id='show'&#62;&#60;/div&#62;<br /><br />&#60;/body&#62;<br />&#60;/html&#62;<!--c2--></div><!--ec2--><br /><br />Now in the head they have this:<br /><br />var x=xmlDoc.getElementsByTagName("CD");<br /><!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->i=0;<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc--><br /><br /><!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->function display()<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc--><br />{<br />artist=(<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->x[i]<!--colorc--></span><!--/colorc-->.getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue);<br />title=(<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->x[i]<!--colorc--></span><!--/colorc-->.getElementsByTagName("TITLE")[0].childNodes[0].nodeValue);<br />year=(<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro-->x[i]<!--colorc--></span><!--/colorc-->.getElementsByTagName("YEAR")[0].childNodes[0].nodeValue);<br />txt="Artist: " <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->+ artist +<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc--> "&lt;br /&gt;Title: " <!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->+ title +<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc--> "&lt;br /&gt;Year: "<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->+ year<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->;<br />document.getElementById("show")<!--coloro:#FF0000--><span style="color:#FF0000"><!--/coloro--><!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->.innerHTML=txt<!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc-->;<br />}<br /><br />What does the variable "i" do?<br />What is "X[i]" mean? I assume that it means what ever "X" is with a value of what ever the variable "i" is.<br />What do the "+" signs on either side of artist, title, and on one side of year do?<br />And last of all what does .innerHTML=txt mean?<br /><br /><br />I am trying to understand why these things are not just that they are so I can write better coding in the future.  <img src="http://w3schools.invisionzone.com/style_emoticons/default/Happy.gif" style="vertical-align:middle" emoid=":Happy:" border="0" alt="Happy.gif" /> <br /><br />Thanks]]></description>
		<pubDate>Sun, 01 Nov 2009 16:31:12 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28407</guid>
	</item>
	<item>
		<title>Does The Cookie Go Befor The Document Type?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28403</link>
		<description><![CDATA[Does the cookie go be for the document type and the html tag or after the document type but before the html tag?<br /><br />Thanks.<br /><br /><br /><br /><br />]]></description>
		<pubDate>Sun, 01 Nov 2009 12:42:39 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28403</guid>
	</item>
	<item>
		<title>Page Problems</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28402</link>
		<description><![CDATA[I want to do a redirection script. But when I add the destination url to the my url (redirect.php?page=DESTINATION URL), it messes up since the distination url has also variables (domain.com/index.php?act=play&game=78). How can I fix this?<br /><br />Additional info:<br />the messed up url looks like this: domain.com/index.php?act=play<!--coloro:blue--><span style="color:blue"><!--/coloro-->(MISSING: &game=78)<!--colorc--></span><!--/colorc--><br />the full url looks like this: redirect.php?page=domain.com/index.php?act=play&game=78]]></description>
		<pubDate>Sun, 01 Nov 2009 12:11:27 -0500</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28402</guid>
	</item>
	<item>
		<title>Upload File</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28392</link>
		<description><![CDATA[Hi,<br /><br />I am just not getting this,  I am trying to uploaad a file but just dont seem to be able to.  <br /><br />I have made a folder for my two files with permissions set to 777 and another file called uploads and that permisions set to 777.  Is it something to do with that [tmp_name]?<br /><br />Thanks<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;html&gt;<br />&lt;head&gt;<br />&lt;title&gt;File Upload Form&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />This form allows you to upload a file to the server.&lt;br&gt;<br /><br />&lt;form action="getfile.php" method="post"&gt;&lt;br&gt;<br />Type (or select) Filename: &lt;input type="file" name="uploadFile"&gt;<br />&lt;input type="submit" value="Upload File"&gt;<br />&lt;/form&gt;<br /><br />&lt;/body&gt;</div><br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;html&gt;<br />&lt;head&gt;<br />&lt;title&gt;Process Uploaded File&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />&lt;?php<br /><br />move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'],<br />       "/uploads/{$_FILES['uploadFile'] ['name']}")<br /><br />?&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;<br /> </div>]]></description>
		<pubDate>Sat, 31 Oct 2009 08:21:16 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28392</guid>
	</item>
	<item>
		<title>Date Diff...</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28386</link>
		<description>how to get difference b/w a date of any format suppose YYYY-DD-MM HH:MM:SS and the current date with php..</description>
		<pubDate>Sat, 31 Oct 2009 01:00:31 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28386</guid>
	</item>
	<item>
		<title>Make A Php Script Add A New Item To A News Feed</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28385</link>
		<description><![CDATA[I'm making a RS feed for my former clan's site (http://site.clanxhw.net/) and im wondering is there any way that I could make a form add a new item to a RSS feed?]]></description>
		<pubDate>Sat, 31 Oct 2009 00:04:01 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28385</guid>
	</item>
	<item>
		<title>Images Do Not Display</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28379</link>
		<description><![CDATA[Hi  i have this php to get images from a directory and then putting them into a slide show.  Unfortunatly rather than displaying the images it writes them file names (in the page source).<br /><br /><br />Thanks for help<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;html&gt;<br />&lt;head&gt;<br />&lt;script language="javascript" type="text/javascript" &gt;<br />&lt;?php<br />ob_start(); //Output buffering<br /><br />$imgDir = "images/"; // the directory the iimages reside in<br />$counter = 0; // our file counter;<br />$list = "";<br /><br />//regex pattern to check file extensions<br />$pattern="(.jpg$)|(.png$)";<br /><br />//read through the dir and create the img list<br />if($dir = opendir($imgDir)) {<br />while(false !== ($file = readdir($dir))){<br />if(eregi($pattern, $file)){<br />$path = $imgDir . $file;<br />$list .= 'pict['.$counter.']="'.$path .'";' /*.chr(13)*/;<br />$counter ;<br />}<br />}<br />closedir($dir);<br />}<br />//echo the array declaration<br />echo "pict = new Array();" /*. chr(13)*/;<br />echo $list;<br />ob_end_flush();<br />?&gt;<br /><br />var i=0;<br />var paused=false;<br />var running=false;<br /><br />function next()<br />{<br />if(running==true)<br />{<br />stop();<br />}<br />if(i&lt;pict.length-1)<br />{<br />i ;<br />document.getElementById('picture').src=pict[i];<br />document.getElementById('number').innerHTML="Picture " (i 1);<br />}<br />else<br />{<br />i=0;<br />document.getElementById('picture').src=pict[i];<br />document.getElementById('number').innerHTML="Picture " (i 1);<br />}<br />}<br /><br />function prev()<br />{<br />if(running==true)<br />{<br />stop();<br />}<br />if (i&gt;0)<br />{<br />i--;<br />document.getElementById('picture').src=pict[i];<br />document.getElementById('number').innerHTML="Picture " (i 1);<br />}<br />else<br />{<br />i=pict.length-1;<br />document.getElementById('picture').src=pict[i];<br />document.getElementById('number').innerHTML="Picture " (i 1);<br />}<br />}<br /><br />function startSlide()<br />{<br />running=true;<br />interval = setInterval(FFSlideshow,3000);<br />document.getElementById("slideshow").disabled=true;<br />document.getElementById('number').innerHTML="Picture " (i 1);<br />}<br /><br />function FFSlideshow()<br />{<br />if (i&lt;pict.length-1)<br />{<br />document.getElementById("slideshow").disabled=true;<br />i<br />document.getElementById('picture').src=pict[i];<br />document.getElementById('number').innerHTML="Picture " (i 1);<br />}<br />else<br />{<br />i=0;<br />document.getElementById('picture').src=pict[i];<br />document.getElementById('number').innerHTML="Picture " (i 1);<br />}<br />}<br /><br />function pause()<br />{<br />if(running==true)<br />{<br />if(paused==false)<br />{<br />paused=true;<br />document.getElementById("pause").value="resume";<br />clearInterval(interval);<br />document.getElementById('number').innerHTML="Paused";<br />}<br />else<br />{<br />startSlide()<br />paused=false;<br />document.getElementById("pause").value="pause";<br />}<br />}<br />}<br /><br />function stop()<br />{<br />document.getElementById("slideshow").disabled=false;<br />document.getElementById('number').innerHTML="End of slideshow";<br />running=false;<br />paused=false;<br />document.getElementById("pause").value="pause";<br />clearInterval(interval);<br />}<br />&lt;/script&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />&lt;center&gt;<br />&lt;div id="pictureContainer"&gt;<br />&lt;img id="picture" name="picture" src="images/1.png" /&gt;&lt;/div&gt;&lt;br /&gt;<br />&lt;input id="prev" type="button" value="prev" onclick="prev()" /&gt;<br />&lt;input id="next" type="button" value="next" onclick="next()" /&gt;<br />&lt;input id="slideshow" type="button" value="slideshow" onclick="startSlide()" /&gt;<br />&lt;input id="stop" type="button" value="stop" onclick="stop()" /&gt;<br />&lt;input id="pause" type="button" value="pause" onclick="pause()" /&gt;&lt;br /&gt;<br />&lt;div id="number"&gt;Picture 1&lt;/div&gt;<br />&lt;/center&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</div>]]></description>
		<pubDate>Fri, 30 Oct 2009 11:07:40 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28379</guid>
	</item>
	<item>
		<title>Paypal As A Payment Solution</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28377</link>
		<description><![CDATA[Hi all, <br /><br />I am trying to change the price of an article for a friend on his online shop, he uses paypal to accept payments, but I searched his database and his scripts, and I can't find the info concerning the price, is this stored on his paypal account?<br />I would like to know if i have to ask him for these details or if I've missed something...<br /><br />I've never used paypal before as a payment solution on website, so, I don't really know how it works.<br /><br />I think the amount is passed as a hidden input value from the form, but in that case I can just change this amount and put 0, what stops me doing this ?]]></description>
		<pubDate>Fri, 30 Oct 2009 09:16:57 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28377</guid>
	</item>
	<item>
		<title><![CDATA[Nl2br Can't Appear Images From Tinymce]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28373</link>
		<description><![CDATA[Dear all,<br /><br />I have some problem with my textarea box that i use TinyMCE editor.<br /><br />I do a post date(text,image ..etc) into database: <b>nl2br($_post["textarea"]);</b><br /><br />but when display databse on webpage: <b>nl2br($date[textarea_value]);</b><br /><br />it display only TEXT that has table aligment but the image deosn't show at all.<br /><br />Anyone can help me on how to show image on webpage when i post data use textarea-tinymce.<br /><br />Thanks<br />Virak<br /><br />]]></description>
		<pubDate>Thu, 29 Oct 2009 21:58:51 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28373</guid>
	</item>
	<item>
		<title><![CDATA[[resolved] Session Problem]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28366</link>
		<description><![CDATA[I'm using a session to login. However, it can do some very strange things. It will log me out even if I still have my session. This usually happens after I don't click on something for a period of time. I know it's not timing out because even after 3mins of being idle on any page, it will log me out. Sometimes it lasts longer and it's beginning to be a hassle. <br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->$_SESSION&#91;'admin'&#93; = $admin;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Thu, 29 Oct 2009 12:31:55 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28366</guid>
	</item>
	<item>
		<title>Format Number</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28364</link>
		<description><![CDATA[I have a drop down for the hour and another one for minutes. I insert data in db and also send an email. For email: How can I automatically add a 0 before number if it is 0-9 (as oppsed to 12)?<br /><br />Son]]></description>
		<pubDate>Thu, 29 Oct 2009 09:57:18 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28364</guid>
	</item>
	<item>
		<title>Alternative To Trigger_error And Die?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28363</link>
		<description><![CDATA[I run a query and as I will put it live shortly want only to output a customer-friendly message with all the content below that there normally is. 'mysql_query o trigger_error will show error message, so this is a no no. Alternatively 'mysql_query or die' won't display the bottom content. What is best to do?<br /><br />Son]]></description>
		<pubDate>Thu, 29 Oct 2009 05:31:12 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28363</guid>
	</item>
	<item>
		<title><![CDATA[Asp.net & Vb.net Book/tutorial?]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28361</link>
		<description><![CDATA[Does anyone know of a good book or web reference for learning vb.net with asp.net? I've done asp.net through the GUI in Visual Studio by dropping controls on the page and then writing some code in VB.net for those controls, but I definately dont know much in VB.net. Any suggestions?]]></description>
		<pubDate>Wed, 28 Oct 2009 22:38:04 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28361</guid>
	</item>
	<item>
		<title>Confused About Regex Backreferences</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28358</link>
		<description><![CDATA[I have seen PHP regex backreferences done two ways on the web: one as &#092;1, where it represents the first captured pair of parentheses, and $1 which is the same thing. Which is the correct way?]]></description>
		<pubDate>Wed, 28 Oct 2009 18:24:36 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28358</guid>
	</item>
	<item>
		<title>How To Output The Source Code Of A Php File</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28355</link>
		<description><![CDATA[Hi Guys,<br /><br />I am using a script to display the source code of files<br /><br />It works but on PHP file it displays the code that will come out at the end, NOT the actual code of the page that I coded myself.<br /><br />Why is this and what function should I be using, Currently I am using file();]]></description>
		<pubDate>Wed, 28 Oct 2009 17:20:39 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28355</guid>
	</item>
	<item>
		<title>Help With String Fuctions In Java</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28352</link>
		<description><![CDATA[I want to make a program that does the following online.<br /><br />convert<br /><a href="http://www.hereihostmyimages.com/folder/picture001.jpg" target="_blank">http://www.hereihostmyimages.com/folder/picture001.jpg</a><br /><br />to<br /><br />[IMG ]http://www.hereihostmyimages.com/folder/picture001.jpg[/IMG ]<br />[IMG ]http://www.hereihostmyimages.com/folder/picture002.jpg[/IMG ]<br />[IMG ]http://www.hereihostmyimages.com/folder/picture003.jpg[/IMG ]<br />etcetera etcetera...<br /><br />I made something allready but it isn't as userfriendly as I wanted to. now it needs <a href="http://www.hereihostmyimages.com/folder/picture" target="_blank">http://www.hereihostmyimages.com/folder/picture</a> to be input in one textfield, the amount of tags in another textfield and the extension in a third textfield. What i want to do is detect the first '1' in the link. And cut the string into 2 at that point. Then with a loop replace the 01 with 02,03,04 and so on, and paste the extension at the end again.<br /><br />I've been looking at indexOf and others but I can't get it to work. Can someone tell me what functions to use here?<br /><br />Thanks in advance!]]></description>
		<pubDate>Wed, 28 Oct 2009 14:48:52 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28352</guid>
	</item>
	<item>
		<title>String Functions In Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28351</link>
		<description><![CDATA[I want to make a program that does the following online.<br /><br />convert<br /><a href="http://www.hereihostmyimages.com/folder/picture001.jpg" target="_blank">http://www.hereihostmyimages.com/folder/picture001.jpg</a><br /><br />to<br /><br />[IMG ]http://www.hereihostmyimages.com/folder/picture001.jpg[/IMG ]<br />[IMG ]http://www.hereihostmyimages.com/folder/picture002.jpg[/IMG ]<br />[IMG ]http://www.hereihostmyimages.com/folder/picture003.jpg[/IMG ]<br />etcetera etcetera...<br /><br />can I do this with php and which functions (please with a small example, im not very good with terminoligy) should i be looking at?<br />If this is not possible or much handier in another language please tell me which one.<br /><br />Thanks in advance!<br />]]></description>
		<pubDate>Wed, 28 Oct 2009 14:42:21 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28351</guid>
	</item>
	<item>
		<title>Localhost</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28349</link>
		<description><![CDATA[Okay so, I found out that I can use localhost, but what I am not understanding is, how do I get the files to localhost?<br /><br />Do I have to download anything? or can I do it without downloading?]]></description>
		<pubDate>Wed, 28 Oct 2009 13:32:33 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28349</guid>
	</item>
	<item>
		<title>One Query, Two While Loops?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28345</link>
		<description><![CDATA[I have a query and would like to go twice through returned data (show data in different format). Is this not possible with same query? The first while shows nicely all info, the second one does not. The code is:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$query = "SELECT finish_id, finish, img FROM finishes WHERE range_id  = $prange";<br />		$result = mysqli_query ($dbc, query);<br />		<br />			if (mysqli_num_rows($finish_result) &gt; 0)<br />			{<br />			echo "&lt;select name=&#092;"fn&#092;" id=&#092;"fn&#092;"&gt;";<br />			echo "&lt;option value=&#092;"0&#092;"&gt;Select finish&lt;/option&gt;";<br />				while ($row = mysqli_fetch_array ($finish_result, MYSQLI_ASSOC))<br />				{<br />				$finish_id = $row['finish_id'];<br />				$finish = $row['finish'];<br />				echo "&lt;option value=&#092;"" . $finish_id . "&#092;"";<br />				echo "&gt;" . $finish . "&lt;/option&gt;";<br />				}<br />				echo "&lt;/select&gt; ";<br />				while ($row = mysqli_fetch_array ($finish_result, MYSQLI_ASSOC))<br />				{<br />				$finish_id = $row['finish_id'];<br />				$finish = $row['finish'];<br />				$img = $row['img'];<br />				$finishImgPath = "assets/finishes/preview/";<br />				$size = getimagesize("assets/finishes/preview/{$img}");<br />				echo "&lt;img src=&#092;"" . $mainPath . $finishImgPath . $img . "&#092;" " . $size[3] . " alt=&#092;"" . $finish . "&#092;" title=&#092;"" . $finish . "&#092;" /&gt;&lt;/a&gt;";<br />				}<br />			}</div><br /><br />Do I have to run the query twice?<br /><br />Son]]></description>
		<pubDate>Wed, 28 Oct 2009 07:52:20 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28345</guid>
	</item>
	<item>
		<title>Open Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28342</link>
		<description><![CDATA[How do I open php with a text editor?<br /><br />I do not want the fancy download stuff, just want to know how to do it with a text editor.<br /><br /><br />I click on the document and do IE or Firefox with Firefox it opens blank, with IE it opens then closes and asks me to save or open the file, but the box that opens and asks me to save or open the file always freezes.<br /><br />Please help, thanks.]]></description>
		<pubDate>Tue, 27 Oct 2009 21:40:59 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28342</guid>
	</item>
	<item>
		<title>Help</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28339</link>
		<description><![CDATA[Someone is teaching me PHP and he is not on right now.<br /><br />He left me with this:<br /><br /><br />and if you want a script to do something when someone clicks a certain button youd go like this<br />&lt;?php<br />switch($_GET['action'])<br />{<br />case 'testfunction': test_function(); break;<br />}<br /><br />function Test_function()<br />{<br />if ($test==1)<br />print "Ze test works!!!";<br /><br />else<br />die ("Ze test isn't working");<br />}<br />?&gt;<br />then whenever the function opened if $test (a variable ) =1 it would say "Ze test works!!!" and if test equaledd anything else it would say "Ze test isn't working.<br /><br />then you could change whats in the Print quotes to change the message and change the $test variable to change what variable its checking. you could also change the =1 to another number or something like &gt; or != which means doesn't equal.<br />now to run this function you could go like this<br />print "&lt;form action='file.php?action=testfunction' method='post'&gt;<br />&lt;input type='submit' value=test function' /&gt;&lt;/form&gt;";<br />put that in your file (but outside your function) and it would make a button called "test function" and when clicked it would open the "test_function" function<br /><br /><br /><br /><br /><br />Can someone help explain this? Thanks.]]></description>
		<pubDate>Tue, 27 Oct 2009 20:10:26 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28339</guid>
	</item>
	<item>
		<title>Mysql Select Date Selection</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28337</link>
		<description><![CDATA[I am trying to select the 31 most recent dates from a database, the problem is that <u>if</u> the last date to be selected (the furthest back in time) is not the only entry with that the date then I either don't want to select it or I want to select the other dates that match it as well(depending on which is easier).<br />Any ideas?]]></description>
		<pubDate>Tue, 27 Oct 2009 17:09:31 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28337</guid>
	</item>
	<item>
		<title>Sql Report Extremely Slow To Display Results</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28335</link>
		<description><![CDATA[After modifying a SQL report to display any user(s) that have an MR status of 'canceled', I am noticing that when the report is executed on the server, it's taking so long to display that it has timed out on several occasions. <br /><br />I've been trying to speed the process of viewing the report, but without any success.<br /><br />See code below for details....<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>USE [SQL_reporting]<br />GO<br />/****** Object:  StoredProcedure [dbo].[pp_Material_Request_CANCELED_byUser]    Script Date: 10/27/2009 12:32:31 ******/<br />SET ANSI_NULLS ON<br />GO<br />SET QUOTED_IDENTIFIER ON<br />GO<br />-- ==================================================<br />-- Author:		&lt;me&gt;<br />-- Modified:	&lt;me&gt;<br />-- Create date:          &lt;7/30/2008&gt;<br />-- Description:	[pp_Material_Request_CANCELED_byUser]<br />-- ==================================================<br /><br />ALTER PROCEDURE [dbo].[pp_Material_Request_CANCELED_byUser]<br />(<br />		@facility varchar(10), @USER_VAL varchar(5000)		 <br />)<br /><br />AS<br /><br />SET NOCOUNT ON<br />SET ANSI_NULLS ON<br /><br />DECLARE @connection_string As varchar(50)<br />SET @connection_string = dbo.linked_server(@facility)<br />--use the @connection_string variable in your calls for<br />--openquery('+@connection_string+',<br />SET @facility = dbo.change_BRE_to_BR(@facility)<br /><br />-- end lines<br /><br /><br />SET @USER_VAL = dbo.format_string(@USER_VAL)<br /><br /><br />DECLARE @SQL VARCHAR(8000)	<br />	SET @SQL = '<br />	SELECT tidmrmst.material_request, tidmrmst.matl_request_type,<br />       tidmrmst.mr_status, tidmrmst.need_date_matl, tidmrmst.status_date,<br />       tidmrmst.resp_id, tidmrmst.job_type, tidmrmst.reference_type,<br />       tidmrmst.reference_nbr, tidmrmst.reference_sub_nbr, tidmrmst.title,<br />       lower(ltrim(rtrim(tidprefs.preference_value))) ||''@''||<br />       lower(ltrim(rtrim(tidprefs1.preference_value))) As email,<br />       rtrim(tidemplo.first_name) || '' '' || ltrim(tidemplo.last_name) As name<br /> <br /> FROM cb10.tidmrmst, cb10.tidprefs, cb10.tidprefs tidprefs1, tidemplo<br /> WHERE (<br />    (tidmrmst.resp_id IN ('+@USER_VAL+'))<br />   AND (tidmrmst.facility = '''+@facility+''')<br />   AND ((tidmrmst.mr_status = ''CANCELED''))<br />   AND ((tidmrmst.resp_id = tidemplo.passport))<br />   AND ((tidmrmst.resp_id = tidprefs.pref_qual_value (+)))<br />   AND ((tidmrmst.resp_id = tidprefs1.pref_qual_value (+)))<br />   AND ((tidprefs.preference_name = ''EMAIL USER ID''))<br />   AND ((tidprefs1.preference_name = ''EMAIL USER NETADDR''))<br />   )<br /> ORDER BY tidmrmst.resp_id'<br /><br />SET @SQL = 'select * from openquery('+@connection_string+',''' + REPLACE(@SQL,'''','''''') + ''')'<br />EXEC (@SQL)<br /><br />SET NOCOUNT OFF</div><br /><br />Any help and or suggetions is greatly appreciated! <br /><br />Thanks!]]></description>
		<pubDate>Tue, 27 Oct 2009 13:42:00 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28335</guid>
	</item>
	<item>
		<title><![CDATA[Foreach($_post As $key=&gt;$value) Details]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28330</link>
		<description><![CDATA[I have fields for start time in form to submit data via email as:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>  &lt;p class="label"&gt;&lt;label for="evt_hour"&gt;FROM:&lt;/label&gt; <br />    &lt;select name="evt_hour" id="evt_hour"&gt;<br />     &lt;option value="0"&gt;00&lt;/option&gt;<br />&lt;?php<br /><br />    for ($i = 1; $i &lt; 24; $i++)<br />    {<br />        printf('&lt;option value="%d"&gt;%02d&lt;/option&gt;', $i, $i);<br />    }<br />?&gt;<br />    &lt;/select&gt; : &lt;select name="evt_min"&gt;<br />&lt;?php<br />    for ($i = 0; $i &lt; 59; $i += 30)<br />    {<br />            printf('&lt;option value="%d"&gt;%02d&lt;/option&gt;', $i, $i);<br />    }<br />?&gt;<br />    &lt;/select&gt;<br />   &lt;/p&gt;</div><br /><br />I gather the $_POST data to be sent as:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>foreach($_POST as $key=&gt;$value)<br />		{<br />  			$S.= $key .": ". $value."&#092;n";<br />			}<br /></div><br /><br />The email will have those fields for example as:<br />evt_hour: 12<br />evt_min: 30<br /><br />How can I do it that it sends it as:<br />Start time: 12:30?<br /><br />There are 5 other fields which do not need to be joined and are totally ok the way they are...<br /><br />Son<br /><br />]]></description>
		<pubDate>Tue, 27 Oct 2009 07:18:08 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28330</guid>
	</item>
	<item>
		<title>Prevent External Posts?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28329</link>
		<description><![CDATA[Hi I have a form which posts a file upload to my php page (which uploads it). However I don't have a way of preventing people using the same php page to upload any dangerous files from an external website. I'v googled for a solution but they all seem to be hackable, e.g. checking referral pages, and using sessions. Does anyone know of a safe way to upload files? I was thinking some kind of hidden password that is posted along with the form, and the php page checks if this is the same password that is stored in a database. But how would I be able to hide this password?]]></description>
		<pubDate>Tue, 27 Oct 2009 05:41:28 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28329</guid>
	</item>
	<item>
		<title>Some Php Questions</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28325</link>
		<description><![CDATA[i've been doing a full workover on my site, it's completly PHP based so i just need to have these questions answered to help me make sure it's going to work when i update the old pages with the new ones<br /><br />Question 1: i have created a system that randomly selects a set of banner images, i have learned that &lt;meta&gt; tags a search engine crawler reads will also look in the alt property of an image, will the crawler read the alt property in the &lt;img&gt; when it's printed out like this<br /><br />print "&lt;img src='$imagepath/title-1.png' width=157 height=215 alt='Anime'&gt;&#092;n"<br /><br />Question 2: i created a system that pulls out news posts that are made on my site's forum buy getting the post's relevant data from my site's database, i won't go over the details but from work that i've done with PHP i learned that when you put HTML tags into a database and pull them out, store them in a varible then print them out, the HTML tag still works, however, when i put html tags into a post, in theory the html tags should work normaly when i pull the text out of the database and print it on the main site however the text isn't tages and you can see where the start and end tags are places, if that make sense, the forum i use is a PHPBB Version 3.0.RC1<br /><br />Question 3: on some sites i've been to you can get an image created depending on what you typed in and which options you selected and sometimes data is pulled out of somewhere,a prime example is the Playstation Network's Protible ID you can gte where you select you mood, your favorite game and what kind of skin you want and the image created contains your Online ID, Your Avatar, your mood, favorite game, the skin and also data on how many trophies you have obtained, i was wondering if this can be done in PHP, if so, does anyone know where i can find material on createing a system like it (since i don't know what the system is esactly i can't really google search it), if not, what language is it done by, will it still work in a .php page (or will php still work in it's native page format) and where i can find material on createing it]]></description>
		<pubDate>Mon, 26 Oct 2009 21:28:11 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28325</guid>
	</item>
	<item>
		<title>Undefined Index</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28323</link>
		<description><![CDATA[Hi, <br /><br />This could be right place for asking this. I have script which worked perfectly. And today, I updatet my Wamp Server and then back files to &#092;www folder and then I'm getting this error.<br /><br />Notice: Undefined index: cookie in C:&#092;wamp&#092;www&#092;settings.php on line 10<br /><br />10th line of settings.php is <br /><br />$cookie = $_COOKIE['cookie_name'];<br /><br />I've turned on apache module (which were off):<br /><br /><b>auth_digest_module</b><br /><br />And php setting <b>register globals</b>,<br /><br />And notice is still shown.<br /><br />Is there some option which can hide this, and make my script works fine as before.<br /><br />I'm so mad on myself becouse I updated wamp.<br /><br />Thanks]]></description>
		<pubDate>Mon, 26 Oct 2009 19:25:28 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28323</guid>
	</item>
	<item>
		<title>(!$var)</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28320</link>
		<description><![CDATA[Please, what does "(!$var)" mean?<br /><br />I'm pretty sure it means "is $var null".<br /><br />Also, what's the PHP reference?<br /><br />Thanks.<br /><br />]]></description>
		<pubDate>Mon, 26 Oct 2009 15:38:52 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28320</guid>
	</item>
	<item>
		<title>Order By Syntax Issue</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28316</link>
		<description><![CDATA[I cannot get the ORDER BY syntax right on my query. I have:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>SELECT product_id, product, img1 FROM products WHERE product_id IN (SELECT product_id FROM productCat WHERE category_id = 9)  ORDER BY (SELECT usort FROM productCat)</div><br /><br />Products should be ordered by the column usort in productCat table. How would I do this correctly?<br /><br />Son]]></description>
		<pubDate>Mon, 26 Oct 2009 12:21:08 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28316</guid>
	</item>
	<item>
		<title>Deleting Products Brings Issue For Sorting Number</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28314</link>
		<description><![CDATA[I found a issue in my code to display products on category overview page in certain order. When I make and association between prduct and category I enter a usort number which counts the number of previous items in same category, adds 1 and inserts this value into table. The code is:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>	$sql = "INSERT INTO productCat (usort, category_id, product_id) VALUES ";<br />		foreach ($category as $v)<br />		{<br />		$count_query = "SELECT COUNT(*)  FROM productCat WHERE category_id = $v";<br />         $count_result = mysqli_query($dbc, $count_query);<br />         $r = mysqli_fetch_row($count_result);<br />         $max = $r[0];<br />		 $max = $max + 1;<br />    	$sql .= "('$max', '$v', '$id'),";<br />		}<br /></div><br /><br />This works as long as no product and therefore also product/category association gets deleted. When a product is deleted counting the rows of products in same category and adding one might potentially enter a number in usort which exists already. Not sure what the best is to avoid this?<br /><br />Son<br /><br />I also would like to avoid gaps. Can I somehow automatically re-order or similar?]]></description>
		<pubDate>Mon, 26 Oct 2009 12:14:29 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28314</guid>
	</item>
	<item>
		<title>Teach Me</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28308</link>
		<description><![CDATA[Can anybody please teach me php, please, I do not know where to find anybody.<br /><br />At least for 30 mins a day or as long as you want as long as I can go to bed, lol.<br /><br /><br />Also for free, email, or pm me if you can teach me, we can do gmail chat.<br /><br />Thanks!]]></description>
		<pubDate>Sun, 25 Oct 2009 21:27:35 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28308</guid>
	</item>
	<item>
		<title>Forums Question</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28301</link>
		<description><![CDATA[I hope this is the right place to post this. Anyway, I was wondering, I've seen all these amazing forums out there, but one thing has questioned me... how do you do it? I know there are online free places to do it, but I want to learn how to do it manually. I know where to download the phpbb3 or whatever, but after that.. well who knows. Can someone tell me how this works or at least direct me to a good tutorial? Thanks for reading.<br /><br /> -Sacred]]></description>
		<pubDate>Sat, 24 Oct 2009 22:28:32 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28301</guid>
	</item>
	<item>
		<title>Safety Of A Php Script</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28299</link>
		<description><![CDATA[Hai,<br /><br />I am a newbee and had a discussion with somebody who told me that  xxx.php files could<br />be read out or copied for the code in that file. He couldn't tel me how, so i want to verify this, by specialists.<br />The reason why i want to know this, is that i use passwords in my xxx.php file to acces my msql database.<br />I thought always that it was save!!!<br /><br />Could somebody tell me if it isn't secure and why ?<br /><br />Thanks in advance.<br /><br />Simon]]></description>
		<pubDate>Sat, 24 Oct 2009 16:10:11 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28299</guid>
	</item>
	<item>
		<title>Php  Editing Html Without Coding....?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28298</link>
		<description><![CDATA[Hi, I  am trying to make a layout editor. I want my users to not code anything. I want to handle the coding. I just want a gui for the users to easily drag and drop stuff on the page to create their page layout.  I know I can use javascript for that and store the css values in a css file. <br /><br />upon the user registering with my website. I plan to automatically  generate their own html and css file for their own public profile page.  Inside the html and css would be default values. I want the editor to allow to change those values if the user edited them. <br /><br />the problem is that I don't know how you can use php to load in a css and html file and then know what each line consitis and be able to either delete or add new code. <br /><br />I mean you know in html you have the &lt;html&gt;&lt;/html&gt; tags  how could php know exactly where those tags are located so if you need to add new code you would put it in front of &lt;/html&gt; tag. <br /><br />So the problem here is just manipulating the html and css files to add and delete stuff. <br /><br />any idea?]]></description>
		<pubDate>Sat, 24 Oct 2009 14:43:10 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28298</guid>
	</item>
	<item>
		<title>How To Create A Mysql Table Grid</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28297</link>
		<description><![CDATA[I want to buld a page that displays, in grid form, the records obtained from a MySQL query.  Then be able to select certain records for other processing.<br /><br />I've been searching everywhere I can think of, and everything I come up with is close, but no cigar; it just dances around the edges of what I need.<br /><br />Can someone tell me how this is done, and/or where I can find out how to do it?]]></description>
		<pubDate>Sat, 24 Oct 2009 14:39:48 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28297</guid>
	</item>
	<item>
		<title>Question On Php Ajax Rss Reader</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28296</link>
		<description><![CDATA[Hi<br /><br />Im going through the PHP, ajax tutorials and Im currently looking at the ajax RSS reader. I need to know how to show the results of all the feeds in the drop down list. I can do it so that it shows all the results of one feed and then moves onto the next feed but how can I make it so that it looks at all the results from each feed and then shows all the results in order from newest to oldest??? <br /><br />Any ideas guys???]]></description>
		<pubDate>Sat, 24 Oct 2009 14:13:20 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28296</guid>
	</item>
	<item>
		<title>Index.php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28294</link>
		<description><![CDATA[hi,  i am looking to find some information or a tutorial on how a index.php which uses include function works, is there a technical name for it.  And how is it better than using html links.<br /><br />Thanks gary]]></description>
		<pubDate>Sat, 24 Oct 2009 12:47:32 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28294</guid>
	</item>
	<item>
		<title>Need Some Advice With A Huge Project</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28288</link>
		<description><![CDATA[HI!  Just want to say hello first since I'm new, hopefully I've come to the right forum <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Recently I've been thinking about developing a website that can do stock technical analysis. Basically it should be able to retrieve historical prices for a given stock, perform some mathematical/statistical calculations on the data, and return the results back to the users in graphs. If possible, I would also like to create some sort of scanner that would allow users to filter for various trading signals.<br /><br />I have extensive financial background and VB experience, however I'm completely new to website building/scripting and databases such as MySQL or SQL server.  So I'm not sure whether I'm on the right track.  Here my plan (very general):  <br /><br />1. Use Dreamweaver/Fireworks to create the website.<br />2. Use SQL Server for the database <br />3. Use ASP.NET to process the data and return results back to website.<br />4. Use HostGator for my website host.<br /><br />Of course I would also have to figure out how to get stock price data from Yahoo/GoogleFinance into my database first, but I think it can be done easily and for free, right?   <img src="http://w3schools.invisionzone.com/style_emoticons/default/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> <br /><br />Some people also said that PHP is faster than ASP.NET, but a IT friend of mine told me that php is not capable of performing complex calculations with many variables such as those that exist in the stock market. <br /><br />Ideally I would want to have the functionality of the website below:<br /><br /><a href="http://www.marketinout.com/chart/stock_analyzer.php#" target="_blank">http://www.marketinout.com/chart/stock_analyzer.php#</a><br /><br />I'm about to begin this project, so just want to start on the right path.  Do you think there's any better way to work on this (perhaps a different scripting language, database, or other things I may have missed?)  <br /><br />I'd greatly appreciate any help or suggestions. Thanks!  <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />]]></description>
		<pubDate>Sat, 24 Oct 2009 06:15:55 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28288</guid>
	</item>
	<item>
		<title>Is Php Suitable For Stock Technical Analysis?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28287</link>
		<description><![CDATA[Recently I've been thinking about developing a website that can do stock technical analysis.  Basically it should be able to retrieve historical prices for a given stock, perform some mathematical/statistical calculations on the data, and return the results back to the users in graphs.  If possible, I would also like to create some sort of scanner that would allow users to filter for various trading signals.  <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />I am not sure whether asp.net or php is more suitable for this task.  So I called up a friend who works at a big IT firm, and he told me that php is not capable of performing complex calculations with many variables such as those that exist in the stock market.  And he recommended asp.net while saying that php is more suitable for simpler tasks.   <img src="http://w3schools.invisionzone.com/style_emoticons/default/huh.gif" style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /> <br /><br />I'm asking this because based on research I've done, php seems to run a lot faster, easier to learn, and are used by many many people.  So I wasn't sure about what my cousin says....<br /><br />Ideally I would want to have the functionality of the website below:<br /><br /><a href="http://www.marketinout.com/chart/stock_analyzer.php#" target="_blank">http://www.marketinout.com/chart/stock_analyzer.php#</a><br /><br /><br />I'd greatly appreciate any help or suggestions.  Thanks!]]></description>
		<pubDate>Sat, 24 Oct 2009 05:45:03 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28287</guid>
	</item>
	<item>
		<title>Synchronizing Php And Protecting Mysql Db Access</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28285</link>
		<description><![CDATA[I am trying to add a new user to my database. I check the users table to find last id used and i increment it by one. I then add that user to the users table. I have to add that user to a second table too.<br /><br />I figure that I need to use a PHP semaphore or some synchronization object to make sure that I don't get a race condition during these 3 steps (if another user is signing up at the same time). Is there a better way to do this?<br /><br />How can I protect the db if the system dies between updating the users table and updating the second table? I am using mysql with innodb. What if the first or second update fails? Should I be using transactions / rollbacks?<br /><br />Thank you,]]></description>
		<pubDate>Fri, 23 Oct 2009 20:33:23 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28285</guid>
	</item>
	<item>
		<title>Problem Embedding A Pdf Document In Asp Page</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28280</link>
		<description><![CDATA[Hi<br /><br />I have an iframe which displays inside a pdf document on my ASP Page, but when I display the page in a different screen resolution, say 800 x 600, the pdf document expands and overlays itself over other controls.<br /><br />Is there away, to control the size of the iframe so it stays the same size?<br /><br />Here is my markup<br /><br />&lt;div id="pdfholder&gt;<br /><br />     &lt;iframe src="userdoc.pdf" height="45em" width="80%"/&gt;<br /><br />&lt;/div&gt;<br /><br />  &lt;div id="buttonholder"&gt;<br /><br />       &lt;asp:button id="btnAccept" runat="server" onclick="accept"/&gt;<br /><br />       &lt;asp:button id="btnReject" runat="server" onclick="reject"/&gt;<br /><br /> &lt;/div&gt;]]></description>
		<pubDate>Fri, 23 Oct 2009 15:32:31 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28280</guid>
	</item>
	<item>
		<title>Multiple Queries On One Page</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28278</link>
		<description><![CDATA[I have a mini racing system, and I'd like to run several filters on the data to gauge where the more profitable areas are (if they exist!)  I thought I might be able to use php/mysql to query the data - I thought that the profit/loss number of winners would be automatically updated each time I upload more data.<br /><br />My code currently looks like this:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;// Make a MySQL Connection<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_connect&#40;&#34;*****&#34;, &#34;*****&#34;, &#34;*****&#34;&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql_select_db&#40;&#34;******&#34;&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br />?&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;table border=&#34;1&#34; cellpadding=&#34;2&#34; cellspacing=&#34;0&#34; width=&#34;100%&#34;&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;tr&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width=&#34;25%&#34;&#62;No Filter&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width=&#34;25%&#34;&#62;&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = &#34;SELECT SUM&#40;profit&#41; FROM *****&#34;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$query&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Print out result<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$row = mysql_fetch_array&#40;$result&#41;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $row&#91;'SUM&#40;profit&#41;'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;br /&#62;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;?&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width=&#34;25%&#34;&#62;&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = &#34;SELECT COUNT&#40;horse&#41; FROM ***** WHERE pos ='1'&#34;; <br />&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$query&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;// Print out result<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$row = mysql_fetch_array&#40;$result&#41;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;Number of winners&#58;&#34;. $row&#91;'COUNT&#40;horse&#41;'&#93; .&#34; &#34;. $row&#91;'type'&#93; .&#34;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;br /&#62;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#60;td width=&#34;25%&#34;&#62;&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$query = &#34;SELECT COUNT&#40;horse&#41; FROM *****&#34;; <br />&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$query&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;// Print out result<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$row = mysql_fetch_array&#40;$result&#41;&#41;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;Number of qualifers&#58;&#34;. $row&#91;'COUNT&#40;horse&#41;'&#93; .&#34; &#34;. $row&#91;'type'&#93; .&#34;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;&#60;br /&#62;&#34;;<br />}<br />?&#62;&#60;/td&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/tr&#62;<br />&#60;/table&#62;<!--c2--></div><!--ec2--><br /><br />The plan is to have 30+ different filters for this data - can you see a suitable method for displaying this as a single table, or will I have to repeat the above code 30ish times?  Any advice appreciated, as always!]]></description>
		<pubDate>Fri, 23 Oct 2009 14:54:54 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28278</guid>
	</item>
	<item>
		<title>Need An Sql Statement For This...</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28276</link>
		<description><![CDATA[My table consist of following columns...<br />id(auto_increment),scrapto(int),scrapfrom(int),time(date/time),date(date/time),message(text)<br /><br />where scrapto and scrapfrom consists of member's id.<br />i want to pick up latest scraps of any member..<br />how can i do this...i thought i will first pick up all scraps of specific member ordered by date...but the problem is i also want to order them by time..how can i do both things ...is there any function in php through which i can sort the result which came out of an query... <br />thanks...]]></description>
		<pubDate>Fri, 23 Oct 2009 13:57:15 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28276</guid>
	</item>
	<item>
		<title>Php Files - Keep Out Of Web Directory Tree?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28271</link>
		<description>I am learning how all this works and one thing I came across is security issues on misconfigured servers. Seems that a php file might accidentally be read by someone accessing the web page if Apache is upgraded incorrectly or if the php module stops working... Is there a good reason to keep php files in the web accessible directory tree, or can I use a helper php file to just require the necessary file from outside the web tree? Seems to me this could stop my php files from leaking out.</description>
		<pubDate>Fri, 23 Oct 2009 10:58:09 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28271</guid>
	</item>
	<item>
		<title>Tables In  Mysql</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28269</link>
		<description><![CDATA[i would like to know what type,collation,chatacteristics,null ,e.t.c.  we put for  radio button and  checkbox in the tables of mysql databases that we have made parallels plesk control panel. <br />thanks]]></description>
		<pubDate>Fri, 23 Oct 2009 05:47:24 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28269</guid>
	</item>
	<item>
		<title>Problem With Datagridview</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28267</link>
		<description><![CDATA[Hello<br /><br />I'm Developing my first project on Vb.net.Now i'v small problem with mdi container.<br /><br />in my mdi container have toolbar,in that previous ,next buttons are there.<br /><br />in another form datagridview is there,now i want to move datagridview reselt set using that prev,next buttons(these buttons are in parent form).<br /><br />don't have any idea regarding that.pls help me any one.its very urgent to me<br /><br />Thanks is adavance...........]]></description>
		<pubDate>Fri, 23 Oct 2009 03:02:15 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28267</guid>
	</item>
	<item>
		<title>Dynamic Forms</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28265</link>
		<description><![CDATA[Hey all.<br /><br />I have some code that pulls data from a table for a form.<br /><br />The form displays fine but the printing of results is not as it should be.<br /><br />If all entries are checked the posted results only shows about half.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?PHP<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session_start&#40;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;include 'db.php';<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&#40;!$_POST&#91;'add'&#93;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo '&#60;form action=&#34;test.php&#34; method=&#34;POST&#34;&#62;';&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sql&nbsp;&nbsp;&nbsp;&nbsp;= &#34;SELECT * FROM &#96;features&#96; ORDER BY &#96;feature&#96; ASC&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$sql&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$r = mysql_fetch_array&#40;$result&#41;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $r&#91;'feature'&#93; . '&#60;input type=&#34;checkbox&#34; name=&#34;' . $r&#91;'feature'&#93; . '&#34; value=&#34;' . $r&#91;'feature'&#93; . '&#34;&#62;&nbsp;&nbsp;&#60;br&#62; ';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo '&#60;input type=&#34;submit&#34; value=&#34;Submit&#34; name=&#34;add&#34;&#62;';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo '&#60;/form&#62;';&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sql2&nbsp;&nbsp;&nbsp;&nbsp;= &#34;SELECT * FROM &#96;features&#96; ORDER BY &#96;feature&#96; ASC&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result2 = mysql_query&#40;$sql2&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&#40;$r2 = mysql_fetch_array&#40;$result2&#41;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$var = $r2&#91;'feature'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&#40;isset&#40;$_POST&#91;$var&#93;&#41;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $_POST&#91;$var&#93; . '&#60;br&#62;';&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />?&#62;<!--c2--></div><!--ec2--><br /><br />Any help would be great.<br /><br />Thank you]]></description>
		<pubDate>Thu, 22 Oct 2009 23:47:22 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28265</guid>
	</item>
	<item>
		<title>Need Explanation And Help</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28263</link>
		<description><![CDATA[Hi guys, i am attached to a property company. Recently i wish to extract data to find agents who has received more than the minimum percent commission. The table AGENT has 5% as the minimum percent commission<br /><br />I do the following statement Select agent_ID from AGENT where percent &gt; 5; and it failed. May i know why?<br /><br /><br />Secondly, why the NOT IN and &lt;&gt;ANY(not equal any) do not have the same effect, however &lt;&gt;ALL is equivalent to NOT IN.. why is that so? <img src="http://w3schools.invisionzone.com/style_emoticons/default/umnik2.gif" style="vertical-align:middle" emoid=":umnik2:" border="0" alt="umnik2.gif" />]]></description>
		<pubDate>Thu, 22 Oct 2009 22:31:47 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28263</guid>
	</item>
	<item>
		<title>While</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28261</link>
		<description><![CDATA[I want to stop a while loop after it displays 7 records. If there is only 4 records that it displayed, then it would fill in line 5, 6, and 7 with "No records"<br /><br />Any help would be great.]]></description>
		<pubDate>Thu, 22 Oct 2009 19:54:30 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28261</guid>
	</item>
	<item>
		<title>Displaying A Set Amount Of Data Per Page</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28258</link>
		<description><![CDATA[Hey guys,<br />I am currently working on a personal website, using only: XHMTL, CSS, PHP & MySQL. I have a simple MySQL database set up in which I will make blog posts. I am still a little new to PHP so I was wondering if there was a simple line of code to only display a certain amount of content per page. And then I can have a "previous entries." button which will display others. I am not going to be posting too many articles, just enough where I don't want them displayed all on one page. Any help would be greatly appreciated, and if I am not being as clear as I could be I will try and explain it a little better. Thanks a ton!<br />-Ant]]></description>
		<pubDate>Thu, 22 Oct 2009 16:18:36 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28258</guid>
	</item>
	<item>
		<title>Order By Number Of Entries</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28256</link>
		<description><![CDATA[Currently I am attempting to pull some data using:<br />$sql="select * from inspect_erp where inspection_id  = ".$myid." ORDER BY erp_type";<br /><br />the fields in the table are<br />erp_id, inspection_id, 	erp_type, gpslocation<br /><br />Basically, I am looking to alter this to have the SQL order by the most commonly occurring  erp_type to the least occuring. Can anyone help me out?]]></description>
		<pubDate>Thu, 22 Oct 2009 15:17:02 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28256</guid>
	</item>
	<item>
		<title>What Is The Best Way To Uniquely Identify Members?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28252</link>
		<description><![CDATA[I usually have a auto increment primary key which gives members a number in the order they registered in. However for my website I decided to to generate a random unique string for every member, e.g. HN98AYCNCSDJ9KSUWD. What's the best way to identify each member?]]></description>
		<pubDate>Thu, 22 Oct 2009 12:56:52 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28252</guid>
	</item>
	<item>
		<title>Ascii Collation</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28250</link>
		<description><![CDATA[Hi,<br /><br />I think this is right place to post it.<br /><br />What's the best collation for &#269; &#263; ž š &#273;<br /><br />I've tried latin, utf8 but it's still shows me some wierd chars<br /><br />Form sends text through ajax to registration file. And I've used echo $name and chars are shown fine.<br /><br />Also I have header at top of registration file for Windows-1250<br /><br /><br />Regards<br /><br /><br />EDIT: utf8_general_ci now seems to works fine <img src="http://w3schools.invisionzone.com/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />]]></description>
		<pubDate>Thu, 22 Oct 2009 10:22:14 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28250</guid>
	</item>
	<item>
		<title>Need Help Learning Java</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28249</link>
		<description><![CDATA[hi there<br />im currently studying java at college and need to learn it quickly.<br />but my problem is the teachers are telling me to use Greenfoot or Blue but when i look for tutorials on  the internet, they all tell me to use the command prompt. for example in the tutoriait will say "to compile and run the java program, open command prompt and do the javac command etc......."<br />can anyone help me where do i get the right tutorials from and how do i create the programs?? do i use the programs (BlueJ and Greenfoot) or command prompt]]></description>
		<pubDate>Thu, 22 Oct 2009 08:35:42 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28249</guid>
	</item>
	<item>
		<title>Records Keeping Duplicating In Db...</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28244</link>
		<description><![CDATA[I have a db that's supposed to have 236 records in it. For some odd reason, it suddenly has 634 and most of them are duplicates. It's as though the table is replicating itself and appending itself to the beginning of that table. I know it's the beginning because the first four hundred or so don't have the password included in any of the fields and it's not on my input form, yet. Here's my form to retrieve records from a query based on a username:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01 Transitional//EN&#34; &#34;http&#58;//www.w3.org/TR/html4/loose.dtd&#34;&#62;<br />&#60;html xmlns=&#34;http&#58;//www.w3.org/1999/xhtml&#34; xml&#58;lang=&#34;en&#34; lang=&#34;en&#34;&#62;<br />&#60;head&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;title&#62;Edit Profile&#60;/title&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;link href=&#34;CSS/profile.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;meta http-equiv=&#34;content-type&#34; content=&#34;text/html;charset=utf-8&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;meta http-equiv=&#34;Content-Style-Type&#34; content=&#34;text/css&#34;&#62;<br />&#60;/head&#62;<br />&#60;body&#62;<br />&#60;div class=&#34;centered_div&#34;&#62;<br />&#60;div class=&#34;header&#34;&#62;<br />My Will Made Easy - Attorney Profile Editor<br />&#60;/div&#62;<br />&#60;div class=&#34;profile_text&#34;&#62;<br />&#60;?php<br />$con = mysql_connect&#40;&#34;localhost&#34;,&#34;###&#34;,&#34;###&#34;&#41;;<br />if &#40;!$con&#41;<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;die&#40;'Could not connect&#58; ' . mysql_error&#40;&#41;&#41;;<br />&nbsp;&nbsp;}<br /><br />mysql_select_db&#40;&#34;bigsilkd_attorneys&#34;, $con&#41;;<br /><br />if &#40;!empty&#40;$_POST&#91;'users'&#93;&#41;&#41;<br />{<br />&nbsp;&nbsp;$result = mysql_query&#40;'SELECT * FROM attorneys WHERE users=&#092;'' . mysql_real_escape_string&#40;$_POST&#91;'users'&#93;&#41; . '&#092;''&#41; or exit&#40;mysql_error&#40;&#41;&#41;;<br />&nbsp;&nbsp;if &#40;$row = mysql_fetch_assoc&#40;$result&#41;&#41;<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;?&#62;<br />User Name&#58; &#60;input type=&#34;text&#34; size=&#34;20&#34; name=&#34;users&#34; value=&#34;&#60;?php echo $row&#91;'users'&#93;; ?&#62;&#34;&#62;<br />Password&#58; &#60;input type=&#34;text&#34; size=&#34;10&#34; name=&#34;password&#34; value=&#34;&#60;?php echo $row&#91;'password'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Law Firm Name&#58; &#60;input type=&#34;text&#34; size=&#34;60&#34; name=&#34;LawFirmName&#34; value=&#34;&#60;?php echo $row&#91;'LawFirmName'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Main Office Address&#58; &#60;input type=&#34;text&#34; size=&#34;60&#34; name=&#34;MainOfficeAddress&#34; value=&#34;&#60;?php echo $row&#91;'MainOfficeAddress'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />City&#58; &#60;input type=&#34;text&#34; name=&#34;MainOfficeCity&#34; value=&#34;&#60;?php echo $row&#91;'MainOfficeCity'&#93;; ?&#62;&#34;&#62;<br />ST&#58; &#60;input type=&#34;text&#34; size=&#34;3&#34; name=&#34;MainOfficeState&#34; value=&#34;&#60;?php echo $row&#91;'MainOfficeState'&#93;; ?&#62;&#34;&#62;<br />Zip&#58; &#60;input type=&#34;text&#34; size=&#34;10&#34; name=&#34;MainOfficeZip&#34; value=&#34;&#60;?php echo $row&#91;'MainOfficeZip'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Main Phone&#58; &#60;input type=&#34;text&#34; name=&#34;MainOfficePhone&#34; value=&#34;&#60;?php echo $row&#91;'MainOfficePhone'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Main Email Address&#58; &#60;input type=&#34;text&#34; name=&#34;MainOfficeEmail&#34; value=&#34;&#60;?php echo $row&#91;'MainOfficeEmail'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Website Address&#58; &#60;input type=&#34;text&#34; size=&#34;60&#34; name=&#34;WebAddress&#34; value=&#34;&#60;?php echo $row&#91;'WebAddress'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Firm Overview&#58; &#60;textarea name='Overview' rows='5' cols='40'value=&#34;&#60;?php echo $row&#91;'Overview'&#93;; ?&#62;&#34;&#62;&#60;/textarea&#62;&#60;br /&#62;<br />Years of Experience&#58; &#60;input type=&#34;text&#34; name=&#34;YearsofExperience&#34; value=&#34;&#60;?php echo $row&#91;'YearsofExperience'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Languages Spoken&#58; &#60;textarea name='Languages' rows='5' cols='40'value=&#34;&#60;?php echo $row&#91;'Languages'&#93;; ?&#62;&#34;&#62;&#60;/textarea&#62;&#60;br /&#62;<br />Geographical Areas Serving&#58; &#60;textarea name='GeographiesServing' rows='5' cols='40'value=&#34;&#60;?php echo $row&#91;'GeographiesServing'&#93;; ?&#62;&#34;&#62;&#60;/textarea&#62;&#60;br /&#62;<br />Areas of Legal Practice&#58; &#60;textarea name='PracticeAreas' rows='5' cols='40'value=&#34;&#60;?php echo $row&#91;'PracticeAreas'&#93;; ?&#62;&#34;&#62;&#60;/textarea&#62;&#60;br /&#62;<br />Primary Attorney's Name&#58; &#60;input type=&#34;text&#34; name=&#34;MainAttorneyName&#34; value=&#34;&#60;?php echo $row&#91;'MainAttorneyName'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Primary Attorney's Phone Number&#58; &#60;input type=&#34;text&#34; name=&#34;MainAttorneyPhone&#34; value=&#34;&#60;?php echo $row&#91;'MainAttorneyPhone'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />Primary Attorney's Email Address&#58; &#60;input type=&#34;text&#34; name=&#34;MainAttorneyEmail&#34; value=&#34;&#60;?php echo $row&#91;'MainAttorneyEmail'&#93;; ?&#62;&#34;&#62; &#60;br /&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;?php<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;else<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo 'Username not found.';<br />&nbsp;&nbsp;&nbsp;&nbsp;?&#62;<br />&#60;div class=&#34;profile_text&#34;&#62;<br />&#60;form action=&#34;retrieve2.php&#34; method=&#34;post&#34;&#62;<br />&nbsp;&nbsp;User name&#58; &#60;input type=&#34;text&#34; size=&#34;90&#34; name=&#34;users&#34; value=&#34;&#60;?php echo $_POST&#91;'users'&#93;; ?&#62;&#34;&#62;<br />&#60;/form&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;?php<br />&nbsp;&nbsp;}<br />}<br />else<br />{<br />&nbsp;&nbsp;echo 'You must enter a user';<br />}<br />?&#62;<br />&#60;/div&#62;<br />&#60;/div&#62;<br />&#60;/body&#62;<br />&#60;/html&#62;<!--c2--></div><!--ec2--><br /><br />And here's what I'm using to input records:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />$con = mysql_connect&#40;&#34;localhost&#34;,&#34;###&#34;,&#34;###&#34;&#41;;<br />if &#40;!$con&#41;<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;die&#40;'Could not connect&#58; ' . mysql_error&#40;&#41;&#41;;<br />&nbsp;&nbsp;}<br /><br />mysql_select_db&#40;&#34;bigsilkd_attorneys&#34;, $con&#41;;<br /><br />$sql=&#34;INSERT INTO attorneys &#40;LawFirmName, MainOfficeAddress, MainOfficeCity, MainOfficeState, MainOfficeZip, MainOfficePhone, MainOfficeEmail, WebAddress, Overview, YearsofExperience, Languages, GeographiesServing, PracticeAreas, MainAttorneyName, MainAttorneyPhone, MainAttorneyEmail&#41;<br />VALUES<br />&#40;'$_POST&#91;LawFirmName&#93;','$_POST&#91;MainOfficeAddress&#93;','$_POST&#91;MainOfficeCity&#93;','$_POST&#91;MainOfficeState&#93;','$_POST&#91;MainOfficeZip&#93;','$_POST&#91;MainOfficePhone&#93;','$_POST&#91;MainOfficeEmail&#93;','$_POST&#91;WebAddress&#93;','$_POST&#91;Overview&#93;','$_POST&#91;YearsofExperience&#93;','$_POST&#91;Languages&#93;','$_POST&#91;GeographiesServing&#93;','$_POST&#91;PracticeAreas&#93;','$_POST&#91;MainAttorneyName&#93;','$_POST&#91;MainAttorneyPhone&#93;','$_POST&#91;MainAttorneyEmail&#93;'&#41;&#34;;<br /><br />if &#40;!mysql_query&#40;$sql,$con&#41;&#41;<br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;die&#40;'Error&#58; ' . mysql_error&#40;&#41;&#41;;<br />&nbsp;&nbsp;}<br />echo &#34;1 record added&#34;;<br /><br />mysql_close&#40;$con&#41;<br />?&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Thu, 22 Oct 2009 01:06:40 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28244</guid>
	</item>
	<item>
		<title>Where Conditions</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28240</link>
		<description><![CDATA[The where statement can become a very trick.  It beccome even more fun when your try to create neg.  logica.  here a EG.<br /><br />In a program I might write:<br /><br /> if ( ( Products.Category = 'A' or Products.Category is Null ) or ( not ( Products.Category = 'A' or Products.Category is Null ) and (Invoices_Products.ProdAmount = 0 or Invoices_Products.ProdQty = 0 ) )...<br /><br />In this case the not ( ) make a true answer falus and a falus answer true.  Is this valid syntax for SQL?  If so is the valid for SQL 92?]]></description>
		<pubDate>Wed, 21 Oct 2009 17:13:59 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28240</guid>
	</item>
	<item>
		<title>How Does Content-type Affect Php Processing Of Post Variables</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28239</link>
		<description><![CDATA[I am creating an XMLHttpRequest object in javascript and sending POST variables to my php script. The Content-Type has to be set to x-www-form-urlencoded. Why is this? Can someone explain how the Content-Type affects the way php sees the data?<br /><br />The $HTTP_POST_RAW_DATA had my variables before I set the content-type but the $_POST variables were empty. With the content-type set correctly the $_POST variables look good, and $HTTP_POST_RAW_DATA is blank. This is fine with me, but I'd like to understand why this happens.... the sequence of events. I'm using Apache with PHP.<br /><br />Thank you,<br />]]></description>
		<pubDate>Wed, 21 Oct 2009 13:57:31 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28239</guid>
	</item>
	<item>
		<title>Sql Error</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28234</link>
		<description><![CDATA[I made this query <br />$rs = odbc_exec($con, "UPDATE Data SET lastlogin='" . date("D d F, Y") . "',active=0 WHERE id=" . $id . ";");<br /><br />the error was<br /><b>Warning</b>: odbc_exec() [<a href="http://localhost/php_new/function.odbc-exec" target="_blank">function.odbc-exec</a>]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression., SQL state 22005 in SQLExecDirect in <b>C:&#092;Inetpub&#092;wwwroot&#092;php_new&#092;out.php</b> on line <b>6<br /><br />here is my database<br /></b>http://rapidshare.com/files/295944268/Data.mdb.html<br /><br />Please Hep me with this...<br /> thanks...<br /><br /><br /><br />]]></description>
		<pubDate>Wed, 21 Oct 2009 08:46:29 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28234</guid>
	</item>
	<item>
		<title>Some Problems With An Excel Query, Help Me!</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28232</link>
		<description><![CDATA[Well... I´m having problems making an Excell Query. I am trying to print on screen the fields but it doesn't works. <br />The problem is that I only can print the numeric fields of the first query´s column (6 fields per row) and when I try to print the alfanumerics fields it doesn´t shows anything.<br /><br />In Excell i have this values:<br />==================<br />440700<br />485800<br />578300<br />585000<br />595100<br />B00400<br />E58700<br />EA37800<br />EA49800<br />EA49900<br />NB00400<br />PA12600<br />594800<br />594900<br />595000<br /><br />But when i display the results it shows this:<br />============================<br />440700<br />485800<br />578300<br />585000<br />595100<br /><br /><br /><br /><br /><br /><br /><br />594800<br />594900<br />595000<br /><br />Can sombody help me please????<br /><br /><br />]]></description>
		<pubDate>Wed, 21 Oct 2009 07:29:04 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28232</guid>
	</item>
	<item>
		<title>File Uploader - Then Make New Page</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28228</link>
		<description><![CDATA[After hours of research.. I cant find a solution so here goes.<br /><br />I need a script (or name of the function) that when a person uploads a file, it'll upload it, and make a new page automatically with a built template, and list it.<br /><br />A good example..<br /><a href="http://epicwar.com/maps/" target="_blank">http://epicwar.com/maps/</a><br /><br />You upload, it pick the type, and it will make a new page with a random url (or named) for others to download.<br /><br />Any help will be appreciated.<br />Thanks!]]></description>
		<pubDate>Tue, 20 Oct 2009 22:40:43 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28228</guid>
	</item>
	<item>
		<title>Read</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28223</link>
		<description><![CDATA[Do you need to know php to make a browser based text game?<br /><br /><br />Also if anyone knows how to make one please pm me thanks.]]></description>
		<pubDate>Tue, 20 Oct 2009 18:21:53 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28223</guid>
	</item>
	<item>
		<title>Adding A Confirmation Page To My Contact Us Php Page</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28208</link>
		<description><![CDATA[Hi,<br /><br />I had this code form the net .. it's a php Contact Us form.  Everything works fine and it does exactly what I need, except if someone can help me with this minor thing.. right now it uses a generic 'Email Received Confirmation page' but I'd like to change it to my confirmation.html page and then after 4 seconds redirected back to the Contact Us page.. Anyone can help with this?  thanks..  Here's the code I'm using.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br /><br />/* Email Variables */<br /><br />$emailSubject = 'contactformprocess!';<br />$webMaster = 'info@risksolutions.ca';<br /><br /><br />/* Data Variables */<br /><br />$email = $_POST&#91;'email'&#93;;<br />$name = $_POST&#91;'name'&#93;;<br />$comments = $_POST&#91;'comments'&#93;;<br /><br />$body = &#60;&#60;&#60;EOD<br />&#60;br&#62;&#60;hr&#62;&#60;br&#62;<br />Name&#58; $name &#60;br&#62;<br />Email&#58; $email &#60;br&#62;<br />Comments&#58; $comments &#60;br&#62;<br />EOD;<br /><br /><br />$headers = &#34;From&#58; $email&#092;r&#092;n&#34;;<br />$headers .= &#34;Content-type&#58; text/html&#092;r&#092;n&#34;;<br />$success = mail&#40;$webMaster, $emailSubject, $body,<br />$headers&#41;;<br /><br /><br />/* Results rendered as HTML */<br /><br />$theResults = &#60;&#60;&#60;EOD<br />&#60;html&#62;<br />&#60;head&#62;<br />&#60;title&#62;sent message&#60;/title&#62;<br />&#60;meta http-equiv=&#34;refresh&#34; content=&#34;4;URL=http&#58;//www.risksolutions.ca/ContactUS.php&#34;&#62;<br />&#60;style type=&#34;text/css&#34;&#62;<br /><br />&lt!--<br />body {<br />background-color&#58; #FFF;<br />font-family&#58; Arial, Helvetica, sans-serif;<br />font-size&#58; 20px;<br />font-style&#58; normal;<br />line-height&#58; normal;<br />font-weight&#58; normal;<br />color&#58; #fec001;<br />text-decoration&#58; none;<br />padding-top&#58; 200px;<br />margin-left&#58; 150px;<br />width&#58; 800px;<br />}<br /><br />--&gt;<br />&#60;/style&#62;<br />&#60;/head&#62;<br />&#60;div align=&#34;center&#34;&#62;&#34;We have received your email and we will respond as soon as possible.!<br />You will return to the Contact Us page in a few seconds. Thank you. !&#34;&#60;/div&#62;<br /><br />&#60;/div&#62;<br />&#60;/body&#62;<br />&#60;/html&#62;<br />EOD;<br />echo &#34;$theResults&#34;;<br />?&#62;<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Tue, 20 Oct 2009 11:11:19 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28208</guid>
	</item>
	<item>
		<title>How To Be A Mysql Dba?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28207</link>
		<description><![CDATA[how to be a MySQL DBA from a beginner? and what's the prospective of this career in USA or Canada?<br />besides, I learned that Oracle is popular recently, whether it is used most often than MySQL nowadays? <br /><br />any experts who can guide me, very important to me!<br /><br />thank you all!]]></description>
		<pubDate>Tue, 20 Oct 2009 10:53:50 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28207</guid>
	</item>
	<item>
		<title>E-invoicing</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28206</link>
		<description><![CDATA[I don't know if this is the right place to post this topic, but I'll give it a try.<br /><br />I would like to start emailing customers their invoices. I am looking for information on what the best practices are for doing this. For example, should the email be password protected? Should a link be sent in their email to view the invoice or should the invoice be embedded in the email itself? What's the best way to prevent these emails from being rejected by Spam filters?<br /><br />If anyone has set up emailing invoices before and can give me some helpful pointers or if there are any good articles out there that can answer some of my questions, I would be interested in hearing about them.<br /><br />Thanks.]]></description>
		<pubDate>Tue, 20 Oct 2009 10:32:19 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28206</guid>
	</item>
	<item>
		<title>How To Sum The Amount From Table Field?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28203</link>
		<description><![CDATA[i have databse name "prj"<br />table name "inf".<br />which have 3 fields.<br />1. id<br />2. item<br />3. price<br /><br />i display the page on the id, item 7 price.<br /><br />now i want to sum the price amount in the page which show the total amount of the whole price field.<br /><br />thanks]]></description>
		<pubDate>Tue, 20 Oct 2009 00:56:42 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28203</guid>
	</item>
	<item>
		<title>Sql Resultset Not Returning *solved*</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28201</link>
		<description><![CDATA[Hi,<br /><br />I'm creating a simple class that queries an SQL database and returns a resultSet.  I'm testing the class with another java file with a main() method so I can actually create the object from my querydb class and attempt to access the resultSet.<br /><br />The problem is, when I try accessing the resultSet in main(), it's looking like the result set is empty.  But I know for a fact that it's retrieving the records because I put a (while result.next()){ //output column_name} in the method that actually executes the SQL statement (which works in SQL btw) and I can see all the results.  However, if I try to do the same in main(), it simply skips the while loop as if there are no records in the ResultSet.<br /><br />Here is the code of my querydb class:<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>/*<br /><br />package querydb;<br /><br /><br />import java.sql.*;<br /><br /><br />public class Querydb {<br /><br />    //Class variables<br />    Connection conn = null;             //Connection object for MySQL connection<br />    ResultSet queryResults;             //SQL results<br /><br /><br />    //Constructor<br />    //Query DB for events within a specific primary and secondary category<br />    public Querydb(String event_Category_Primary, String event_Category_Secondary){<br />        getConnection();<br />        executeStatement(event_Category_Primary, event_Category_Secondary);<br />        terminateConnection();<br />    }<br /><br /><br />    //Pepares SQL statement based on arguments received by constructor<br />    //Events within a specific primary & secondary category are returned<br />    public void executeStatement(String event_Category_Primary, String event_Category_Secondary){<br /><br />        try{<br />            //Prepare and execute statement for SQL query<br />            System.out.println("QUERYDB: Executing query for all elements under: " + event_Category_Primary + " | " + event_Category_Secondary);<br />            Statement stmt = conn.createStatement();<br />            queryResults = stmt.executeQuery("SELECT * FROM mydb.events " +<br />                    "WHERE event_Category_Primary = '" + event_Category_Primary + "' AND event_Category_Secondary = '" + event_Category_Secondary + "' " +<br />                    "ORDER BY CASE " +<br />                    "WHEN event_startYearSuffix = 'MYA' THEN 1000000 * event_Start " +<br />                    "WHEN event_startYearSuffix = 'AD' THEN -1 * event_Start " +<br />                    "ELSE event_Start END;");<br />           <br />           //THIS WORKS - I CAN SEE ALL RESULTS AT THIS POINT IN queryResults<br />            while (queryResults.next()){<br />                System.out.println("QUERYDB: event_Name = " + queryResults.getString("event_Name"));<br />            }<br /><br /><br />        }<br />        catch (Exception e)<br />        {<br />            System.out.println("QUERYDB: Cannot create SQL Statement: " + e);<br />        }<br />    }<br /><br /><br /><br /><br />    //Initiates DB connection with MySQL server<br />    public void getConnection(){<br /><br />        System.out.println("QUERYDB: Connecting to DB...");<br />        try<br />        {<br />            String userName = "test";<br />            String password = "test";<br />            String url = "jdbc:mysql://localhost:3360/mydb";<br />            Class.forName("com.mysql.jdbc.Driver");<br />            conn = DriverManager.getConnection(url, userName, password);<br />            System.out.println("QUERYDB: Database connection established!");<br />        }<br />        catch (Exception e)<br />        {<br />            System.err.println("QUERYDB: Cannot connect to database");<br />            System.out.println(e);<br />        }<br />    }<br /><br /><br />    //Terminates the MySQL DB connection<br />    public void terminateConnection(){<br /><br />        //Attempt to terminate the connection<br />        try{<br />            System.out.println("QUERYDB: Closing DB connection...");<br />            conn.close();<br />        }<br />        catch (Exception e){<br />            System.out.println(e);<br />        }<br /><br />    }     <br />}</div><br /><br /><br /><br /><br /><br />This is the main() java file that I use to try to access the resultSet<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><br />package querydb;<br /><br />import java.sql.*;<br /><br /><br /><br />public class testInterface {<br /><br />    public static void main(String[] args) throws SQLException{<br /><br /><br />        System.out.println("TestInterface: Creating Querydb ojbect...");<br />        Querydb qdbObj = new Querydb("What", "Arts");<br />        <br />        String s = null;<br /><br /><br /><br /><br />        try{<br />         //DOES NOT WORK - I CANNOT SEE THE RESULTS<br />         while(qdbObj.queryResults.next()){<br />             System.out.println("If you can read this, queryResults is not null");<br />         }<br />        } catch (SQLException e){}<br /><br />    }<br /><br />}</div><br /><br /><br />Again, the SQL query works and I've triple checked the prepared select statement in my querydb class.   It seems to work within the querydb class only within that method.  It's as if once it leaves the method, the resultSet disappears.<br /><br /><br />Any ideas?   This is definitely some lousy programming on my part, but any help is appreciated <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br /><br />Thank you.]]></description>
		<pubDate>Mon, 19 Oct 2009 21:06:46 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28201</guid>
	</item>
	<item>
		<title>Need A Pop-up Executed From Php</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28198</link>
		<description><![CDATA[I have a page that after capturing data from a form (via $_POST), an email is sent, and  I need to be able to display a success or failure alert box type message.  Success or failure are not known until the php script which, executes as a result of an if isset..., attempts to send the email.  At that point I need for the appropriate message to pop up, and remain visible until the user clicks on an OK or Close button.  <br /><br />I looked through jQuery, but most everything I found there uses javascript functions, and I can't seem to make javascript work, because I haven't found a way to execute a javascript function from a php script.  Some of the jQuery plug-ins were beyond my ken to understand how to use them, let alone whether they'll work the way I need them to.  Here's my php code that sends the email:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>		$to		 = "creacontech@windstream.net";<br />		$from	 = "rob@creacontech.com";<br />		$headers = "From: $from";<br />		$subject = "WOTC Questionnaire Report Request";<br />		$message = $cust." has executed a WOTC Questionnaire for: &#092;n &#092;n".<br />					" ".$arrappl[fullname].", SSN: ".$arrappl[ssn].", DOB: ".$arrappl[dob].<br />					", ".$arrappl[race].", ".$######."&#092;n Address: ".$address.", ".<br />					$arrappl[city].", ".$arrappl[state].", ".$arrappl[zip].", Phone: ".<br />					$arrappl[phone]."&#092;n &#092;n Recruited By: ".$arrappl[recname].", Title: "<br />					.$arrappl[rectitl].", Phone: ".$arrappl[recphn].", Extn: ".$arrappl[recphnext].<br />					"&#092;n Address: ".$rcraddr.", ".$arrappl[reccity].", ".<br />					$arrappl[recstate].", ".$arrappl[reczip]."&#092;n Email: ".$arrappl[recemail].<br />					"&#092;n &#092;n and has requested the following reports: &#092;n &#092;n";<br />		for ($i=0; $i&lt;=$numreps; $i++)<br />		{<br />			$message = $message.$arrpsel[$i]."; ";<br />		}<br /><br />		if (mail($to,$subject,$message,$headers))<br />		{<br />			printf("The following email was sent:&lt;br /&gt;&lt;br /&gt;    To:  %s&lt;br /&gt;&lt;br /&gt;Subj:  %s&lt;br /&gt;<br />				   &lt;br /&gt;Your WOTC Questionnaire for:&lt;br /&gt;&lt;br /&gt;  Name:  %s",<br />				   $to,$subject,$arrappl[fullname]);<br />		}<br />		else<br />		{<br />			echo "&lt;br /&gt;An ERROR was encountered and the email WAS NOT SENT&lt;br /&gt;<br />			Contact your webmaster for assistance.&lt;br /&gt;&lt;br /&gt;";<br />		}<br />	<br />	<br /></div><br /><br />I think there was a little censoring action up there; the $###### in the message should be $###### - it's the gender of the applicant, Male or Female.<br /><br />Naturally those "printf's" are for debugging purposes, since what they display isn't visible on the finished form.  I tried using a hidden field and then un-hiding it following the above code.  That didn't work either, because the when the field is unhidden, it just blinks for an instant, and then the page refreshes itself (even if I don't have it go to the next page).  I'm incredulous that php isn't capable of displaying an alert type box, or if it can, I haven't found out how anywhere.<br /><br />Can someone please help me with this?  I can't believe that this is so difficult to do.]]></description>
		<pubDate>Mon, 19 Oct 2009 17:19:43 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28198</guid>
	</item>
	<item>
		<title>Importing Into Mysql Database</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28197</link>
		<description><![CDATA[I need to import TEST.TXT (located in the same directory as my script<br /><br />It has 1 Record: "6","Lunch","234"<br /><br />Iget this error message: Warning: mysqli_close() expects exactly 1 parameter, 0 given in C:&#092;wamp&#092;www&#092;test&#092;import.php on line 19<br /><br />Why?<br /><br />Heres my script:<br /><br />&lt;?php<br />// Connect to the MySQL server and select the corporate database<br />$mysqli = new mysqli("localhost","user,"password,"test");<br />// Open and parse the test.txt file<br />$fh = fopen("test.txt", "r");<br />while ($line = fgetcsv($fh, 1000, ","))<br />{<br />$id = $line[0];<br />$item = $line[1];<br />$price = $line[2];<br /><br />// Insert the data into the sales table<br />$query = "INSERT INTO example SET id='$id',<br />item='$item', price='$price'";<br /><br />$result = $mysqli-&gt;query($query);<br />}<br />fclose($fh);<br />mysqli_close();<br />?&gt;]]></description>
		<pubDate>Mon, 19 Oct 2009 15:48:58 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28197</guid>
	</item>
	<item>
		<title>Select Last 10 Results In Asc Order</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28196</link>
		<description><![CDATA[I want to select the most recent 10 results from a table, but to fetch them in reverse order.  I am playing around with a chat app and so far it fetches the most recent 10 items with this line:<br /><br />$new = "SELECT * FROM &#96;buffer&#96; ORDER BY time_added DESC LIMIT 10";<br /><br />This returns the correct results, but when I echo them they are in the wrong order - most recent is at the top.  I want to have the most recent message display at the bottom, as is the norm for a chat room/IM window.  I am aware of array_reverse, but can't get it to work.  I store the mysqli array in a variable, reverse it and try to while through the array and my ajax call times out.  I would like to create a single query that selects in ascending order but uses as the start limit the total number of rows -10.  I tried LIMIT (COUNT(*)-10), 10 and a few other ways of putting it but got nowhere.]]></description>
		<pubDate>Mon, 19 Oct 2009 15:20:36 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28196</guid>
	</item>
	<item>
		<title>$_files Question</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28195</link>
		<description><![CDATA[What happens with a $_FILES variable after the page changes/is closed if you don't copy it somewhere? Does it remain in a tmp-dir indefinitely?]]></description>
		<pubDate>Mon, 19 Oct 2009 15:14:07 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28195</guid>
	</item>
	<item>
		<title><![CDATA[Decimals & Leading Zero Question]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28194</link>
		<description><![CDATA[Hey,<br /><br />I got some numbers to perform some basic maths on. Little problem with it, is that some numbers are regular ints, while others look like this: "1,234". If I do those maths on the latter type, they'll lose everything after the comma. I want to keep everything behind the comma as well, though.<br /><br />Also, they have leading zeroes. How can I keep those as well?<br /><br />Thanks in advance,<br /><br />Kon-Tiki]]></description>
		<pubDate>Mon, 19 Oct 2009 14:27:46 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28194</guid>
	</item>
	<item>
		<title>Link To Subdirectory Not Working</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28193</link>
		<description><![CDATA[I've tried to create a hyperlink to a sub-folder using Dreamweaver 8, for a .php web page, but have been unsuccessful. Everytime the link is clicked, it opens up the existing document in that subfolder.<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;a href="&#092;&#092;csvg003file3&#092;GROUP&#092;Safety&#092;Security"</div><br /><br />Any suggestions on how to get the link to only open up the folder to display the contents is much appreciated.<br /><br />Thanks!]]></description>
		<pubDate>Mon, 19 Oct 2009 11:25:40 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28193</guid>
	</item>
	<item>
		<title>Fire Off .exe On Remote Machine</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28188</link>
		<description><![CDATA[Hello,<br /><br />C# newbie here.  I am running an executable on a remote machine with the following code:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Process remoteProcess = new Process&#40;&#41;;<br /><br />ProcessStartInfo remoteProcessStartInfo = new ProcessStartInfo&#40;&#41;;<br />remoteProcessStartInfo.CreateNoWindow = true;<br />remoteProcessStartInfo.ErrorDialog = false;<br />remoteProcessStartInfo.RedirectStandardError = false;<br />remoteProcessStartInfo.RedirectStandardOutput = false;<br />remoteProcessStartInfo.UseShellExecute = false;<br />remoteProcessStartInfo.FileName = &#34;&#092;&#092;&#092;&#092;&#60;remote_machine&#62;&#092;&#092;winnt&#092;&#092;NOTEPAD.EXE&#34;;<br /><br />remoteProcess.StartInfo = remoteProcessStartInfo;<br /><br />remoteProcess.Start&#40;&#41;;<br />remoteProcess.WaitForExit&#40;&#41;;<br />remoteProcess.Dispose&#40;&#41;;<!--c2--></div><!--ec2--><br /><br />This accomplishes part of what I want to do.  However, what I am seeing is that notepad is opening up on my local machine.  It almost looks like it's downloading an instance of the notepad exe and running it locally.  What I am looking to do is run it on the remote machine and have it open up there.<br /><br />Any assistance/direction would be greatly appreciated.<br /><br />Thanks in advance.]]></description>
		<pubDate>Mon, 19 Oct 2009 10:55:55 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28188</guid>
	</item>
	<item>
		<title>Getting Deeper... Displaying Records To Edit</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28186</link>
		<description><![CDATA[Ok, so I have a form to enter data into a db. But soon 2000 new records are going into this db and there is going to have be a way to search for, retrieve and edit records individually.<br /><br />I assume I'll use the SELECT FROM WHERE, but the tutorial explains it as WHERE is hard-coded into the request. The SELECT and FROM are given, of course.<br /><br />Baby steps.<br /><br />Can I use the same form used to create a new record in the db to display a record for editing? Or does it need to be a different form?<br /><br />This is the code from the tutorial. How do I make it so I can enter the WHERE and SUBMIT it to query the db and return the results in a form for editing?<br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->&lt;?php<br />$con = mysql_connect("localhost","peter","abc123");<br />if (!$con)<br />  {<br />  die('Could not connect: ' . mysql_error());<br />  }<br /><br />mysql_select_db("my_db", $con);<br /><br />$result = mysql_query("SELECT * FROM Persons<br />WHERE FirstName='Peter'");<br /><br />while($row = mysql_fetch_array($result))<br />  {<br />  echo $row['FirstName'] . " " . $row['LastName'];<br />  echo "&lt;br /&gt;";<br />  }<br />?&gt;<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Here's an example of the form I want to be able to edit the record with.<br /><br /><a href="http://bigsilkdesign.com/will/firm_profile.php" target="_blank">View the form</a><br /><br />It's the input form. So, what I'm looking to do is to be able to type in a unique identifier (username), click SUBMIT to find the record,  and have it populate the form fields for editing and then allow the user to UPDATE the record.]]></description>
		<pubDate>Mon, 19 Oct 2009 09:54:01 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28186</guid>
	</item>
	<item>
		<title>How To Fetch An Array Of Column Names From A Table</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28184</link>
		<description>Title says it all really.  If I had a table with unknown columns and I wanted to return a list of column names, how can I do it without selecting any particular row?  I know I could just select a record and foreach through them, extracting the keys, but is there a way without actually extracting any particular record?</description>
		<pubDate>Sun, 18 Oct 2009 19:57:56 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28184</guid>
	</item>
	<item>
		<title>Refreshing Variables On Screen</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28183</link>
		<description><![CDATA[This is probably a simple question. But I have no idea what keywords to use in google so had to post here.<br /><br />What I'm trying to do is this:<br />I want to show a variable in a loop. In that loop the variable changes untill the user ends the loop.<br />Now I want to refresh the variable but not the whole page. So obviously<br /><br />while 1 {<br />print("variable: $value");<br />$value = $value + rand(2,5);<br />}<br /><br />will not work. What will?<br />]]></description>
		<pubDate>Sun, 18 Oct 2009 17:13:59 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28183</guid>
	</item>
	<item>
		<title>Custom Cms: Basic Questions</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28182</link>
		<description><![CDATA[Hi,<br /><br />I'm trying to build my own cms.<br />Everything is going fine so far but I'm at the point where I want my content divided into articles. The main page would just show snippets of the articles and you can press "read more" to redirect the user to the full article. I have my database divided into navigation, pages, and users. I'm stumped as to what I should do with the php and with the database to get this effect. Any tips to get me going in the right direction? Also, part of the problem is that I don't know the right vocabulary to find apropriate tutorials i.e. looking up " 'read more' cms php tutorial" is useless, so any terminology tips would be helpful too!<br /><br />Thanks!<br /><br />]]></description>
		<pubDate>Sun, 18 Oct 2009 15:53:57 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28182</guid>
	</item>
	<item>
		<title>My First Foray Into Mysql</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28181</link>
		<description><![CDATA[I set up a db in MySQL through cPanel. It's there. I see it.<br /><br />I'm trying to create a table in which to store data from an online form.<br /><br />I'm not quite sure how to create the table in the db. I believe I have the right code:<br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->&lt;?php<br />$con = mysql_connect("localhost","***","***");<br />if (!$con)<br />  {<br />  die('Could not connect: ' . mysql_error());<br />  }<br /><br />// Create table<br />mysql_select_db("bigsilkd_attorneys", $con);<br />$sql = "CREATE TABLE attorneys<br />(<br />attoneyID int NOT NULL AUTO_INCREMENT, <br />PRIMARY KEY(attorneyID),<br />LawFirmName varchar(30),<br />MainOfficeAddress varchar(30),<br />MainOfficeCity varchar(30),<br />MainOfficeState varchar(2),<br />MainOfficeZip varchar(10),<br />MainOfficePhone varchar(30),<br />MainOfficeEmail varchar(30),<br />WebAddress varchar(30),<br />Overview varchar(30),<br />YearsofExperience int (3),<br />Languages varchar(30),<br />GeographiesServing varchar(30),<br />PracticeAreas varchar(30),<br />MainAttorneyName varchar(30),<br />MainAttorneyPhone varchar(30),<br />MainAttorneyEmail varchar(30),<br />)";<br /><br />// Execute query<br />mysql_query($sql,$con);<br /><br />mysql_close($con);<br />?&gt;<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />But when I fill out the form and hit the Submit button:<br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->&lt;form action="insert.php" method="post"&gt;<br />  Law Firm Name: &lt;input type="text" size="90" name="LawFirmName"&gt;&lt;br&gt;<br />  'Tag Line': &lt;input type="text" size="95" name="p_subtitle"&gt;&lt;br&gt;<br />  Your Name: &lt;input type="text" size="97" name="p_name"&gt;&lt;br&gt;<br />  Office Street Address: &lt;input type="text" size="77" name="MainOfficeAddress"&gt;&lt;br&gt;<br />  Office City: &lt;input type="text" size="22" name="MainOfficeCity"&gt;<br />  Office State: &lt;select name="MainOfficeState" size="1"&gt;<!--QuoteEnd--></div><!--QuoteEEnd--><br />(There's more to the form, I'm just excluding it for the sake of cleanliness.)<br /><br />I get this:<br /><br />Error: Table 'bigsilkd_attorneys.attorneys' doesn't exist<br /><br />I assume that CREATE TABLE needs to be run once, but I'm not sure how to get it to run, or whether or not I was successful. It's apparent I wasn't.<br /><br />Here's insert.php:<br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->&lt;?php<br />$con = mysql_connect("localhost","***","***");<br />if (!$con)<br />  {<br />  die('Could not connect: ' . mysql_error());<br />  }<br /><br />mysql_select_db("bigsilkd_attorneys", $con);<br /><br />$sql="INSERT INTO attorneys (LawFirmName, MainOfficeAddress, MainOfficeCity, MainOfficeState, MainOfficeZip, MainOfficePhone, MainOfficeEmail, WebAddress, Overview, YearsofExperience, Languages, GeographiesServing, PracticeAreas, MainAttorneyName, MainAttorneyPhone, MainAttorneyEmail)<br />VALUES<br />('$_POST[LawFirmName]','$_POST[MainOfficeAddress]','$_POST[MainOfficeCity]','$_POST[MainOfficeState]','$_POST[MainOfficeZip]','$_POST[MainOfficePhone]','$_POST[MainOfficeEmail]','$_POST[WebAddress]','$_POST[Overview]','$_POST[YearsofExperience]','$_POST[Languages]','$_POST[GeographiesServing]','$_POST[PracticeAreas]','$_POST[MainAttorneyName]','$_POST[MainAttorneyPhone]','$_POST[MainAttorneyEmail]')";<br /><br />if (!mysql_query($sql,$con))<br />  {<br />  die('Error: ' . mysql_error());<br />  }<br />echo "1 record added";<br /><br />mysql_close($con)<br />?&gt;<!--QuoteEnd--></div><!--QuoteEEnd--><br />]]></description>
		<pubDate>Sun, 18 Oct 2009 15:12:04 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28181</guid>
	</item>
	<item>
		<title>Registration Script Revisited</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28180</link>
		<description><![CDATA[I was messing with my registration script, simplifying the form sanitization by using a loop and on testing it, noticed that it fails to create the appropriate record in the aromaAddress table, but it makes the insertion into aromaMaster.  These won't mean anything, of course, but aromaMaster holds usernames, emails, passwords, while aromaAddress holds...you guessed it.  I also noticed that someone registered that wasn't one of my own guff trial entries, but I tried e-mailing them and got a mailer daemon.  Who was it - I know it was one of you!  Anyway, here is the script, please see if you can spot why it would fail to create the aromaAddress record:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />session_start&#40;&#41;;<br />include_once&#40;&#34;db_include.php5&#34;&#41;;<br />doDB&#40;&#41;;<br /><br />if&#40;!$_POST&#41; {<br />&nbsp;&nbsp;//come directly via address bar<br />&nbsp;&nbsp;header&#40;&#34;Location&#58; contact.php5&#34;&#41;;<br />&nbsp;&nbsp;exit;<br />}<br /><br />//sanitize input<br />$_CLEAN = array&#40;&#41;;<br /><br />foreach&#40;$_POST as $k=&#62;$v&#41; {<br />if&#40;preg_match&#40;&#34;/sername/&#34;, $k&#41;&#41; {<br />&nbsp;&nbsp;$v = check_chars_username&#40;$v&#41;;<br />} else if&#40;preg_match&#40;&#34;/mail/&#34;, $k&#41;&#41; {<br />&nbsp;&nbsp;$v = check_chars_email&#40;$v&#41;;<br />} else&nbsp;&nbsp;{<br />&nbsp;&nbsp;$v = check_chars_address&#40;$v&#41;;<br />}<br />$v = mysqli_real_escape_string&#40;$mysqli,&#40;trim&#40;$v&#41;&#41;&#41;;<br />$_CLEAN&#91;$k&#93; = $v;<br />if&#40;!preg_match&#40;&#34;/assword/&#34;, $k&#41;&#41; {<br />$_SESSION&#91;$k&#93; = $v;<br />}<br />}<br /><br />if&#40;empty&#40;$_CLEAN&#91;'f_name'&#93;&#41; || empty&#40;$_CLEAN&#91;'l_name'&#93;&#41; || empty&#40;$_CLEAN&#91;'address'&#93;&#41; || empty&#40;$_CLEAN&#91;'town'&#93;&#41; || empty&#40;$_CLEAN&#91;'country'&#93;&#41; || empty&#40;$_CLEAN&#91;'password'&#93;&#41; || empty&#40;$_CLEAN&#91;'confirmPassword'&#93;&#41; || empty&#40;$_CLEAN&#91;'username'&#93;&#41; || empty&#40;$_CLEAN&#91;'confirmUsername'&#93;&#41; || empty&#40;$_CLEAN&#91;'email'&#93;&#41; || empty&#40;$_CLEAN&#91;'confirmEmail'&#93;&#41; || !filter_var&#40;$_CLEAN&#91;'email'&#93;, FILTER_VALIDATE_EMAIL&#41; ||<br />!filter_var&#40;$_CLEAN&#91;'confirmEmail'&#93;, FILTER_VALIDATE_EMAIL&#41; || &#40;$_CLEAN&#91;'confirmEmail'&#93; === FALSE&#41; || &#40;$_CLEAN&#91;'password'&#93; != $_CLEAN&#91;'confirmPassword'&#93;&#41; || &#40;$_CLEAN&#91;'username'&#93; != $_CLEAN&#91;'confirmUsername'&#93;&#41; || &#40;$_CLEAN&#91;'email'&#93; != $_CLEAN&#91;'confirmEmail'&#93;&#41;&#41; {<br />&nbsp;&nbsp;//required fields not set - send them back<br /><br />&nbsp;&nbsp;header&#40;&#34;Location&#58; registration_form.php5?error=ef&#34;&#41;;<br />&nbsp;&nbsp;exit;<br />}<br /><br />&nbsp;&nbsp;//already registered?<br />&nbsp;&nbsp;//check for pre-existing account with same email address<br /><br />&nbsp;&nbsp;$check_sql = &#34;SELECT id FROM aromaMaster WHERE LOWER&#40;email&#41;='&#34;.strtolower&#40;$_CLEAN&#91;'email'&#93;&#41;.&#34;'&#34;;<br />&nbsp;&nbsp;$check_res = mysqli_query&#40;$mysqli, $check_sql&#41; or error_log&#40;mysqli_error&#40;$mysqli&#41;.&#34;&#092;r&#092;n&#34;&#41;;<br /><br />&nbsp;&nbsp;if&#40;mysqli_num_rows&#40;$check_res&#41; &#62;= 1&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;//duplicate entry<br />&nbsp;&nbsp;&nbsp;&nbsp;mysqli_free_result&#40;$check_res&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;header&#40;&#34;Location&#58; registerfail.php5?error=ef&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;//check for pre-existing account with same username<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$check_sql = &#34;SELECT id FROM aromaMaster WHERE LOWER&#40;username&#41;='&#34;.strtolower&#40;$_CLEAN&#91;'username'&#93;&#41;.&#34;'&#34;;<br />&nbsp;&nbsp;$check_res = mysqli_query&#40;$mysqli, $check_sql&#41; or error_log&#40;mysqli_error&#40;$mysqli&#41;.&#34;&#092;r&#092;n&#34;&#41;;<br /><br />&nbsp;&nbsp;if&#40;mysqli_num_rows&#40;$check_res&#41; &#62;=1 &#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;//duplicate entry<br />&nbsp;&nbsp;&nbsp;&nbsp;mysqli_free_result&#40;$check_res&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;header&#40;&#34;Location&#58; registerfail.php5?error=ef&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />} else {<br />&nbsp;&nbsp;//create query<br />&nbsp;&nbsp;$register_sql = &#34;INSERT INTO aromaMaster &#40;email, username, password, date_registered, last_seen&#41; VALUES &#40;<br />&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'email'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'username'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;'&#34;.sha1&#40;$_CLEAN&#91;'password'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;now&#40;&#41;, now&#40;&#41;&#41;&#34;;<br />&nbsp;&nbsp;$register_res = mysqli_query&#40;$mysqli, $register_sql&#41; or error_log&#40;mysqli_error&#40;$mysqli&#41;.&#34;&#092;r&#092;n&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$userid = mysqli_insert_id&#40;$mysqli&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION&#91;&#34;userid&#34;&#93; = $userid;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION&#91;&#34;username&#34;&#93; = $_CLEAN&#91;'username'&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session_write_close&#40;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;$address_sql = &#34;INSERT INTO aromaAddress &#40;userid, f_name, l_name, address, town, city, postcode&#41; VALUES &#40;<br />&nbsp;&nbsp;&nbsp;&nbsp;'$userid',<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'f_name'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'l_name'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'address'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'town'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'city'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'country'&#93;&#41;.&#34;',<br />&nbsp;&nbsp;&nbsp;&nbsp;'&#34;.htmlspecialchars&#40;$_CLEAN&#91;'postcode'&#93;&#41;.&#34;'&#41;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$address_res = mysqli_query&#40;$mysqli, $address_sql&#41; or error_log&#40;mysqli_error&#40;$mysqli&#41;.&#34;&#092;r&#092;n&#34;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header&#40;&#34;Location&#58; registerredirect.php5&#34;&#41;;<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;mysqli_close&#40;$mysqli&#41;;<br />&nbsp;&nbsp;?&#62;<!--c2--></div><!--ec2--><br /><br />A side question: I leave session_write_close() until I am done with writing to the session, but can I write more once I close it, as long as I close it again?]]></description>
		<pubDate>Sun, 18 Oct 2009 14:53:26 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28180</guid>
	</item>
	<item>
		<title>Question About Classes</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28178</link>
		<description><![CDATA[Hey,<br /><br />How can I set multiple variables in a class but not inside a function?<br /><br />I have the following code but I get the following error "Parse error: syntax error, unexpected T_VARIABLE".<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->require_once&#40;'breadcrumbs.php'&#41;;<br /><br />class vfrHome<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;// Last ID to display in the table<br />&nbsp;&nbsp;&nbsp;&nbsp;public $newsid = &#34;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;public $url = $_SERVER&#91;&#34;PHP_SELF&#34;&#93;; // &#60;-- This code is the problem, I get the error when the variable is there but the code runs when it's not there.<br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;public function Breadcrumbs&#40;&#41; {<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$breadcrumb = new breadcrumb;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$breadcrumb-&#62;dirformat='ucwords';<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$breadcrumb-&#62;showfile=FALSE;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo $breadcrumb-&#62;show_breadcrumb&#40;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#34; &#62; Recent News&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />}<!--c2--></div><!--ec2--><br /><br /><br />Thanks in advance,<br /><br />Steve]]></description>
		<pubDate>Sun, 18 Oct 2009 12:49:32 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28178</guid>
	</item>
	<item>
		<title>Carriage Return Vs. Multi Submit Buttons</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28177</link>
		<description><![CDATA[I have a form with 4 fieldsets, each of which has its own submit button with a different name.  A script branches depending on which submit button was clicked and makes the relevant updates to a MySQL table.  I have noticed that if I hit return in a form field, only the first submit button seems to be fired - changes in other fieldsets don't take effect unless I actually click on the appropriate button.  I could separate it into 4 forms, but that means altering styles and HTML etc. etc.  Is this normal behaviour?]]></description>
		<pubDate>Sun, 18 Oct 2009 09:00:20 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28177</guid>
	</item>
	<item>
		<title>Classes : Content And Logic</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28175</link>
		<description><![CDATA[Hello, <br /><br />Is there a rule I should follow to make better classes? <br /><br />I am using echo in some of my methods in my class, I just wondered if I was going down the wrong road, I have a method for each page, and call it from a separate php script, in these methods i use echo and output the content while also using the classes other methods and info to keep it all in one place, <br /><br />But someone said to me that really classes shouldn't be used in that way, it should allow you to separate logic from content, or should I say separate output from non-output logic...<br /><br />Any suggestions ?<br /><br />I've started to rewrite my class removing the page specific methods and putting them on their actual page on their own, whil still including the class to access other methods.]]></description>
		<pubDate>Sun, 18 Oct 2009 07:22:50 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28175</guid>
	</item>
	<item>
		<title>Limiting Queries</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28171</link>
		<description><![CDATA[I have a sql table called menu. In the table I have menu links with parents and childs. <br />Example:<br />-&gt; parent #1<br />--&gt; child #1<br />--&gt; child #2<br />-&gt; parent #2<br />--&gt; child #1<br /><!--QuoteBegin-Menu Format+--><div class='quotetop'>QUOTE (Menu Format)</div><div class='quotemain'><!--QuoteEBegin-->id<br />link<br />name<br />power // 1 if parent and 2 if child<br />under //if child<br />order<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />But I have too many queries sent to the database and I was wondering how can I limit the queries.<br />Part of the code.<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// already connected to sql host and database<br /><br />$query = mysql_query&#40;&#34;SELECT * FROM menu where power = 1 ORDER BY order&#34;&#41;;<br />while&#40;$row =&nbsp;&nbsp;mysql_fetch_array&#40;$query&#41;&#41;<br />{<br />echo &#34;&#60;a href='{$row&#91;'link'&#93;}'&#62;{$row&#91;'name'&#93;}&#60;/a&#62;&#60;br&#62;/n&#34;;<br />$query2 = mysql_query&#40;&#34;SELECT * FROM menu where under = {$row&#91;'id'&#93;} ORDER BY order&#34;&#41;;<br />$query3 = mysql_num_rows&#40;$query2&#41;;<br />if&#40;$query3 &#62;= 1&#41;<br /> {<br /> while&#40;$row2 = mysql_fetch_array&#40;$query2&#41;&#41; <br />&nbsp;&nbsp;{<br />&nbsp;&nbsp;echo &#34;-&#62; &#60;a href='{$row2&#91;'link'&#93;}'&#62;{$row2&#91;'name'&#93;}&#60;/a&#62;&#34;;<br />&nbsp;&nbsp;}<br /> }<br />}<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Sun, 18 Oct 2009 01:51:08 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28171</guid>
	</item>
	<item>
		<title>Php And Paths</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28168</link>
		<description><![CDATA[Hello.<br /><br />I have one project here that is separated by folders:<br /><br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->.www<br />..test<br />...test.php<br />..main<br />...index.php<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />I want that the file index.php includes the test.php file. How can I do in a way that I don't need to know the DOCUMENT_ROOT and don't need to use '&#46;&#46;/'?<br />For example. In html, I just use '/test/test.php' and it works. How can I do this in php?<br /><br />I hope I was clear on my question.<br /><br />Thank you for reading.<br />Help me!]]></description>
		<pubDate>Sat, 17 Oct 2009 21:11:25 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28168</guid>
	</item>
	<item>
		<title>Custom Things</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28166</link>
		<description>So I know if you set (when they register) is you do something like $username, it will display the viewing persons username. But how do I make it so that it only displays one username. Like when someone posts something for it to display that username to everyone. Or do it like a avatar when u pick a avatar to make sure that it only displays that users avatar not who ever is viewing it.</description>
		<pubDate>Sat, 17 Oct 2009 17:34:42 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28166</guid>
	</item>
	<item>
		<title>Retrieve Name For Id In Cart</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28163</link>
		<description><![CDATA[Having had my simple shopping cart application working in principle (adding/updating/removing items) I am now surprised to find that my addition to display the colour name for each product (if passed in query string) confuses rest of code and the values for quantities do not display correctly any more. The code I inserted is:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$fn_name = $_SESSION['cart'][$row['product_id']]['fn'];<br />		if ($fn_name != 0)<br />		{<br />		$fn_query = "SELECT colour FROM colours WHERE colour_id  = $fn_name";<br />		$fn_result = mysqli_query ($dbc, $fn_query);<br />		$row=mysqli_fetch_assoc($fn_result); <br />			$fn_name2 = $row['finish'];<br />			echo "Color: " . $fn_name2;<br />		}<br /></div><br /><br />The code before, which worked without fault was:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>		$fn_name = $_SESSION['cart'][$row['product_id']]['fn'];<br />		if ($fn_name != 0)<br />		{<br />		$fn_query = "SELECT color FROM colours WHERE color_id  = $fn_name";<br />		$fn_result = mysqli_query ($dbc, $fn_query);<br />			if (mysqli_num_rows($fn_result) &gt; 0)<br />			{<br />			echo "&lt;br /&gt;Colour: {$_SESSION['cart'][$row['product_id']]['fn']}";<br />			}<br />		}</div><br /><br />It works to 'hard-code' a loop as:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>if ($fn_name == 1)<br />				{<br />				echo 'Colour: Black';<br />				}<br />				elseif ($fn_name == 2)<br />				{<br />				echo 'White';<br />				}</div><br />but for obvious reasons that would not be a good idea. Colour might change in database (they can be changed from admin interface).<br /><br />How can I display the name, but not upset the rest of coding? <br /><br />Son<br /><br />Reason for edit: Forgot to include the info about having a hard-coded loop to look up names...]]></description>
		<pubDate>Sat, 17 Oct 2009 14:34:11 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28163</guid>
	</item>
	<item>
		<title>Code Slows Things Considerably Down</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28162</link>
		<description><![CDATA[For each product stored via SESSIONS in cart application I would like to offer an option to make per drop-down that will be passed on when someone clicks onto checkout. The code is:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>		$pa_id = $row['product_id'];<br />		$q2 = "SELECT * FROM ageing WHERE ageing_id IN (SELECT age_id FROM productAge WHERE product_id = $pa_id) ORDER BY ageing_id";<br />		$r2 = mysqli_query($dbc, $q2);<br />			if (mysqli_num_rows($r2) &gt; 0)<br />			{<br />			?&gt;<br />&lt;label for="ageing"&gt;Ageing:&lt;/label&gt;&lt;select name="ageing&lt;?php echo $pa_id ;?&gt;" id="ageing&lt;?php echo $pa_id ;?&gt;"&gt;<br />&lt;?php<br />				while (list($ageing_id, $ageing_name) = mysqli_fetch_array($r2, MYSQLI_NUM)) <br />				{<br />				echo "&lt;option value=&#092;"$ageing_id&#092;"";<br />					if((isset($_POST['ageing'])) && ($_POST['ageing'] == $ageing_id))<br />					{ <br />					echo ' selected="selected" '; <br />					} <br />					echo "&gt;" . $ageing_name . "&lt;/option&gt;";<br />				}<br />			echo "&lt;/select&gt;&lt;br  /&gt;";<br />		}</div><br /><br />It slowed things down really badly. Taking this bit out makes the page upload quickly again. Not sure what is causing the delay... Also $_POST['ageing'] should be something like $_POST['ageing' . $pa_id] (so that each product has unique drop down name/id. Not sure how you would do this... Any hints appreciated...<br /><br />Son]]></description>
		<pubDate>Sat, 17 Oct 2009 14:04:17 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28162</guid>
	</item>
	<item>
		<title>Image Directory</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28161</link>
		<description><![CDATA[hi i am trying to get the images from a directory, as far as i can tell the code is correct and shomd is set to 777 on both the php file and the directory.<br /><br />Please could you help? Thanks<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;html&gt;<br />&lt;head&gt;<br />&lt;title&gt; imageIndex&lt;/title&gt;<br />&lt;head&gt;<br />&lt;body&gt;<br />&lt;?<br />//image index<br />//generate an index image containing all images in a particular directory<br />//point to whatever directory you wish to index<br /><br />//index will be written to this directory as imageIndex.html<br />$dirName = " /learning/ ";<br />$dp = opendir($dirName);<br />chdir($dirName);<br /><br />//add all files in directory to the $theFiles array<br />while ($currentFile !==false) {<br />	$currenfile = readDir($dp);<br />	$currentFile = readDir($dp);<br />	$theFiles[] = $currentFile;<br />} //end wile<br /><br />// extrac gif and gpg images<br />$imageFiles = preg_grep("/jpg$|gif$/", $theFiles);<br /><br />$ourput ="";<br />foreach ($imageFiles as $currentFile){<br />	$ourput .= &lt;&lt;&lt;HERE<br />	&lt;a href =$currentFile&gt;<br />	&lt;img src = "$currentFile"<br />	height = 50<br />	width = 50&gt;<br />	&lt;/a&gt;<br />HERE;<br /><br />} //endforeach<br /><br />//save the index to the local file system<br />$fp = fopen ("imageIndex.html", "w");<br />fputs ($fp, $output);<br />fclose($fp);<br />//readFile("imageIndex.html");<br />print "&lt;a href = $dirName/imageInde.html&gt;image index&lt;/a&gt;&#092;n";<br />?&gt;<br /><br />&lt;/body&gt;<br />&lt;/html&gt;<br /><br />	</div><br /><br /><br /><br /><br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>Warning: opendir( /learning/ ) [function.opendir]: failed to open dir: No such file or directory in /home/gary/public_html/Personal/getimage.php on line 13<br /><br />Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/gary/public_html/Personal/getimage.php on line 14<br /><br />Warning: readdir(): supplied argument is not a valid Directory resource in /home/gary/public_html/Personal/getimage.php on line 18<br /><br />Warning: readdir(): supplied argument is not a valid Directory resource in /home/gary/public_html/Personal/getimage.php on line 19<br /><br />Warning: fopen(imageIndex.html) [function.fopen]: failed to open stream: Permission denied in /home/gary/public_html/Personal/getimage.php on line 39<br /><br />Warning: fclose(): supplied argument is not a valid stream resource in /home/gary/public_html/Personal/getimage.php on line 41<br />image index</div>]]></description>
		<pubDate>Sat, 17 Oct 2009 11:15:39 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28161</guid>
	</item>
	<item>
		<title>Text Parsing Ie8 Problem</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28159</link>
		<description><![CDATA[hello <br /><br />i have a problem with text parsing <br /><br />when i write this html+css code in a html file it works fine<br />but when i write it in a php file i see a different result <br />the two lines become one and without multi white spaces <br />but only in IE8 (in FF3 it works fine)<br /><br />also when i look at the source code from the browser (right click options)<br />i see the text parsed as it should be (with line breaks and multi spaces)<br /><br />please help me understand what is going on <br /><br />replace the ------------ with spaces as this form cuts them out<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;div style="white-space:pre-wrap;"&gt;first line of words<br />next line-------------------and some more after many spaces&lt;/div&gt;</div>]]></description>
		<pubDate>Sat, 17 Oct 2009 04:34:02 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28159</guid>
	</item>
	<item>
		<title>Search Form?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28158</link>
		<description><![CDATA[i have database name "prj"<br /><br />contains one table name "inf"<br /><br />which contain three fields "id" , "name" , "domicile".<br /><br />I want to create a php search form which contain the dropdown menu of fields name. that i can search the record<br /><br /> by id<br /> by name<br /> by domicle<br /><br />and as a result show the <br /><br />{id, name , domicile }  as record infromation. <br /><br />How it can be possible, please help]]></description>
		<pubDate>Sat, 17 Oct 2009 02:03:59 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28158</guid>
	</item>
	<item>
		<title>Ordering Results</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28156</link>
		<description><![CDATA[Hi guys,<br /><br />First time poster.<br /><br />I'm a little,... well very rusty, with my SQL. Figured you experts out there would have an idea as to how to solve my problem here.<br /><br /><br />Little background on the database:<br />-It's a historical database with events and people from time; each record has a name, description, a start year, an end year, startYear suffix*, endYear suffix*<br />*Suffix = BC or AD or MYA<br /><br />Corresponding with the above information, here is an example record:<br /><br />Example#1:<br /><br />John Doe | Famous Musician born in the 19th century | 1839 | 1910 | AD | AD<br /><br /><br />Example2:<br /><br />Roman Period | The Roman Empire | 63 | 476 | BC | AD<br /><br />Example 3:<br /><br />Stone Age | The Human Era | 5 | 2500 | MYA | BC<br /><br /><br /><br />The problem:<br />Now, this is simple enough, but I have BC and MYA dates as well. So there could technically be an 1839 AD as well as an 1839 BC date or even an 1839 MYA year.<br /><br />Figuring out which record to return (the AD, BC, or MYA) is not a problem by itself, but when I have to return a set of records say from the year 2000MYA to 2000AD, you can see that things might not be so clean cut if I simply order the records via ORDER BY ASC/DESC in relation to the starting year of the record.<br /><br />I'm hoping there is a way to do "two" or "three" selects and combine the results where if I searched from 2000MYA to 2000AD, the first part would return all records which years are from a MYA era, in this case 2000MYA, ordered in an ascending fashion all the way to 0.<br />Then, combine the results with another search that selects all records greater than the year 0 (BC dates in this case) ordered in an descending fashion then finally list the AD dates in an ascending manner.<br /><br />You'd get records that show years like such:<br />2000 MYA, 1500 MYA, 500 MYA, 30 MYA, 5 BC, 350 BC, 2000 BC, 1500 BC, 10 BC, 15AD, 1500 AD, 1993 AD, 2009 AD<br /><br />So in SQL terms, the statement would look like follows (of course this statement does NOT work, but you get the idea of what I'm trying to do):<br /><br /><br />select * from tablename WHERE startYearSuffix = 'MYA' ORDER BY event_Start DESC<br />UNION<br />select * from tablename WHERE startYearSuffix = 'BC' ORDER BY event_Start DESC<br />UNION<br />select * from tablename WHERE startYearSuffix = 'AD' ORDER BY event_Start ASC;<br /><br /><br /><br />Thanks a lot for the help.<br /><br />]]></description>
		<pubDate>Fri, 16 Oct 2009 15:38:49 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28156</guid>
	</item>
	<item>
		<title>Question About Multiple Databases</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28152</link>
		<description><![CDATA[Rather new to SQL and before I go barking completely up the wrong tree in tracking down a solution, I want to find out if what I am attempting is even possible in MS SQL 2005 or 2008.<br /><br />Is there a way to have fields in one database, somehow mapped or linked to another for simultaneous, or nearly so, updating?<br /><br />Example<br /><br />Db1.table1<br />RecID<br />Name<br />Age<br /><br />Db1.table2<br />RecID1<br />RecID<br />Eyecolor<br />Haircolor<br /><br />Db1.table3<br />RecID2<br />RecID<br />Weight<br />Height<br /><br /><br /><br /><br />Db2.table1<br /><br />RecID3<br />RecID<br />Name<br />Age<br />Eyecolor<br />Haircolor<br />Weight<br />Height<br /><br /><br />Thanks for any info on this.]]></description>
		<pubDate>Fri, 16 Oct 2009 10:50:46 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28152</guid>
	</item>
	<item>
		<title>How To Access Texbox Value In Vbscript</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28149</link>
		<description><![CDATA[Hello,<br /><br />I have a snippet of code<br /><br />&lt;% VARIABLE = document.getElementByID("controlname).text %<br /><br />&gt; <br /><br />How do I do this so it works across all browsers?]]></description>
		<pubDate>Fri, 16 Oct 2009 03:38:29 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28149</guid>
	</item>
	<item>
		<title>Newsletter - Forward To A Friend</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28142</link>
		<description><![CDATA[I would like to setup something similar to this in the footer of my mass mailings for the convenience of the recipient, but in PHP:<br /><br /><a href="http://b.eb09.ebhost9.com/forward.asp?SiteID=16491&SID=1&EmailID=44172926&HitID=1255568615000&Section=583423&FromEmail=blank@somesite.com" target="_blank">Forward to a friend example.</a><br /><br /><br />I looked online and didn't see anything that specifically explained how to accomplish this.<br /><br />I am not too skilled at PHP so if anyone knows of a free script or can give me some guidance to accomplish this goal it would be greatly appreciated!!!<br /><br />Thanks in advance!!!  <img src="http://w3schools.invisionzone.com/style_emoticons/default/Pleased.gif" style="vertical-align:middle" emoid=":Pleased:" border="0" alt="Pleased.gif" /> <br />]]></description>
		<pubDate>Thu, 15 Oct 2009 13:57:29 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28142</guid>
	</item>
	<item>
		<title><![CDATA[[solved] Unexpected '{' Error]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28139</link>
		<description><![CDATA[I'm getting an unexpected '{' error at line 64 but I can't see why... can you?<br /><br />Oh and any other comment or suggestion on my code is welcome.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />// Check input<br />if &#40;$name || $password&#41; {<br />&nbsp;&nbsp; if &#40;!&#40;$name&#41;&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp; print&#40;&#34;Exuse me, but I think you forgot to fill in your name. Please try again &#60;a href='login.php'&#62;here&#60;/a&#62;&nbsp;&nbsp;&#34;&#41;;<br />&nbsp;&nbsp; }<br />&nbsp;&nbsp; else if &#40;!&#40;$password&#41;&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp; print&#40;&#34;Exuse me, but I think you forgot to fill in your password. Please try again &#60;a href='login.php'&#62;here&#60;/a&#62;&nbsp;&nbsp;&#34;&#41;;<br />&nbsp;&nbsp; }<br />&nbsp;&nbsp; else {<br />&nbsp;&nbsp;&nbsp;&nbsp;// Compare to database<br />&nbsp;&nbsp;&nbsp;&nbsp; $query = &#34;SELECT * FROM username WHERE name='$name' <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AND password='$password'&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp; $result = mysql_query&#40;$query&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp; if &#40;$data = mysql_fetch_array&#40;$result&#41;&#41; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&#40;&#34;There is allready a user with that name. Please choose another name &#60;a href='register.php'&#62; here &#60;/a&#62;&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp; else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Insert into table<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$sql = &#34;INSERT INTO userdata&#40;name,password,points,money&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VALUES&#40;'$name','$password','$points',$money&#41;&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$result = mysql_query&#40;$sql&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Close connection<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$break = mysql_close&#40;$connection&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Display text on page<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print &#34;Thank you sir, you can access your bank account &#60;a href='play.php'&#62; here &#60;/a&#62;&#34;<br />&#91;b&#93;line 64--&gt;&#91;/b&#93;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp; }<br />}<!--c2--></div><!--ec2-->]]></description>
		<pubDate>Thu, 15 Oct 2009 11:44:39 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28139</guid>
	</item>
	<item>
		<title>Convenient One-shot Way To Select Value Irrespective Of Case</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28135</link>
		<description><![CDATA[I want to allow users to register with their username/email address in any combination of upper and lower case characters they like, but to check at registration, login and account management instances that no e-mail address with the same username/email address exists irrespective of case.  I am aware that I can use LOWER() in mysql queries, but if I tried, for example:<br /><br />"SELECT id FROM aromaMaster WHERE email = '".strtolower($email)."'";<br /><br />that would only work if I did strtolower on insertion, right?  Can I make the WHERE email clause case insensitive?]]></description>
		<pubDate>Thu, 15 Oct 2009 10:34:53 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28135</guid>
	</item>
	<item>
		<title>Resizing Image With Php. Please Help.</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28134</link>
		<description><![CDATA[Hey guys,<br />            I have built a photo gallery using flex builder 3. I am allowing a user to upload photos to be displayed in the photo album. The user needs to upload an image that is 680 x 480. Currently I have php adding this photo to a folder. What I need to do is use php to perform two more tasks. I would like the php to take that photo and scale it down to a thumbnail image that I need for the photogallery. The thumbnail image needs to be 70 x 70.  Therefore, the php has to scale down the image from 680 x 480 to 70 x 70 and then its only a matter of me having php save a new image as the thumbnail into that folder.<br /><br />Any help is much appreciated.<br /><br />Thanks.]]></description>
		<pubDate>Thu, 15 Oct 2009 10:32:12 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28134</guid>
	</item>
	<item>
		<title>Session Data With Further Level Of Information?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28132</link>
		<description><![CDATA[I have created a basic shopping cart and have now a further task to pass additional info about product (color) to shopping basket. The color can be selected on product page via drop-down and should then display with item description on cart page. My code to add a product to $_SESSION['cart'] is:<br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>if (isset($_GET['id']))<br />	{<br />	$id = (int) $_GET['id'];<br />		if ($id &gt; 0)<br />		{<br />		$id_query = "SELECT product, price FROM products WHERE product_id = $id";<br />		$id_result = mysqli_query ($dbc, $id_query);<br />			if (mysqli_num_rows($id_result) == 1)<br />			{<br />				list ($product, $price) = mysqli_fetch_array($id_result, MYSQLI_NUM);<br />				if (isset($_SESSION['cart'][$id]))<br />				{<br />				$_SESSION['cart'][$id] += $qty2;<br />				echo "&lt;p&gt;Another copy of the following item has been added to your cart: &lt;strong&gt;$product&lt;/strong&gt;.&lt;/p&gt;&#092;n";<br />				}<br />				else<br />				{<br />				$_SESSION['cart'][$id] = $qty2;<br />				echo "&lt;p&gt;The following item has been added to your cart: &lt;strong&gt;$product&lt;/strong&gt;.&lt;/p&gt;&#092;n";<br />				}<br />			}<br />		}<br />	}</div><br /><br />I read the intro about sessions, but still do not get it how you would add another layer of information (the colour id) to each $_SESSION['cart'][$id]? The way I tried this  first ($_SESSION['cart'][$colour] = $colour;) would display for each product the same id. Then I thought maybe $_SESSION['cart'][$id] =$colour would work, but for obvious reasons that overrides the quantity info which I need. My last attempts was $_SESSION['cart'][$id][$colour] =$colour, but this also did not the trick.<br /><br />How do you do that sort of thing?<br /><br />Son]]></description>
		<pubDate>Thu, 15 Oct 2009 09:37:46 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28132</guid>
	</item>
	<item>
		<title>Check For Existing Email Address Fails</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28128</link>
		<description><![CDATA[I have a basic registration system which should bring up the error message 'That email address has already been registered.' when someone tries to register with already registered email address. Although I do my check with $emailQuery when entering an existing email address is always brings up the error message for the failed insert query ($query). This query should only be run when the email address is not available. I echoed $emailQuery and copied it into phpMyAdmin. The query correctly brings back the relevant user_id. I am lost with this one... Where am I going wrong?<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>	if ($first_name && $last_name && $email) // if everything filled out ok<br />	{ <br />	// make sure the email address is available<br />	$emailQuery = "SELECT user_id FROM users WHERE email='$email'";		<br />	$emailResult = mysqli_query ($dbc, $emailQuery) or trigger_error("Query: $emailQuery&#092;n&lt;br /&gt;MySQL Error: " . mysql_error());<br />		if (mysqli_num_rows($dbc, $emailResult) == 1) // email address is not available<br />		{ <br />		echo '&lt;p&gt;That email address has already been registered. &lt;/p&gt;'; 		<br />		} <br />		else // the email address is available<br />		{ <br />		// add the user<br />		$query = "INSERT INTO users (email, first_name, last_name) VALUES ('$email', '$first_name', '$last_name')";		<br />		$result = mysqli_query ($dbc, $query) or trigger_error("Query: $query&#092;n&lt;br /&gt;MySQL Error: " . mysql_error());<br />			if (mysqli_affected_rows($dbc) == 1) // If it ran ok<br />			{ <br />			// send the email<br />			$body = "Thank you for registering with us.&#092;n";<br />			mail($_POST['email'], 'Registration Confirmation', $body, 'From: info@testing.co.uk');<br />			// finish the page<br />       		header ("Location: register-success.php");<br />			} <br />			else // if it did not run ok<br />			{ <br />			echo '&lt;p&gt;You could not be registered due to a system error. We apologise for any inconvenience.&lt;/p&gt;'; <br />			}		<br />		}<br />	} <br />	else // if one of the data tests failed<br />	{ <br />	echo '&lt;p&gt;You have entered some data incorrectly. &lt;/p&gt;';<br />	}</div><br /><br />Any help appreciated...<br /><br />Son]]></description>
		<pubDate>Thu, 15 Oct 2009 06:50:46 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28128</guid>
	</item>
	<item>
		<title>Printing Values From Generated Form</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28127</link>
		<description><![CDATA[Hi guys,<br /><br />I am completely new to PHP and I need to get values from this page I'm working on. <br />I've got this test upload page here where you can upload mp3 files and then they generate a new delete/edit option with the name each time in a list.<br />(No file format restriction on this yet, working on that later)<br /><br /><a href="http://empulse.dmu.ac.uk/upload/Alternative%203/albupload.html" target="_blank">http://empulse.dmu.ac.uk/upload/Alternativ.../albupload.html</a><br />Just in case the JavaScript is here: <br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>function MultiSelector( list_target, max ){<br /><br />	// Where to write the list<br />	this.list_target = list_target;<br />	// How many elements?<br />	this.count = 0;<br />	// How many elements?<br />	this.id = 0;<br />	// Is there a maximum?<br />	if( max ){<br />		this.max = max;<br />	} else {<br />		this.max = -1;<br />	};<br />	<br />	/**<br />	 * Add a new file input element<br />	 */<br />	this.addElement = function( element ){<br /><br />		// Make sure it's a file input element<br />		if( element.tagName == 'INPUT' && element.type == 'file' ){<br /><br />			// Element name -- what number am I?<br />			element.name = 'file_' + this.id++;<br />				// Trying other elements TEST<br />					element.year = 'Year_' +this.id;<br />					element.genre = 'Genre' +this.id; // not outputted in test<br />					element.other = 'Other' +this.id; // not outputted in test<br />					element.desc = 'Description_' +this.id;<br />					element.label = 'Label_' +this.id;<br />					<br />			// Add reference to this object<br />			element.multi_selector = this;<br /><br />			// What to do when a file is selected<br />			element.onchange = function(){<br /><br />				// New file input<br />				var new_element = document.createElement( 'input' );<br />				new_element.type = 'file';<br /><br />				// Add new element<br />				this.parentNode.insertBefore( new_element, this );<br /><br />				// Apply 'update' to element<br />				this.multi_selector.addElement( new_element );<br /><br />				// Update list<br />				this.multi_selector.addListRow( this );<br /><br />				// Hide this: we can't use display:none because Safari doesn't like it<br />				this.style.position = 'absolute';<br />				this.style.left = '-1000px';<br /><br />			};<br />			// If we've reached maximum number, disable input element<br />			if( this.max != -1 && this.count &gt;= this.max ){<br />				element.disabled = true;<br />			};<br /><br />			// File element counter<br />			this.count++;<br />			// Most recent element<br />			this.current_element = element;<br />			<br />		} else {<br />			// This can only be applied to file input elements!<br />			alert( 'Error: not a file input element' );<br />		};<br /><br />	};<br /><br /><br />	/**<br />	 * Add a new row to the list of files<br />	 */<br />	this.addListRow = function( element ){<br />		<br />		// Row div<br />		var new_row = document.createElement( 'div' );<br />&lt!-- 	var new_row2 = document.createElement('div'); --&gt;<br /><br />		// Delete button<br />		var new_row_button = document.createElement('input');<br />		new_row_button.type = 'button';<br />		new_row_button.value = 'Delete';<br />		<br />		//Edit button<br />		var new_row_button2 = document.createElement('input');<br />		new_row_button2.type = 'button';<br />		new_row_button2.value = 'Edit';<br />		new_row_button2.style.float = 'right';<br /><br />		// References<br />		new_row.element = element;<br />		&lt!-- new_row2.element = element; --&gt;<br />		<br />		// Delete function<br />		new_row_button.onclick= function(){<br /><br />			// Remove element from form<br />			this.parentNode.element.parentNode.removeChild( this.parentNode.element );<br /><br />			// Remove this row from the list<br />			this.parentNode.parentNode.removeChild( this.parentNode );<br /><br />			// Decrement counter<br />			this.parentNode.element.multi_selector.count--;<br /><br />			// Re-enable input element (if it's disabled)<br />			this.parentNode.element.multi_selector.current_element.disabled = false;<br /><br />			// Appease Safari<br />			//    without it Safari wants to reload the browser window<br />			//    which nixes your already queued uploads<br />			return false;<br />			}<br />			<br />	<br />		// Edit function		<br />		// Use this to summon dynamic form for each individual track details editting<br />		new_row_button2.onclick= function(){<br />			openbox('Edit details', 0);<br />			document.getElementById("singletitle").value = element.value;<br />			document.getElementById("ayear").value = element.year;<br />			document.getElementById("adesc").value = element.desc;<br />			document.getElementById("alabel").value = element.label;<br />			return false;<br />		};<br /><br />	<br />		// Set row value<br />		new_row.innerHTML = element.value;<br /><br />		// Add button<br />		new_row.appendChild(new_row_button2);<br />		new_row.appendChild( new_row_button );<br />		<br />		// Add it to the list<br />		this.list_target.appendChild(new_row);	<br />		<br />	};<br /><br />};<br /></div><br /><br />I have this test.php file and I intend for it to write down all the values of each song + their details.<br /><br /><div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>&lt;?php<br /><br />foreach($_POST as $key =&gt; $i){<br /><br />     print("$key=$i&lt;br&gt;");<br /> }<br /><br />foreach($_FILES as $upfile)<br />		{<br /><br />          print($upfile['name']."&lt;br&gt;");<br />        }<br /><br /> ?&gt;<br /></div><br /><br />So far that prints out some values in the right format, however it only gives me the details of one track and a list of the file names like this:<br /><br />title=XXXX( album title)<br />singletitle1=XXXX<br />year1=XXXX<br />lable1=XXXX<br />description1=XXXX<br />.....<br /><br /><br />XXXXX.mp3 (assuming it's mp3 file)<br />XXXXX.mp3<br /><br />However what I need it to really do is output like this:<br /><br />title=XXXX( album title)<br />singletitle1=XXXX<br />year1=XXXX<br />lable1=XXXX<br />description1=XXXX<br />.....<br />singletitle2=XXXX<br />year2=XXXX<br />....<br /><br />XXXXX.mp3<br />XXXXX.mp3<br /><br /><br />Where am I going wrong here? o.o<br />I've looked up a hundred tutorials but I'm still a bit foggy on this one.<br />Thanks in advance guys!]]></description>
		<pubDate>Thu, 15 Oct 2009 06:46:56 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28127</guid>
	</item>
	<item>
		<title>Google Maps</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28124</link>
		<description><![CDATA[I have a question relating to Google Maps and CodeIgniter.  I have dynamic pages with information about restaurants on them.  All of this information is user created.  I found a tutorial on Google Maps about using them with PHP and it only explains how to get maps about information I already have.  Visitors can create their restaurant's profile page with a form and I highly doubt they will know their lattitude and longitude.  How would I get this information based on the address they give us?]]></description>
		<pubDate>Thu, 15 Oct 2009 00:35:54 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28124</guid>
	</item>
	<item>
		<title>Htaccess Help</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28119</link>
		<description><![CDATA[<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Options +FollowSymLinks<br />RewriteEngine On<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteRule ^&#40;.*&#41;$ http&#58;//profile.example.com/index.php?user=$1<!--c2--></div><!--ec2--><br /><br />I'v looked through many examples on htaccess files for redirect but not one of them work properly for my situation.<br /><br />I'm trying to make a member page where you can easily direct to a member's profile using a simple url e.g. www.example.com/jonny, but on the server side it goes to profile.example.com/index.php?user=jonny<br /><br />The one I am using at the moment will redirect, but it also changes the url in the address bar to the complicated one.<br /><br />What I need is an htaccess file that will redirect:<br /><br />www.example.com/jonny<br />www.example.com/jonny/<br />example.com/jonny<br />example.com/jonny/<br /><br />to profile.example.com/index.php?user=jonny but leaving the simple www.example.com/jonny<br /><br />Sorry this isn't really php but there isn't a forum for htaccess files.]]></description>
		<pubDate>Wed, 14 Oct 2009 14:38:06 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28119</guid>
	</item>
	<item>
		<title>Display Value When Is Looping</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28118</link>
		<description><![CDATA[Hi,<br /><br />On the follwing code<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->For j As Integer = 1 To 100<br />&nbsp;&nbsp;System.Threading.Thread.Sleep&#40;2000&#41;&nbsp;&nbsp; 'pause for 2 seconds<br />&nbsp;&nbsp;Response.Write&#40;j.toString+&#34;&#60;br&#62;&#34;&#41;<br />Next<!--c2--></div><!--ec2--><br /><br />Instead of displaying the "j" value when the for loop is completed, can we display the "j" value each time is called? <br /><br />Thx<br />Joe]]></description>
		<pubDate>Wed, 14 Oct 2009 11:26:47 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28118</guid>
	</item>
	<item>
		<title>Need Help In Search Box Option</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28117</link>
		<description><![CDATA[Hello friends,<br /><br />Recently i am building a website and i wish to place a search box in there.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;div id='search'&#62;<br />&nbsp;&nbsp;&#60;form action='/search/label/' id='searchform' method='get'&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;input id='s' name='q' type='text' value=''/&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;input id='searchsubmit' type='submit' value=''/&#62;<br />&nbsp;&nbsp;&#60;/form&#62;<br />&#60;/div&#62;<!--c2--></div><!--ec2--><br /><br />I am having a form like this and when i enter any text in that form i am getting the URL like this "http://website.com/search/label/?q=<b>query</b>"<br /><br />But i want to adjust this URL like this "http://atamilgroup.blogspot.com/search/label/<b>query</b>"<br /><br />That means i want to search the entered value with my labels which i have used while creating posts.<br /><br />Where i can edit to archive this.. Please help me...]]></description>
		<pubDate>Wed, 14 Oct 2009 10:08:40 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28117</guid>
	</item>
	<item>
		<title>Dynamic Dropdown Menu</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28113</link>
		<description><![CDATA[I  have database in mysql name "prj"<br />contains 1 table name "inf".<br /><br />which have 2 fields named "student" & "teacher".<br /><br />I want to create two drop down menu. <br /><br />1 for : Select Category [Student] or [Teacher]. <br />when i select student it automatically selects the field of student from database and display in the 2nd dropdown menu. <br /><br /><br />How can i do this , please help me in this regard.]]></description>
		<pubDate>Wed, 14 Oct 2009 01:24:13 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28113</guid>
	</item>
	<item>
		<title>Php And Sql Ref Manuals</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28109</link>
		<description><![CDATA[Hello again people.  I am now good enough to be dangerous.  Certainly have a LONG way to go with me php and sql.  I was wondering what reference manuals you guys would recomend both for php and sql.  Something small (something paper).  I'd rather two separate ref. manuals for php and sql.  Any thoughts?  Latest reviews and releases?  Something up to date?  Something i can blow my nose into?]]></description>
		<pubDate>Tue, 13 Oct 2009 15:04:03 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28109</guid>
	</item>
	<item>
		<title>Begginner (practice Php Without Having Webspace</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28108</link>
		<description><![CDATA[I want to learn and practice the code php by following examples, like i can practice html in the text editor , notepad.<br /><br />1.Do i need webspace to practice php. <br />2.what software also is needed <br />3.how can i check the requirements.]]></description>
		<pubDate>Tue, 13 Oct 2009 14:47:05 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28108</guid>
	</item>
	<item>
		<title>Creating A Registration Form: Proper Way To Redirect A Bad Registration</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28107</link>
		<description><![CDATA[Hi, I'm trying to create a very simple registration form. Nothing fancy, just a log-in, password, email address, and a couple of confirmations. While I have it set up in AJAX to alert the user if they're using a log-in or email address already in the database, I have to tend to those than don't support AJAX and redirect back to the registration page if they try to submit a registration with errors.<br /><br />So, the checks are easy enough... I don't have problems identifying whether or not they've made a bad registration. The issue is that I don't know the proper way to redirect the user back to the registration form if it's invalid. If I use the header() function it clears the text fields which I don't want. The second alternative is to write out the submission page as a form that writes out all of the fields with their values, then submits itself to the registration form which will then fill in the fields if the $REQUESTs are available. This seems... less than elegant, though.<br /><br />There are millions of registration forms all of the internet... It's a pretty common thing, which is why I'd like to do it correctly. Could anyone endulge me on what the server-side scripts look like on a registration submission?]]></description>
		<pubDate>Tue, 13 Oct 2009 13:59:04 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28107</guid>
	</item>
	<item>
		<title>Php-gtk</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28106</link>
		<description><![CDATA[I've been looking at working with PHP-GTK in making applications. "Why?" you may ask. Because it exists and I want to try it =D.<br /><br />Anyway, I was wondering how that worked. If I wrote an application using it, would the users have to have GTK and/or PHP installed on their computer? How does that work?]]></description>
		<pubDate>Tue, 13 Oct 2009 12:08:58 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28106</guid>
	</item>
	<item>
		<title>Refreshing A Page</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28102</link>
		<description><![CDATA[Hello. I have one issue here. I searched on the Internet and only found another topic with the same problem I have, without a solution:<br /><br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Hi,<br /><br />I've searched hi and low but haven't been able to find any discussion on this topic:<br /><br />I have a webpage (implemented in php/javascript/html) that needs to refresh once every minute. I'm currently doing that using the http-equiv="refresh" content="60" metatag thing.<br /><br />The problem is that every once in a while the page fails to load for one reason or another (this happens about 3-5 times per day), at which point the "Page cannot be found" page is displayed. When that happens, the refresh instruction is lost and the page stops refreshing until someone notices the problem and manually refreshes the page.<br /><br />It's very important for this page to be able to automatically recover from this situation without human intervention. Is there any way, using javascript or otherwise, to make this happen?<br /><br />Any creative ideas would be greatly appreciated.<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />This describes exactly my problem. Does anyone know how to solve it?<br /><br />Thank you  <img src="http://w3schools.invisionzone.com/style_emoticons/default/happy.gif" style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" />]]></description>
		<pubDate>Tue, 13 Oct 2009 06:32:17 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28102</guid>
	</item>
	<item>
		<title>Mysql Password()</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28100</link>
		<description><![CDATA[hi<br /><br />Why the PASSWORD() function should not be used in our own applications?<br />How does the breaking of application takes place when it is used...?<br /><br /><br /><br /><br /><br /><br />thanks<br />karthikanov24]]></description>
		<pubDate>Tue, 13 Oct 2009 02:53:06 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28100</guid>
	</item>
	<item>
		<title>Get Random Id From Database</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28098</link>
		<description>How do I get a random ID from the database, without using RAND(1, 999999) LIMIT 1 because that makes a random number between 1 and 999999 and i only have 246 in my database but if i change it to RAND(1, 246) then if i ever add more to my database it wont show any more above 246? help please?</description>
		<pubDate>Tue, 13 Oct 2009 01:50:22 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28098</guid>
	</item>
	<item>
		<title>Php Storage</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28096</link>
		<description><![CDATA[Hi<br /><br />(this is my first post, but I'm not new on the forum, this is simply a new identity. My old, deprecated one is global.user. )<br /><br />I was wondering about flat file storage. I actually have made a small cms which uses html files to store the pages data. (It is called fsc, and I plan on developing it further, although by lack of time I haven't had been able to even upload it on svn.)<br /><br />The problem with flat file storage, I have read (and it's quite obvious) is security. Everybody can access the data stored more or less easily because it is a file, so you just need to find out its name.<br /><br />Now, an example of a storage html file in my cms looks like this:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;h1&#62;Sample page&#60;/h1&#62;<br />&#60;h2&#62;Lorem ipsum will not follow because I'm too lazy to get it&#60;/h2&#62;<br />&#60;h3&#62;Instead I'll put Bla Bla&#60;/h3&#62;<br />&#60;h4&#62;Sorry.&#60;/h4&#62;<br />&#60;p&#62;Bla Bla&#60;/p&#62;<br />&#60;p&#62;etc...&#60;/p&#62;<!--c2--></div><!--ec2--><br /><br />There is no structure, as it is provided by a (overly simple) templating system.<br /><br />Everyone can just go and grab that, but it is not really an issue, because there is no private pages.<br /><br />Now if I wanted privacy (and I think I'll implement it anyway), I have thought of doing that:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php /*<br />&#60;h1&#62;Sample page&#60;/h1&#62;<br />&#60;h2&#62;Lorem ipsum will not follow because I'm too lazy to get it&#60;/h2&#62;<br />&#60;h3&#62;Instead I'll put Bla Bla&#60;/h3&#62;<br />&#60;h4&#62;Sorry.&#60;/h4&#62;<br />&#60;p&#62;Bla Bla&#60;/p&#62;<br />&#60;p&#62;etc...&#60;/p&#62;<br />*/ ?&#62;<!--c2--></div><!--ec2--><br /><br />Then I open the file with php, remove the first and last lines, and echo it out.<br /><br />That's the first use of php storage I want.<br /><br />The second one is slightly more different.<br /><br />Say I have a settings page, where the user can change things like the website's title, tagline, ui language, template... you know the kind. I don't have a page like that right now, but just say.<br /><br />I want to store these settings somewhere. I want the user to be able to change them when he wants, through that settings page. I want the storage to be flat file, because that's what my cms is about. And I want the most security.<br /><br />So, I thought, let's store everything into an array.<br /><br />Then print the array in a php parsable format and store it in a file. Somehow make it secure.<br /><br /><br />Then I thought a bit more, and I found that maybe I could store it like that:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />$settings = array&#40;&#41;;<br />$settings&#91;'title'&#93; = 'Website';<br />$settings&#91;'tagline'&#93; = 'Sample';<br />$settings&#91;'lang'&#93; = 'en';<br />?&#62;<!--c2--></div><!--ec2--><br /><br />I didn't know if there was a function to print out an array like that, so I did it myself:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function print_php_array&#40;$array, $php_name&#41;<br /><br />{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;$end_str = &#34;&#092;n$&#34; . $php_name . &#34; = array&#40;&#41;;&#34;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;foreach&#40; $array as $key =&#62; $value &#41;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#40; is_string&#40;$value&#41; &#41;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$end_str = $end_str . &#34;&#092;n$&#34; . $php_name . &#34;&#91;'&#34; . $key . &#34;'&#93; = '&#34; . $value . &#34;';&#34;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if &#40; is_array&#40;$value&#41; &#41;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$end_str = $end_str . &#34;&#092;n$&#34; . print_php_array&#40;$value, $php_name . &#34;&#91;'&#34; . $key . &#34;'&#93;&#34;&#41;;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;return $end_str;<br /><br />}<!--c2--></div><!--ec2--><br /><br />I figured that it would be quite good in a matter of security (same reason as my first use). I also figured that it would be good in terms of loading speed, becuase it's php code, there no parsing I need to do, as would be the case for xml.<br /><br />Then I considered using that kind of storage for bigger arrays. With larger contents. Maybe store all the data of the cms in there.<br /><br />But then there may be some issues in term of writing speed.<br /><br /><br />So, here's the deal: I want your opinion on this. What do you think would be the pros and cons. So then I can decide whether to use it or not, and to what extent.<br /><br /><br />(and by the way, I'm not sure how the $ signs in the code above will do. Will they try to get a variable or something? Should I put them in 'single quotes'?)<br /><br /><br />Thanks<br /><br />passcod]]></description>
		<pubDate>Tue, 13 Oct 2009 00:55:37 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28096</guid>
	</item>
	<item>
		<title>Problem In Php?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28095</link>
		<description><![CDATA[I have mysql database name "prj".<br /><br />which have one table "inf"<br /><br />which contains three fields "rollno" "name" "domicile".<br /><br />i want to make a search form in php that there is a drop down menu connected with "inf" table. and i enter the roll number and show the Roll #, Name & Domicile in result.<br /><br />please help me in this regard. thanks<br />]]></description>
		<pubDate>Tue, 13 Oct 2009 00:52:51 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28095</guid>
	</item>
	<item>
		<title>Multiple Drop Down Selections</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28092</link>
		<description><![CDATA[I have a form that let's a user insert a page with the ability to select categories.  I want them to have the ability to select multiple categories.  I have a select drop down menu with the "multiple" attribute applied(&lt;select name='category' multiple&gt;).<br /><br />My question is, how would I get the categories they selected and display them like below:<br /><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->1, 2, 3, 4, 5<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />The numbers are the ids of the categories, which is the value of the selections, and will be located in one column of the table that the current record is being created in.<br /><br />Another question...<br /><br />These categories are fetched from a database table(categories).  The table that these records are being inserted to(pages) with this form has a column called pageID and a column called CategoryID.  What I want to do is to have a page for a specific category that will fetch a list of all the pages that are under this category. <br /><br />Example:  a page has categories of 1, 3, and 5.  The user is viewing category 5.  The category page should contain a list of content pages from category five.  <br /><br />How would I create a query that would do this?]]></description>
		<pubDate>Mon, 12 Oct 2009 21:02:02 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28092</guid>
	</item>
	<item>
		<title>Need Help. Call To Undefined Function Ftp_connect()</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28089</link>
		<description><![CDATA[Ok.<br />I own a server with the online game San Andreas Multiplayer.<br />i am trying to make a PHP script to show the ban database.<br />its suppost to retrieve the ban file from the FTP but i keep getting this error.<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Fatal error&#58; Call to undefined function ftp_connect&#40;&#41; in /hosted/subs/ulmb.com/g/a/gangwardm/public_html/ban.php on line 10<!--c2--></div><!--ec2--><br /><br />here is the code im using:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;//GetBans<br />&nbsp;&nbsp;&nbsp;&nbsp;//October 11th/2009<br />&nbsp;&nbsp;&nbsp;&nbsp;//Retrieves the samp banlist from your server and echos it back in a neat fashion.<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;$ftp_host = &#34;-myhostname-&#34;; //put the ip / hostname to your ftp here<br />&nbsp;&nbsp;&nbsp;&nbsp;$ftp_user = &#34;-myusername&#34;; //put your login here<br />&nbsp;&nbsp;&nbsp;&nbsp;$ftp_pass = &#34;-mypassword-&#34;; //put your password here<br />&nbsp;&nbsp;&nbsp;&nbsp;$banfile = &#34;samp.ban&#34;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$con = ftp_connect&#40;$ftp_host&#41; or die&#40;&#34;Couldnt connect to your ftp &#40;check your settings!&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;ftp_login&#40;$con, $ftp_user, $ftp_pass&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;ftp_get&#40;$con, &#34;ban.txt&#34;, $banfile, FTP_ASCII&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;ftp_close&#40;$con&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;$file = fopen&#40;&#34;ban.txt&#34;, &#34;r&#34;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;$bans = fread&#40;$file, filesize&#40;&#34;ban.txt&#34;&#41;&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;fclose&#40;$file&#41;;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo nl2br&#40;$bans&#41;;<br /><br />?&#62;<!--c2--></div><!--ec2--><br />Please help i need this fixed.<br /><br />Thanks,<br />Boozman<br /><br />p.s. i put in the right FTP info, because i took the info i put in and pasted it into filezilla and it connected.]]></description>
		<pubDate>Mon, 12 Oct 2009 16:25:29 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28089</guid>
	</item>
	<item>
		<title>Sql Join With Search Option</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28088</link>
		<description><![CDATA[Greetings<br /><br />I have two tables in one msaccess database. It is a one-to-many relationship.<br />Table A is the "Master" table, while table B will hold records relating to a record in table A.<br /><br />I am working in VB6.<br /><br />I have a form that displays all records from table B, as well as able to navigate all the records.<br />I also have a search option for two specific fields in table B. These options as chosen by the use of radio buttons.<br /><br />My Search code is as follows:<br /><br />    RS.Close<br />    RS.ActiveConnection = CN<br />    If optDebtor.Value = True Then<br />    RS.Source = "Select * from tableB full join tableA to tableB.refno=tableA.refno where tableB.name like '%" & txtSearch.Text & "%'order by name"<br />    ElseIf optCompany.Value = True Then<br />    RS.Source = "Select * from tableB full join tableA to tableB.refno=tableA.refno where tableB.co like'%" & txtSearch.Text & "%'order by co"<br />    End If<br /><br />    RS.CursorType = adOpenStatic<br />    RS.LockType = adLockOptimistic<br />    RS.Open<br /><br />error message<br /><br />Method 'Open' of object '_Recordset' failed<br /><br />The object of the above sql queries is to display all the information from tableB and only the fields (tableA.name and table A.co) in a label. this is to see which "name and co" belong to the information displayed from tableB.<br /><br />I have tried Inner join as well as Outer join as well as Right join as well as Left join, but without any success.<br /><br />I would sincerely appreciate any assistance.<br /><br />Thanking You in Advance<br /><br />Brice]]></description>
		<pubDate>Mon, 12 Oct 2009 15:38:44 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28088</guid>
	</item>
	<item>
		<title>Quick Sql Problem</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28087</link>
		<description><![CDATA[Hi I'm just learning SQL,<br /><br />can someone tell me what I'm doing wrong on this line?:<br /><br />"SELECT ID, Name FROM cms_sci ORDER BY Name WHERE ID&lt;50"<br /><br /><br />Thanks!]]></description>
		<pubDate>Mon, 12 Oct 2009 15:17:27 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28087</guid>
	</item>
	<item>
		<title><![CDATA[Php Dropdown Form & Dynamic Site]]></title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28085</link>
		<description><![CDATA[I'm a complete newb when it comes to websites, so I need some help with this more complicated stuff.<br /><br />What I have so far: A database with about 60 rows of data with 10 columns each.<br /><br />For example something like this:<br />A B C  D   E   F<br />1 2  3  4   5   6<br />7 8  9 10 11 12<br /><br />What I am trying to have: A page on my website that has a dropdown form to select one of the rows of data by just using column "A" data (1,7, etc...). After the row is selected a new page is generated based on the data in that selected row.<br /><br />EX: -Form dropdown box lists 1, 7, etc... (from column A)<br />-User selects "7" from dropdown<br />-website is generated using all data (7,8,9,10,11,12) from row 7<br /><br />I don't even know where to start. I'm guessing connecting to the database, but I don't even know how to do that.<br /><br />Can someone walk be through the steps?<br /><br />Thanks!<br />]]></description>
		<pubDate>Mon, 12 Oct 2009 12:27:06 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28085</guid>
	</item>
	<item>
		<title>Counter?</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28073</link>
		<description><![CDATA[How do I count the number of times a button is being clicked.  NOTE: everytime the button is clicked it causes the form to postback.<br /><br />I was going to use a hidden text box.. <br /><br />function increment()<br />{<br />  document.getElementByID("count").value =  document.getElementByID("count").value  + 1;<br />}<br /><br />&lt;input type="hidden" name="count" value = &lt;%value%&gt;<br /><br />&lt;...button onclick = "increment()"&gt;<br /><br />But I get an error because the value of the text box is null at first.  How do I solve this?<br /><br />Note these are the most important lines of my code.]]></description>
		<pubDate>Sun, 11 Oct 2009 23:22:55 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28073</guid>
	</item>
	<item>
		<title>Stop Getting From Database</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28071</link>
		<description>I have a comment box and i only want it to show 10 of the latest comments from the database, how do i do that?</description>
		<pubDate>Sun, 11 Oct 2009 21:47:12 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28071</guid>
	</item>
	<item>
		<title>Recaptcha Not Working - Oh Poop</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28069</link>
		<description><![CDATA[As a test, just trying to get it to parse correctly from one page to that next right now.  I'm using LOCALHOST as my domain currently (hopefully that's not the problem) .  Anyway here's my code and then the error message:<br /><br />first: Is the php code supposed to be inside the form?  When I do that I get a blank page, so I've been leaving it out as to show the ReCaptcha widget.<br /><br /> &lt;form method="post" action="wtf.php"&gt;<br />      &lt;input type="submit" name="submit" value="submit" /&gt;<br /> &lt;/form&gt;<br />&lt;?php<br />     require_once('recaptchalib.php');<br />     $publickey = "I put my pub. key here"; <br />     echo recaptcha_get_html($publickey); <br />   ?&gt;<br /><br />My second page looks like:<br /><br />&lt;?php<br /> require_once('recaptchalib.php');<br /> $privatekey = "I put in my private key";<br /> $resp = recaptcha_check_answer ($privatekey,<br />                               $_SERVER["REMOTE_ADDR"],<br />                               $_POST["recaptcha_challenge_field"],<br />                               $_POST["recaptcha_response_field"]);<br /><br /> if (!$resp-&gt;is_valid) {<br />   // What happens when the CAPTCHA was entered incorrectly<br />   die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .<br />        "(reCAPTCHA said: " . $resp-&gt;error . ")");<br /> } else {<br />   // Your code here to handle a successful verification<br /> }<br /> ?&gt;<br /><br />And here is the error i get when that page (wtf.php page):<br /><br />Notice: Undefined index: recaptcha_challenge_field in C:&#092;wamp&#092;www&#092;capture&#092;wtf.php on line 6<br /><br />Notice: Undefined index: recaptcha_response_field in C:&#092;wamp&#092;www&#092;capture&#092;wtf.php on line 7<br />The reCAPTCHA wasn't entered correctly. Go back and try it again.(reCAPTCHA said: incorrect-captcha-sol)<br /><br />So what is happening?!]]></description>
		<pubDate>Sun, 11 Oct 2009 20:12:50 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28069</guid>
	</item>
	<item>
		<title>Php Restricted Acces</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28068</link>
		<description><![CDATA[I'm selling a product that includes some files, and I would like to be able to sell the files as a standalone product as well. Is there a way that I could redirect customers to a page that would allow them to download the files once they have completed their checkout, but the page would be restricted to everyone else? The checkout process is handled by another site, so I can't change that part.<br /><br />Sorry if this is a little vague, but I'm not even exactly sure that this is possible. Even a small nudge in the right direction would be much appreciated.]]></description>
		<pubDate>Sun, 11 Oct 2009 14:57:05 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28068</guid>
	</item>
	<item>
		<title>Login Error</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28064</link>
		<description><![CDATA[Ok, so know when you register it submits the information into the database, but instead of putting it in what you typed it puts in random characters. If you go to login using the random characters that it set as your password it still doesn't let you login. Here are my register and login codes.<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php&nbsp;&nbsp;<br />require_once 'db.php'; <br />$page_mode = $_POST&#91;'page_mode'&#93;; # empty variable defaults to '' &#40;or null&#41; <br /><br />if &#40;$page_mode === 'register'&#41; <br />{ <br />&nbsp;&nbsp;$username = mysql_real_escape_string&#40;trim&#40;$_POST&#91;'username'&#93;&#41;&#41;; <br />&nbsp;&nbsp;$password = $_POST&#91;'password'&#93;; <br /><br />&nbsp;&nbsp;if &#40;$password !== $_POST&#91;'conf_password'&#93;&#41; $error_string .= 'Password mismatch.&#60;br&#62;'; <br /><br />&nbsp;&nbsp;if &#40;$error_string == ''&#41; <br />&nbsp;&nbsp;{ <br />&nbsp;&nbsp;&nbsp;&nbsp;$result = db_query&#40;&#34;SELECT username FROM users WHERE username='$username';&#34;&#41;; <br />&nbsp;&nbsp;&nbsp;&nbsp;if &#40;mysql_num_rows&#40;$result&#41; &#62; 0&#41; $error_string .= 'The username is already registered.&#60;br&#62;'; <br />&nbsp;&nbsp;&nbsp;&nbsp;else <br />&nbsp;&nbsp;&nbsp;&nbsp;{ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$password = sha1&#40;$password&#41;; // hash password once <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db_query&#40;&#34;INSERT INTO users &#40;username, password&#41; VALUES &#40;'$username', '$password'&#41;;&#34;&#41;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header&#40;'Location&#58; thankyou.php'&#41;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit&#40;&#41;; <br />&nbsp;&nbsp;&nbsp;&nbsp;} <br />&nbsp;&nbsp;} <br />} <br />?&#62;<br />&#60;!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01//EN&#34; &#34;http&#58;//www.w3.org/TR/html4/strict.dtd&#34;&#62;<br />&#60;html&#62;<br />&nbsp;&nbsp;&#60;head&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;title&#62;Register&#60;/title&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;style type=&#34;text/css&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;.error_text {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color&#58; #FF0000;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&#58; 400px;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text-align&#58; center;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;.left_box {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float&#58; left;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&#58; 150px;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text-align&#58; right;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-right&#58; 5px;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;.right_box {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clear&#58; right;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/style&#62;<br />&nbsp;&nbsp;&#60;/head&#62;<br />&nbsp;&nbsp;&#60;body&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;error_text&#34;&#62;&#60;?php echo $error_string; ?&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;form action=&#34;register.php&#34; method=&#34;post&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;input type=&#34;hidden&#34; name=&#34;page_mode&#34; value=&#34;register&#34;&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;left_box&#34;&#62;Username&#60;/div&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;right_box&#34;&#62;&#60;input type=&#34;text&#34; name=&#34;username&#34; size=&#34;30&#34; maxlength=&#34;255&#34; value=&#34;&#60;?php if &#40;isset&#40;$username&#41;&#41; echo $username; ?&#62;&#34;&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;left_box&#34;&#62;Password&#60;/div&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;right_box&#34;&#62;&#60;input type=&#34;password&#34; name=&#34;password&#34; size=&#34;30&#34;&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;left_box&#34;&#62;Confirm Password&#60;/div&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;right_box&#34;&#62;&#60;input type=&#34;password&#34; name=&#34;conf_password&#34; size=&#34;30&#34;&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;left_box&#34;&#62;&nbsp;&#60;/div&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;right_box&#34;&#62;&#60;input type=&#34;submit&#34; value=&#34;Register&#34; size=&#34;30&#34;&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/form&#62;<br />&nbsp;&nbsp;&#60;/body&#62;<br />&#60;/html&#62;<!--c2--></div><!--ec2--><br /><br />Login Code<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> &#60;?php <br /><br />session_start&#40;&#41;; <br />$error_string = ''; # error_string is modified in db.php! <br />require_once 'db.php'; <br />$page_mode = $_POST&#91;'page_mode'&#93;; # empty variable defaults to '' &#40;or null&#41; <br /><br />if &#40;$page_mode === 'login'&#41; <br />{ <br />&nbsp;&nbsp;$username = mysql_real_escape_string&#40;trim&#40;$_POST&#91;'username'&#93;&#41;&#41;; <br />&nbsp;&nbsp;$password = $_POST&#91;'password'&#93;; <br /><br />&nbsp;&nbsp;if &#40;$username == '' || strlen&#40;$password&#41; == 0&#41; # password can be of spaces, which must not be trimmed! <br />&nbsp;&nbsp;&nbsp;&nbsp;$error_string .= 'Please enter your username and password.&#60;br&#62;'; <br />&nbsp;&nbsp;else <br />&nbsp;&nbsp;{ <br />&nbsp;&nbsp;&nbsp;&nbsp;$result = db_query&#40;&#34;SELECT id, username, password FROM users WHERE username='$username';&#34;&#41;; <br />&nbsp;&nbsp;&nbsp;&nbsp;if &#40;!&#40;$row = mysql_fetch_assoc&#40;$result&#41;&#41;&#41; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$error_string .= 'The username was not found.&#60;br&#62;'; <br />&nbsp;&nbsp;&nbsp;&nbsp;else if &#40;$row&#91;'password'&#93; != sha1&#40;$password&#41;&#41; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$error_string .= 'The password did not match.&#60;br&#62;'; <br />&nbsp;&nbsp;&nbsp;&nbsp;else <br />&nbsp;&nbsp;&nbsp;&nbsp;{ <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION&#91;'user_id'&#93; = $row&#91;'id'&#93;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION&#91;'user_name'&#93; = $row&#91;'username'&#93;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header&#40;'Location&#58; /'&#41;; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit&#40;&#41;; <br />&nbsp;&nbsp;&nbsp;&nbsp;} <br />&nbsp;&nbsp;} <br />} <br />?&#62;<br />&#60;!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01//EN&#34; &#34;http&#58;//www.w3.org/TR/html4/strict.dtd&#34;&#62;<br />&#60;html&#62;<br />&nbsp;&nbsp;&#60;head&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;title&#62;Register&#60;/title&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;style type=&#34;text/css&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;.error_text {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color&#58; #FF0000;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&#58; 400px;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text-align&#58; center;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;.left_box {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;float&#58; left;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width&#58; 150px;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text-align&#58; right;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-right&#58; 5px;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;.right_box {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clear&#58; right;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/style&#62;<br />&nbsp;&nbsp;&#60;/head&#62;<br />&nbsp;&nbsp;&#60;body&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;error_text&#34;&#62;&#60;?php echo $error_string; ?&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;form action=&#34;login.php&#34; method=&#34;post&#34;&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;input type=&#34;hidden&#34; name=&#34;page_mode&#34; value=&#34;login&#34;&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;left_box&#34;&#62;Username&#60;/div&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;right_box&#34;&#62;&#60;input type=&#34;text&#34; name=&#34;username&#34; size=&#34;30&#34; maxlength=&#34;255&#34; value=&#34;&#60;?php if &#40;isset&#40;$username&#41;&#41; echo $username; ?&#62;&#34;&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;left_box&#34;&#62;Password&#60;/div&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;right_box&#34;&#62;&#60;input type=&#34;password&#34; name=&#34;password&#34; size=&#34;30&#34;&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;left_box&#34;&#62;&nbsp;&#60;/div&#62;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;div class=&#34;right_box&#34;&#62;&#60;input type=&#34;submit&#34; value=&#34;Log In&#34; size=&#34;30&#34;&#62;&#60;/div&#62;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&#60;/form&#62;<br />&nbsp;&nbsp;&#60;/body&#62;<br />&#60;/html&#62;<!--c2--></div><!--ec2--><br />]]></description>
		<pubDate>Sun, 11 Oct 2009 10:40:49 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28064</guid>
	</item>
	<item>
		<title>Question About Fopen</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28063</link>
		<description><![CDATA[<b>Hello.<br />I'm new here, I'm coming from Israel, And i dont know english very well.<br />I have a question about "fopen", "fclose", etc.<br />What does it do?<br />Thank you, Orel.</b>]]></description>
		<pubDate>Sun, 11 Oct 2009 07:40:50 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28063</guid>
	</item>
	<item>
		<title>Select One Id From Db When There Is More Than One</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28059</link>
		<description><![CDATA[In my database I have an id repeating about 12 times but I only want it to show up once when I use this code<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />include'connect.php';<br /><br />mysql_select_db&#40;&#34;$dbname&#34;&#41;;<br />$query&nbsp;&nbsp;= &#34;SELECT id FROM user&#34;;<br />$result = mysql_query&#40;$query&#41; or die&#40;mysql_error&#40;&#41;&#41;;<br />while&#40;$row = mysql_fetch_array&#40;$result, MYSQL_ASSOC&#41;&#41;<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo &#34;{$row&#91;'id'&#93;}&#34;;<br />} <br />?&#62;<!--c2--></div><!--ec2--><br /><br />Help please?]]></description>
		<pubDate>Sun, 11 Oct 2009 04:46:47 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28059</guid>
	</item>
	<item>
		<title>Deny User 2nd Similar Form Enrty</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28056</link>
		<description><![CDATA[So I want to stop my potential website users from entering similar information twice.  An example would be like if a person filled out my form and used RED CAR AUTOMATIC and then tried to re-enter the info a second time as RED SPORTS CAR WITH AUTO TRANSMISSION.  These are similar in topic and I need to block the second entry since the second one is blatantly the same thing.<br /><br />I don't need a full blown explanation but at least some direction - like what functions I should be using and/or a simple idea of a script to get me in the right direction.  Anybody?]]></description>
		<pubDate>Sat, 10 Oct 2009 22:35:02 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28056</guid>
	</item>
	<item>
		<title>35 Php Programming Tips/tricks.</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28055</link>
		<description><![CDATA[Security:<br /><b>1-</b> Do not save included files such as FileName.inc!<br />Use FileName.class.php or FileName.include.php or...<br />Or use an HTAccess file to determine the access levels:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;FilesMatch &#34;&#092;.&#40;htaccess|inc&#41;$&#34;&#62;<br />Order Allow,Deny<br />Allow from localhost<br />Allow from 127.0.0.1<br />Deny from all<br /><br /># Or<br /><br />AddType application/x-httpd-php .inc .php .php3 .php4 .php5 .php6 .phphtml<br />AddHandler application/x-httpd-php .inc .php .php3 .php4 .php5 .php6 .phphtml<br />&#60;/FilesMatch&#62;<!--c2--></div><!--ec2--><br /><br />Speed:<br /><b>2-</b> DONT open/close PHP tags for excessive.<br /><br />Security & optimization:<br /><b>3-</b> Start your PHP classes with __construct function or ClassName function.<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->class MyClass<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;public function __construct&#40;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Codes...<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /># Or<br />class MyClass<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;public function MyClass&#40;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Codes...<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<!--c2--></div><!--ec2--><br />If you do not use class inheritance, Start classes and functions with the Final keyword.<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->final class MyClass<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;final public function MyClass&#40;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Codes...<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;final private function MyFunction&#40;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# Codes...<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<!--c2--></div><!--ec2--><br /><br />Security:<br /><b>4-</b> Dont store passwords/Showing values in Cookies(Can be change by hacker)!<br /><br />Security:<br /><b>5-</b> If you do not use object cloning, add a __clone function in your class(Thats safe):<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->class MyClass<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;public function __clone&#40;&#41;<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<!--c2--></div><!--ec2--><br /><br /><br />Security & speed & optimization:<br /><b>6-</b> Use $_REQUEST instead of $_GET & $_POST.(REQUEST covering post & get abilities/facilities)<br /><br />Security & optimization:<br /><b>7-</b> DONT use SQLite for HEAVY(lol) softwares! Becuse:<br /><u>No need for server processing!</u> Maybe this is a good point, but have a series of large and dangerous problems: File locking, issues syndicate, memory problems, lack cash query, binary problems, overflow and...<br /><u>Binary safe!</u> For insert data as binary type, you must first Encode it. So, after a Select, you must Encode/Decode retrieved data(for x times!). <br /><u>All tables gone locked in operations!</u> So still/bad reading & writing!<br /><br />Speed & optimization:<br /><b>8-</b> The PHP standard functions better than PCRE functions(TestIt).<br />(if you dont need expressions).<br />str_replace better than preg_replace.<br />stristr better than eregi.<br />socket functions better than curl functions.<br />stream functions better than curl & fopen functions.<br />and...<br /><br />Security & optimization:<br /><b>9-</b> Before using the classes & functions, make sure to existential!<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if&#40;!extension_loaded&#40;'mysql'&#41;&#41;&#58; exit&#40;'Extension MySQL not loaded.'&#41;; <br />endif;<br />...<br />if&#40;function_exists&#40;'mysql_real_escape_string'&#41;&#41;&#58; mysql_real_escape_string&#40;...&#41;; <br />else&#58; mysql_escape_string&#40;...&#41;; <br />endif;<br />...<br />if&#40;function_exists&#40;'settype'&#41;&#41;&#58; settype&#40;$Str_Input, 'string'&#41;;<br />else&#58; &#40;string&#41;$Str_Input;<br />endif;<!--c2--></div><!--ec2--><br /><br />Security & optimization:<br /><b>10-</b> alphabet coding static!<br />Between(correct):<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;input name=&#34;InpTxt_Username&#34; type=&#34;text&#34; value=&#34;&#34; maxlength=&#34;15&#34; size=&#34;15&#34; id=&#34;InpTxt_Username&#34;&#62;<!--c2--></div><!--ec2--> <br />And(wrong):<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;input type=&#34;text&#34; name=&#34;InpTxt_Username&#34; id=&#34;InpTxt_Username&#34;&#62;<!--c2--></div><!--ec2--><br />Very different, and instead abuse is. <br />Even between parameters CSS(wrong): <br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->overflow&#58; hidden; width&#58; 250px; height&#58; auto;<!--c2--></div><!--ec2--><br />And(right):<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->width&#58; 250px; height&#58; auto; overflow&#58; hidden;<!--c2--></div><!--ec2--><br />Very different, and instead abuse is. <br />Also between(correct): <br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->$_REQUEST&#91;'FormName'&#93;, $_REQUEST&#91;'SubmitButtonName'&#93;... <br />And&#40;wrong&#41;&#58;<br />&#91;CODE&#93;$_GET&#91;'FormName'&#93;, $_GET&#91;'SubmitButtonName'&#93;...<!--c2--></div><!--ec2--><br />Very different and abuse is in place. <br />So, after writing these(even if they are automatically insert), please watchfulness!<br /><br />Security & optimization:<br /><b>11-</b> Dont use Var method in your PHP classes(Var is not safe!). Var == public(in PHP 5)! use <b>protected/public/private</b> methods instead of var.<br /><br />Speed & optimization:<br /><b>12-</b> Use self:: and parent:: instead of ClassName::.<br /><br />Security:<br /><b>13-</b> Common vulnerability!<br />/index.php?Module=News&Action=Show&Identity=1&Valid=True...<br />Can be:<br />/index.php?Module=&#46;&#46;/!!!!!&Action=Show&Identity=-1'!!!!!&Valid=True...<br /><b>So careful!</b> Check & filter HTTP inputs(UserAgent, HTTPQuery, POST/GET/REQUEST, referer...)!<br /><br />Security:<br /><b>14-</b> Set permission of all files to readonly(Also index.html or index.php in empty folders!).<br /><br />Security & optimization:<br /><b>15-</b> Dont use short tags like &lt;? and ?&gt; in your codes(short_open_tag). Becuse ttis option is Off! in most servers.<br /><br />Security & speed & optimization:<br /><b>16-</b> Defensive programming for DOS/DDOS attacks:<br />Limit HTTP post packets.<br />Limit body requests.<br />Limit file upload size.<br />Use HTTP/Output compression.<br />Optimize Client-side codes/files.<br />Dont redirect HTTP errors to index page(Also you may have a dangerous referer!).<br />Use standard image formats(JPE, JPG, JPEG...).<br />Handle repetitions & duplications(Forms, URL, Postback...).<br />and...<br /><br />Security & optimization:<br /><b>17-</b> Create/Change your database tables in UTF-8 charset(NO LATIN!).<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->charset= 'utf8' collate= 'utf8_general_ci<!--c2--></div><!--ec2--><br /><br />Software size & optimization:<br /><b>18-</b> Dont put bad comments or excessive comments like ####################################... or /////////////////////////////////...(This is web programming not desktop programming)!<br /><br />Speed & optimization:<br /><b>19-</b> Define your functons in class using static method(If possible).<br /><br />Speed & optimization:<br /><b>20-</b> Dont use print statement in <b>web</b> applications!<br /><br />Security & optimization:<br /><b>21-</b> Check your tables before Create/Drop durin installation(For errors/warnings).<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->drop table if exists &#96;xxxxx&#96;;<br />create table if not exists &#96;xxxxx&#96;;<!--c2--></div><!--ec2--><br /><br />Security:<br /><b>22-</b> Set a password for database(Dont leave it default).<br /><br />Security & speed & optimization:<br /><b>23-</b> Options proposed for PHP.ini:<br />asp_tags Off<br />implicit_flush On<br /><b>expose_php Off</b><br />max_execution_time 60<br />max_input_time 60<br />default_socket_timeout 60<br /><b>register_globals Off</b>(+9999E+ times been told).<br />session.auto_start 0<br /><b>DATABASE.allow_persistent Off</b><br /><b>DATABASE.max_persistent 1</b><br /><b>set DATABASE.default_user <br />set DATABASE.default_password</b><br />Session.hash_function 1(SHA1)<br /><b>mbstring.func_overload to 0</b>(<a href="http://bugs.php.net/bug.php?id=30766" target="_blank">http://bugs.php.net/bug.php?id=30766</a>).<br /><b>Put exec, system, passthru, shell_exec, proc_open, pcntl_exec in disable_functions option</b><br />safe_mode On(In normal reason)<br />And...<br /><br />Software size & optimization:<br /><b>24-</b> Clear all index.php & index.html contents in <b>empty folders</b>(This is web programming not desktop programming).<br /><br />Security & speed & optimization:<br /><b>25-</b> Make an htaccess file and put this settings into that:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;Limit PUT DELETE OPTIONS CONNECT&#62;<br />Order Allow,Deny<br />Allow from localhost<br />Allow from 127.0.0.1<br />Deny from all<br />&#60;/Limit&#62;<br /><br />&#60;Limit POST GET HEAD&#62;<br />Order Allow,Deny<br />Allow from all<br />Deny From &#34;255.255.255.255&#34;<br />Deny From &#34;0.0.0.0&#34;<br />Deny From &#34;1.1.1.1&#34;<br />Deny From &#34; &#34;<br />&#60;/Limit&#62;<br /><br />ServerSignature Off<br /><br />#LimitRequestBody 1024<br /><br />AddType application/x-httpd-php .php .php3 .php4 .php5 .php6 .phphtml<br /><br />AddHandler application/x-httpd-php .php .php3 .php4 .php5 .php6 .phphtml<br /><br />DirectoryIndex index.html index.php index.php3 index.php4 index.php5 index.php6 index.phphtml<br /><br />Options All -Indexes -ExecCGI -MultiViews<br /><br />&#60;FilesMatch &#34;&#092;.&#40;htaccess|sql|session|htpasswd|passwd&#41;$&#34;&#62;<br />Order Allow,Deny<br />Allow from localhost<br />Allow from 127.0.0.1<br />Deny from all<br />&#60;/FilesMatch&#62;<br /><br /># Hmmm?!...<br />&#60;Files &#34;robots.txt&#34;&#62;<br />Order Allow,Deny<br />Allow from localhost<br />Allow from 127.0.0.1<br />Deny from all<br />&#60;/Files&#62;<br /><br />#AcceptPathInfo On<br /><br />&#60;IfModule security_module&#62;<br />SecFilterEngine DynamicOnly<br />SecFilterScanPOST On<br />SecFilterCheckURLEncoding On<br />SecFilterCheckCookieFormat On<br />SecFilterCheckUnicodeEncoding Off<br />SecFilterForceByteRange 1 255<br />SecServerSignature &#34;&#34;<br />SecFilter &#34;delete&#91;&#91;&#58;space&#58;&#93;&#93;+from&#34;<br />SecFilter &#34;insert&#91;&#91;&#58;space&#58;&#93;&#93;+into&#34;<br />SecFilter &#34;concat&#34;<br />SecFilter &#34;union&#34;<br />SecFilter &#34;select.+from&#34;<br />SecFilter &#34;select+*+from&#34;<br />&#60;/IfModule&#62;<!--c2--></div><!--ec2--><br /><br />Security & speed & optimization:<br /><b>26-</b> If you have a multi language application, dont put all language arrays/variables into a one file!<br />You can do this: global.php, index.php, login.php, menu.php and...<br /><br />Security & optimization:<br /><b>27-</b> DONT use GLOBALS$/global(+9999999E+ times been told)! This is scope. Unset not supported. Not safe. not seucre. not *****!<br /><br />Security & optimization:<br /><b>28-</b> An suggest: Use require & require_once instead of than include & include_once.<br /><br />Security:<br /><b>29-</b> After the installation/configuration software, delete setup/installation files & folder.<br /><br />Speed:<br /><b>30-</b> Use switch command instead of multi-conditional(if, elseif...).<br /><br />Speed & optimization:<br /><b>31-</b> Dont add @(Error suppression) in the before heavy function(Or all function!).<br /><br />Security & speed & optimization:<br /><b>32-</b> Unset variables, arrays, HTTP requests and.. after usage. Plz!<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->unset&#40;$variable, $array...&#41;;<br /># ...<br />unset&#40;$_SERVER&#91;'QUERY_STRING'&#93;, $_SERVER&#91;'REQUEST_URI'&#93;, ...&#41;<br /># ...<br />$obj_myclass= new myclass&#40;&#41;;<br /># uages & codes...<br />$obj_myclass= null;<!--c2--></div><!--ec2--><br /><br />Speed & optimization:<br /><b>33-</b> Put your <b>short</b> PHP codes into a html file. Not PHP file.<br /><br />Security & optimization:<br /><b>34-</b> Use <b>session_unset</b> and <b>session_destroy</b> after usage of session(Not just session_destroy!).<br /><br /><b>35-</b> Finaly, check size, resolution and... uploaded images!<br />Otherwise your file can be:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php<br />@system&#40;$_REQUEST&#91;'Command'&#93;&#41;;<br />?&#62;<br />or<br />&#60;?php<br />worm, cookiestealer...<br />?&#62;<br />or<br />...<!--c2--></div><!--ec2--><br /><i>Sorry for bad English</i>. <img src="http://w3schools.invisionzone.com/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br /><b>Goodluck.</b> <img src="http://w3schools.invisionzone.com/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />]]></description>
		<pubDate>Sat, 10 Oct 2009 17:18:46 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28055</guid>
	</item>
	<item>
		<title>Query Problem</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28052</link>
		<description><![CDATA[&lt;b&gt;Warning&lt;/b&gt;:  odbc_exec() [&lt;a href='function.odbc-exec'&gt;function.odbc-exec&lt;/a&gt;]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecDirect in &lt;b&gt;C:&#092;Inetpub&#092;wwwroot&#092;php_new&#092;main.php&lt;/b&gt; on line &lt;b&gt;13&lt;/b&gt;&lt;br /&gt;<br /><br />i had made this query and that error occured.<br />$rs = odbc_exec($con,"SELECT * FROM point WHERE Name='" . $_COOKIE['username'] . "'");<br />where point is the name of table which consists of three columns point(number),reason(text),name(text)<br />$_COOKIE['username'] is text..]]></description>
		<pubDate>Sat, 10 Oct 2009 16:28:14 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28052</guid>
	</item>
	<item>
		<title>Php Is Adding Â Before £</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28046</link>
		<description><![CDATA[I've got a real oddity going on here.<br /><br />On a page I have a bit of code:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;?php require_once&#40;'includes/basketdiv.php'&#41;; ?&#62;<!--c2--></div><!--ec2--><br /><br />On a more complex page when it outputs the content of that file it adds a Â before the £. For example "Basket Items: 0 | Total Price: Â£". However, on a very simplistic page it outputs the contents of the file correctly.<br /><br />The total content of the file is:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;div class=&#34;basketdiv&#34;&#62;&#60;a href=basket.php&#62;Basket Items&#58; 0 | Total Price&#58; £0&#60;/a&#62;&#60;/div&#62;<!--c2--></div><!--ec2--><br /><br />This is just part of a website test I'm going through, my only thought is that the more complex page includes some echo's in it rather than print. Could that be affecting it? (It also has the results of a sql query)<br /><br />Any suggestions on how to resolve this? A quick search on Google results in <a href="http://bugs.php.net/bug.php?id=46819" target="_blank">unhelpful responses</a> from php devs.]]></description>
		<pubDate>Sat, 10 Oct 2009 13:52:18 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28046</guid>
	</item>
	<item>
		<title>$argv Not Sure How To Use Like I Need It</title>
		<link>http://w3schools.invisionzone.com/index.php?showtopic=28043</link>
		<description><![CDATA[I understand that this variable will hold all of the arguments passed to the script but I cant seem to get it to work correctly. I'm trying to pass the array into a single string so it will print out all of them. <br /><br />But before we get carried away, I  want to make sure this is what i need.<br /><br />Im trying to determine what is typed in the address bar after the ?<br /><br />e.g:<br />.&#46;&#46;/index.php?p=home&x=10&y=20<br /><br />i need the script to know that p=home&x=10&y=20 is already entered into the address bar and put that into a string on load of the page.<br /><br />e.g:<br />$args = ...;<br /><br /><br />thanks for any help]]></description>
		<pubDate>Sat, 10 Oct 2009 05:46:19 -0400</pubDate>
		<guid>http://w3schools.invisionzone.com/index.php?showtopic=28043</guid>
	</item>
</channel>
</rss>