<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Hot Scripts Forums - PHP</title>
		<link>http://www.hotscripts.com/forums/</link>
		<description><![CDATA[PHP is quickly becoming the most popular scripting language on the 'Net.  Here you can find any and all discussion regarding PHP. If you are looking for a specific script, please request it in the "Script Request"]]></description>
		<language>en</language>
		<lastBuildDate>Sun, 22 Nov 2009 20:27:46 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://cdn.hotscripts.com/forums/hsforum/misc/rss.jpg</url>
			<title>Hot Scripts Forums - PHP</title>
			<link>http://www.hotscripts.com/forums/</link>
		</image>
		<item>
			<title>plz help me</title>
			<link>http://www.hotscripts.com/forums/php/55947-plz-help-me.html</link>
			<pubDate>Sat, 21 Nov 2009 15:17:51 GMT</pubDate>
			<description>hi 
i m new to php.can anybosy tell me how to use php with xmlpost. 
 
can anybosy giveme some example so that i can understand or give me any book suggestions. 
 
plz asap</description>
			<content:encoded><![CDATA[<div>hi<br />
i m new to php.can anybosy tell me how to use php with xmlpost.<br />
<br />
can anybosy giveme some example so that i can understand or give me any book suggestions.<br />
<br />
plz asap</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>riya123</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55947-plz-help-me.html</guid>
		</item>
		<item>
			<title>PHP4 to PHP5 issue help</title>
			<link>http://www.hotscripts.com/forums/php/55942-php4-php5-issue-help.html</link>
			<pubDate>Fri, 20 Nov 2009 21:19:04 GMT</pubDate>
			<description><![CDATA[i have a page with a switch statement 
 
on php4 i was able to put this line of code in the add bar "video.php?viewby=job&&job=AI-5254" 
 
and now on php 5 that doesnt work im not recieving any errors 
 
any suggestions?]]></description>
			<content:encoded><![CDATA[<div>i have a page with a switch statement<br />
<br />
on php4 i was able to put this line of code in the add bar &quot;video.php?viewby=job&amp;&amp;job=AI-5254&quot;<br />
<br />
and now on php 5 that doesnt work im not recieving any errors<br />
<br />
any suggestions?</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>tc325</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55942-php4-php5-issue-help.html</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Random Id From table]]></title>
			<link>http://www.hotscripts.com/forums/php/55936-random-id-table.html</link>
			<pubDate>Thu, 19 Nov 2009 23:12:18 GMT</pubDate>
			<description>Heya guys 
 
ok i have a table in my db called room under the table i have roomid and z the roomid can be anything from 1 - 1000 but the z will be the same if its the same area. now what i wanna do is select from roomid where id=300 that will then give the z from that table in this case 3 
 
so...</description>
			<content:encoded><![CDATA[<div>Heya guys<br />
<br />
ok i have a table in my db called room under the table i have roomid and z the roomid can be anything from 1 - 1000 but the z will be the same if its the same area. now what i wanna do is select from roomid where id=300 that will then give the z from that table in this case 3<br />
<br />
so right now i have z=3 ,what i now wanna do is get all the roomid's where z=3 and choose a random one, and display it as a variable<br />
<br />
How can i do that ?<br />
<br />
Cheers<br />
Mike</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>smithygotlost</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55936-random-id-table.html</guid>
		</item>
		<item>
			<title>Php Sum()</title>
			<link>http://www.hotscripts.com/forums/php/55924-php-sum.html</link>
			<pubDate>Wed, 18 Nov 2009 20:31:31 GMT</pubDate>
			<description>Heya Guys 
 
Im not sure im doing something wrong or whats happening, But im trying to get the total of the field points, when i run 
 
 
PHP: 
--------- 
select sum(points) from user 
--------- 
in the database i get the total perfectly but when i make</description>
			<content:encoded><![CDATA[<div>Heya Guys<br />
<br />
Im not sure im doing something wrong or whats happening, But im trying to get the total of the field points, when i run<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">select&nbsp;sum</span><span style="color: #007700">(</span><span style="color: #0000BB">points</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">from&nbsp;user&nbsp;<br /></span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>in the database i get the total perfectly but when i make<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">$adminpoints&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"select&nbsp;sum(points)&nbsp;from&nbsp;user"</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>I get an Resource id #68 error<br />
<br />
Am i doing something wrong ?<br />
<br />
Cheers<br />
Mike</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>smithygotlost</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55924-php-sum.html</guid>
		</item>
		<item>
			<title>file get contents</title>
			<link>http://www.hotscripts.com/forums/php/55920-file-get-contents.html</link>
			<pubDate>Wed, 18 Nov 2009 04:38:50 GMT</pubDate>
			<description><![CDATA[hi all 
 
 
PHP: 
--------- 
 
<?php 
$article = file_get_contents('http://www.domain.com/article_eng.html'); 
$qry="insert into article_data (article) values('$aricle')"; 
$result=mysql_query($qry);]]></description>
			<content:encoded><![CDATA[<div>hi all<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<br /><span style="color: #0000BB">&lt;?php<br />$article&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://www.domain.com/article_eng.html'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$qry</span><span style="color: #007700">=</span><span style="color: #DD0000">"insert&nbsp;into&nbsp;article_data&nbsp;(article)&nbsp;values('$aricle')"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$result</span><span style="color: #007700">=</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #0000BB">$qry</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>with this function i can crawl my html page and fetch its content and add in database.<br />
<br />
but i would like to know that my html page has <br />
<br />
1) article title<br />
2) author name<br />
3) description<br />
<br />
i dont want any images or any other data like nav, header, footer.<br />
<br />
so how will i fetch these 3 things separately.<br />
<br />
vineet</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>vinpkl</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55920-file-get-contents.html</guid>
		</item>
		<item>
			<title>mysql table... how big is too big?</title>
			<link>http://www.hotscripts.com/forums/php/55916-mysql-table-how-big-too-big.html</link>
			<pubDate>Wed, 18 Nov 2009 01:10:43 GMT</pubDate>
			<description><![CDATA[I'm making an application where users can save their own quizzes onto the system. At the moment I have a 'questions' table that stores all the questions from all the quizzes and users. 
 
I was wondering if this is the best way to do it? I imagine if every user has 100 questions on average...]]></description>
			<content:encoded><![CDATA[<div>I'm making an application where users can save their own quizzes onto the system. At the moment I have a 'questions' table that stores all the questions from all the quizzes and users.<br />
<br />
I was wondering if this is the best way to do it? I imagine if every user has 100 questions on average submitted, with hundreds of users, the amount of rows in the single table will be huge eventually.<br />
<br />
Will this cause performance problems? My alternative is to give every user there own table, but I was wondering if this is entirely necessary? Can mysql handle huge amount of rows without a problem?</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>mjjwatson</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55916-mysql-table-how-big-too-big.html</guid>
		</item>
		<item>
			<title>Blocking domains with preg_match?</title>
			<link>http://www.hotscripts.com/forums/php/55915-blocking-domains-preg_match.html</link>
			<pubDate>Wed, 18 Nov 2009 01:04:48 GMT</pubDate>
			<description><![CDATA[I've been toying with the idea of using explode() and a preg_match to disallow all emails from .ru domains and gawab.com from registering on my site due to the fact that they are mainly used by spammers/hackers and bots. 
 
However, I must be doing something wrong with the preg_match (lines 87 to...]]></description>
			<content:encoded><![CDATA[<div>I've been toying with the idea of using explode() and a preg_match to disallow all emails from .ru domains and gawab.com from registering on my site due to the fact that they are mainly used by spammers/hackers and bots.<br />
<br />
However, I must be doing something wrong with the preg_match (lines 87 to 92). I currently have the preg_match commented out because it causes the website to not pull up, it just shows a white background. If I comment out the preg_match it works fine. I've been experimenting with the preg_match in RegexBuddy but I still can't quite get it to work.<br />
<br />
Also, the &quot;echo $domain[1]&quot; code is there as a debug so I could make sure that the explode was working properly.<br />
<br />
For now I'm only trying to disallow all .ru domains but I'd like to add gawab.com to the list as well at some point.<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">php Code:</div>
	<pre class="alt2" style="margin:0px; padding:6px; border:1px inset; width:640px; height:516px; overflow:auto"><div dir="ltr" style="text-align:left;"><div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">include</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'../includes/constants.php'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!DOCTYPE html&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;html lang=<span style="color: #ff0000;">"en"</span>&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;head&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;meta charset=<span style="color: #ff0000;">"utf-8"</span>&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;script type=<span style="color: #ff0000;">"text/javascript"</span>&gt;&nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> RecaptchaOptions = <span style="color: #66cc66;">&#123;</span>&nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;theme : <span style="color: #ff0000;">'clean'</span>&nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>;&nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;title&gt;Welcome to my Website!&lt;/title&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/head&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;body&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">We are hard at work getting the site up and running! We are hoping to get running around December or January.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">If</span> you would like us to notify you when we get setup fill out the form below with your name and email address.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">require_once</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'../reCAPTCHA/recaptchalib.php'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Keys from &#91;url&#93;http://recaptcha.net/api/getkey&#91;/url&#93;.</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$publickey</span> = <span style="color: #ff0000;">"&#91;deleted&#93;"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$privatekey</span> = <span style="color: #ff0000;">"&#91;deleted&#93;"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># the response from reCAPTCHA </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$resp</span> = <span style="color: #000000; font-weight: bold;">null</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># the error code from reCAPTCHA, if any </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$error</span> = <span style="color: #000000; font-weight: bold;">null</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #000066;">isset</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$_POST</span>&amp;<span style="color: #808080; font-style: italic;">#91;'submitted'&#93;)) {</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">require_once</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'../includes/sanitize.php'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Sanitize data before validation</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$c_fname</span> = sanitize<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">15</span>, <span style="color: #0000ff;">$_POST</span>&amp;<span style="color: #808080; font-style: italic;">#91;'first_name'&#93;);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$c_lname</span> = sanitize<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">25</span>, <span style="color: #0000ff;">$_POST</span>&amp;<span style="color: #808080; font-style: italic;">#91;'last_name'&#93;);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$c_email</span> = sanitize<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">60</span>, <span style="color: #0000ff;">$_POST</span>&amp;<span style="color: #808080; font-style: italic;">#91;'email'&#93;);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$c_email_<span style="color: #cc66cc;">2</span></span> = sanitize<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">60</span>, <span style="color: #0000ff;">$_POST</span>&amp;<span style="color: #808080; font-style: italic;">#91;'email_2'&#93;);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">////////////////////////////////////////////////////</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// BotScout.com &quot;BotBuster&quot; check</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">require_once</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'../includes/BotScout.php'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">////////////////////////////////////////////////////</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$resp</span> = recaptcha_check_answer <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$privatekey</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$_SERVER</span>&amp;<span style="color: #808080; font-style: italic;">#91;&quot;REMOTE_ADDR&quot;&#93;,</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$_POST</span>&amp;<span style="color: #808080; font-style: italic;">#91;&quot;recaptcha_challenge_field&quot;&#93;,</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$_POST</span>&amp;<span style="color: #808080; font-style: italic;">#91;&quot;recaptcha_response_field&quot;&#93;);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$resp</span>-&gt;<span style="color: #006600;">is_valid</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">require_once</span><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/mysql"><span style="color: #000066;">MYSQL</span></a><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Validate the first name</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$fResult</span> = <a href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"/^&#91;a-zA-Z<span style="color: #000099; font-weight: bold;">\.</span>&#93;{1,15}/"</span>, <span style="color: #0000ff;">$c_fname</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<span style="color: #0000ff;">$fResult</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">/* If it didn't match okay. */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Validate last name</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$lResult</span> = <a href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"/^&#91;a-zA-Z<span style="color: #000099; font-weight: bold;">\-</span>.&#93;{1,25}/"</span>, <span style="color: #0000ff;">$c_lname</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<span style="color: #0000ff;">$lResult</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">/* If it didn't match okay. */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Is the email valid and not empty?</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$c_email_<span style="color: #cc66cc;">2</span></span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;p&gt;Please go back and enter your email address in both fields.&lt;/p&gt;'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/exit"><span style="color: #000066;">exit</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$c_email</span> !== <span style="color: #0000ff;">$c_email_<span style="color: #cc66cc;">2</span></span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;p&gt;The email fields do not match. Please go back and confirm them again.&lt;/p&gt;'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/exit"><span style="color: #000066;">exit</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> isValidEmail<span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$c_email</span> = <span style="color: #000000; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$eResult</span> = <a href="http://www.php.net/preg_match"><span style="color: #000066;">preg_match</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">"/^ </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;<span style="color: #000099; font-weight: bold;">\d</span><span style="color: #000099; font-weight: bold;">\w</span><span style="color: #000099; font-weight: bold;">\/</span>+!=#|$?%{^&amp;}*`'~-&#93; </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;<span style="color: #000099; font-weight: bold;">\d</span><span style="color: #000099; font-weight: bold;">\w</span><span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\.</span>+!=#|$?%{^&amp;}*`'~-&#93;*@ </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;A-Z0-9&#93; </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;A-Z0-9.-&#93;{1,60} </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;A-Z0-9&#93;<span style="color: #000099; font-weight: bold;">\.</span> </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;A-Z&#93;{2,6}/"</span>, <span style="color: #0000ff;">$c_email</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<span style="color: #0000ff;">$eResult</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">/* If it didn't match okay. */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">/* This code doesn't quite work yet....</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $domain = explode('@', $c_email);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo $domain&#91;1&#93;;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $dResult = preg_match(&quot;/^&#91;A-Z0-9&#93;{1,60}\.ru$/&quot;, $domain&#91;1&#93;);</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($dResult)</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;&lt;p&gt;An error has occurred, please try again.&lt;/p&gt;&quot;;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit();</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<a href="http://www.php.net/empty"><span style="color: #000066;">empty</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$c_email</span><span style="color: #66cc66;">&#41;</span> &amp;&amp; <span style="color: #0000ff;">$c_email</span> == <span style="color: #0000ff;">$c_email_<span style="color: #cc66cc;">2</span></span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$access</span> = <span style="color: #ff0000;">"SELECT Email FROM customers WHERE Email='$c_email'"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$r</span> = mysqli_query<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$dbc</span>, <span style="color: #0000ff;">$access</span><span style="color: #66cc66;">&#41;</span> or <a href="http://www.php.net/trigger_error"><span style="color: #000066;">trigger_error</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Query: $access<span style="color: #000099; font-weight: bold;">\n</span>&lt;br /&gt;MySQL error: "</span> . mysqli_error<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$dbc</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//Insert information if email is unique:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>mysqli_num_rows<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$r</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$access</span> = <span style="color: #ff0000;">"INSERT INTO customers (Email, First, Last) VALUES ('$c_email', '$c_fname', '$c_lname')"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$r</span> = mysqli_query<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$dbc</span>, <span style="color: #0000ff;">$access</span><span style="color: #66cc66;">&#41;</span> or <a href="http://www.php.net/trigger_error"><span style="color: #000066;">trigger_error</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Query: $access<span style="color: #000099; font-weight: bold;">\n</span>&lt;br /&gt;MySQL error: "</span> . mysqli_error<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$dbc</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #66cc66;">&#40;</span>mysqli_num_rows<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$r</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">"&lt;p&gt;Your address has previously been recorded. We will notify you at $c_email when we are up and running.&lt;/p&gt;"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;p&gt;Your email address could not be recorded due to an error, please try again.&lt;/p&gt;'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//If user fails reCAPTCHA.</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #808080; font-style: italic;"># set the error code so that we can display it</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">$error</span> = <span style="color: #0000ff;">$resp</span>-&gt;<span style="color: #006600;">error</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #808080; font-style: italic;">// End reCAPTCHA else.</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mysqli_close<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$dbc</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #808080; font-style: italic;">// End Submit IF.</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">?&gt;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;form action=<span style="color: #ff0000;">""</span> method=<span style="color: #ff0000;">"post"</span>&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;fieldset&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p&gt;&lt;b&gt;First name:&lt;/b&gt; &lt;input type=<span style="color: #ff0000;">"text"</span> name=<span style="color: #ff0000;">"first_name"</span> size=<span style="color: #ff0000;">"20"</span> maxlength=<span style="color: #ff0000;">"15"</span> value=<span style="color: #ff0000;">"&lt;?php if(isset($c_fname)) echo $c_fname; ?&gt;"</span> /&gt;&lt;/p&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p&gt;&lt;b&gt;Last name:&lt;/b&gt; &lt;input type=<span style="color: #ff0000;">"text"</span> name=<span style="color: #ff0000;">"last_name"</span> size=<span style="color: #ff0000;">"20"</span> maxlength=<span style="color: #ff0000;">"25"</span> value=<span style="color: #ff0000;">"&lt;?php if(isset($c_lname)) echo $c_lname; ?&gt;"</span> /&gt;&lt;/p&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p&gt;&lt;b&gt;Email Address:&lt;/b&gt; &lt;input type=<span style="color: #ff0000;">"text"</span> name=<span style="color: #ff0000;">"email"</span> size=<span style="color: #ff0000;">"30"</span> maxlength=<span style="color: #ff0000;">"60"</span> value=<span style="color: #ff0000;">"&lt;?php if(isset($c_email)) echo $c_email; ?&gt;"</span> /&gt; <span style="color: #66cc66;">&#40;</span>Required<span style="color: #66cc66;">&#41;</span>&lt;/p&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;p&gt;&lt;b&gt;Confirm email address:&lt;/b&gt; &lt;input type=<span style="color: #ff0000;">"text"</span> name=<span style="color: #ff0000;">"email_2"</span> size=<span style="color: #ff0000;">"30"</span> maxlength=<span style="color: #ff0000;">"60"</span> value=<span style="color: #ff0000;">"&lt;?php if(isset($c_email_2)) echo $c_email_2; ?&gt;"</span> /&gt; <span style="color: #66cc66;">&#40;</span>Required<span style="color: #66cc66;">&#41;</span>&lt;/p&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> recaptcha_get_html<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$publickey</span>, <span style="color: #0000ff;">$error</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;br /&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/fieldset&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;div <span style="color: #000000; font-weight: bold;">class</span>=<span style="color: #ff0000;">"center"</span>&gt;&lt;input type=<span style="color: #ff0000;">"submit"</span> name=<span style="color: #ff0000;">"submit"</span> value=<span style="color: #ff0000;">"Register"</span> /&gt;&lt;/div&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;input type=<span style="color: #ff0000;">"hidden"</span> name=<span style="color: #ff0000;">"submitted"</span> value=<span style="color: #ff0000;">"TRUE"</span> /&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/form&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/body&gt;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/html&gt; </div></li></ol></div></div></pre>
</div></div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>PopSmith</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55915-blocking-domains-preg_match.html</guid>
		</item>
		<item>
			<title>pagination within a html table</title>
			<link>http://www.hotscripts.com/forums/php/55914-pagination-within-html-table.html</link>
			<pubDate>Tue, 17 Nov 2009 22:24:45 GMT</pubDate>
			<description><![CDATA[Hi, im trying to insert this code within a html script but the Prev 1 2 3 4 next is not displayed and also the DESC is to responding. Any Ideas? 
 
PHP: 
--------- 
<?php 
 
include ("connect.php"); 
 
 
// max display per page]]></description>
			<content:encoded><![CDATA[<div>Hi, im trying to insert this code within a html script but the Prev 1 2 3 4 next is not displayed and also the DESC is to responding. Any Ideas?<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">include&nbsp;(</span><span style="color: #DD0000">"connect.php"</span><span style="color: #007700">);<br /><br /><br /></span><span style="color: #FF8000">//&nbsp;max&nbsp;display&nbsp;per&nbsp;page<br /><br /></span><span style="color: #0000BB">$per_page&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">50</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;get&nbsp;start&nbsp;variable<br /><br /></span><span style="color: #0000BB">$start&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$_GET&nbsp;</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'start'</span><span style="color: #007700">&#93;;<br /><br /></span><span style="color: #FF8000">//&nbsp;count&nbsp;record<br /><br /></span><span style="color: #0000BB">$record_count&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_num_rows&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;*&nbsp;FROM&nbsp;flats&nbsp;ORDER&nbsp;BY&nbsp;date_posted&nbsp;DESC"</span><span style="color: #007700">));&nbsp;<br /><br /></span><span style="color: #FF8000">//count&nbsp;max&nbsp;pages<br /><br /></span><span style="color: #0000BB">$max_pages&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$record_count&nbsp;</span><span style="color: #007700">/&nbsp;</span><span style="color: #0000BB">$per_page</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;may&nbsp;come&nbsp;out&nbsp;as&nbsp;a&nbsp;decimal<br /><br /></span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">$start</span><span style="color: #007700">)<br /><br />&nbsp;&nbsp;</span><span style="color: #0000BB">$start&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;display&nbsp;data<br /></span><span style="color: #0000BB">$get&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;*&nbsp;FROM&nbsp;flats&nbsp;LIMIT&nbsp;$start,&nbsp;$per_page"</span><span style="color: #007700">);<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;while&nbsp;(</span><span style="color: #0000BB">$row&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_fetch_assoc</span><span style="color: #007700">(</span><span style="color: #0000BB">$get</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;{<br />&nbsp;<br />&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;get&nbsp;data&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$select</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'type'</span><span style="color: #007700">&#93;;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$title</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'title'</span><span style="color: #007700">&#93;;<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$location</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'location'</span><span style="color: #007700">&#93;;<br />&nbsp;&nbsp;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;div&gt;&lt;b&gt;$title&lt;/b&gt;&lt;/div&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;br&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"$select"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;br&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"$rent"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;br&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"$location"</span><span style="color: #007700">;<br />&nbsp;&nbsp;<br /><br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;setup&nbsp;the&nbsp;prev&nbsp;and&nbsp;next&nbsp;variables<br /><br /></span><span style="color: #0000BB">$prev&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$start&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">$per_page</span><span style="color: #007700">;&nbsp;<br /><br /></span><span style="color: #0000BB">$next&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$start&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">$per_page</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//show&nbsp;prev&nbsp;button<br /><br /></span><span style="color: #007700">if&nbsp;(!(</span><span style="color: #0000BB">$start</span><span style="color: #007700">&lt;=</span><span style="color: #0000BB">0</span><span style="color: #007700">))&nbsp;<br /><br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&nbsp;&lt;a&nbsp;href='londonfc_flats.php?start=$prev'&gt;&nbsp;&lt;&lt;&nbsp;Prev&nbsp;&lt;/a&gt;&nbsp;"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//show&nbsp;page&nbsp;numbers<br /><br />//&nbsp;set&nbsp;variable&nbsp;for&nbsp;first&nbsp;page<br /><br /></span><span style="color: #0000BB">$i</span><span style="color: #007700">=</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /><br />for&nbsp;(</span><span style="color: #0000BB">$x</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;</span><span style="color: #0000BB">$x</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">$record_count</span><span style="color: #007700">;</span><span style="color: #0000BB">$x</span><span style="color: #007700">=</span><span style="color: #0000BB">$x</span><span style="color: #007700">+</span><span style="color: #0000BB">$per_page</span><span style="color: #007700">)<br />{<br /><br />&nbsp;if&nbsp;(</span><span style="color: #0000BB">$start</span><span style="color: #007700">!=</span><span style="color: #0000BB">$x</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&nbsp;&lt;a&nbsp;href='londonfc_flats.php?start=$x'&gt;$i&nbsp;|&lt;/a&gt;&nbsp;"</span><span style="color: #007700">;<br /><br />else&nbsp;<br />&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&nbsp;&lt;a&nbsp;href='londonfc_flats.php?start=$x'&gt;&lt;b&gt;&nbsp;$i|&lt;/b&gt;&lt;/a&gt;&nbsp;"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$i</span><span style="color: #007700">++;<br /><br />}<br /><br /></span><span style="color: #FF8000">//show&nbsp;next&nbsp;button<br /><br />&nbsp;</span><span style="color: #007700">if&nbsp;(!(</span><span style="color: #0000BB">$start</span><span style="color: #007700">&gt;=</span><span style="color: #0000BB">$record_count</span><span style="color: #007700">-</span><span style="color: #0000BB">$per_page</span><span style="color: #007700">))<br />&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&nbsp;&lt;a&nbsp;href='londonfc_flats.php?start=$next'&gt;&nbsp;Next&nbsp;&gt;&gt;&lt;/a&gt;&nbsp;"</span><span style="color: #007700">;&nbsp;<br /><br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div></div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>balamberas</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55914-pagination-within-html-table.html</guid>
		</item>
		<item>
			<title>PHP replies</title>
			<link>http://www.hotscripts.com/forums/php/55912-php-replies.html</link>
			<pubDate>Tue, 17 Nov 2009 21:34:46 GMT</pubDate>
			<description><![CDATA[I'm currently building a site which requires users to post replies. 
 
I would like it so it takes note of the line breaks that the user has posted. 
 
Eg. When some posts this: 
 
Code: 
--------- 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel dolor metus.]]></description>
			<content:encoded><![CDATA[<div>I'm currently building a site which requires users to post replies.<br />
<br />
I would like it so it takes note of the line breaks that the user has posted.<br />
<br />
Eg. When some posts this:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel dolor metus. <br />
<br />
Aenean consectetur, magna sit amet volutpat fermentum, eros magna tincidunt est, et ultricies ipsum turpis in sem. <br />
<br />
Nunc blandit, diam dictum bibendum dapibus, ligula nisl porttitor est, non feugiat enim neque eu sem.</code><hr />
</div>It'll go in the database like this:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Lorem ipsum dolor sit amet, consectetur <br />
adipiscing elit. Donec vel dolor metus.<br />
&nbsp;Aenean consectetur, magna sit amet <br />
volutpat fermentum, eros magna <br />
tincidunt est, et ultricies ipsum turpis in <br />
sem. Nunc blandit, diam dictum bibendum <br />
dapibus, ligula nisl porttitor est, non feugiat <br />
enim neque eu sem.</code><hr />
</div>So when I try to return it like this:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'content'</span><span style="color: #007700">&#93;;&nbsp;<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>It'll show like it is in the database. How can I get it to take note of the line breaks?</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>SniperTowers</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55912-php-replies.html</guid>
		</item>
		<item>
			<title>php sms</title>
			<link>http://www.hotscripts.com/forums/php/55908-php-sms.html</link>
			<pubDate>Tue, 17 Nov 2009 12:02:45 GMT</pubDate>
			<description>hi 
 
how many  messages(Max num)  can we send at a time using php</description>
			<content:encoded><![CDATA[<div>hi<br />
<br />
how many  messages(Max num)  can we send at a time using php</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>hemi</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55908-php-sms.html</guid>
		</item>
		<item>
			<title>Script Name?</title>
			<link>http://www.hotscripts.com/forums/php/55907-script-name.html</link>
			<pubDate>Tue, 17 Nov 2009 09:51:19 GMT</pubDate>
			<description><![CDATA[Hi all,  
what's the name a script (filter with one click) on the left side?  
_*Dell Laptops / Notebooks: Colorful laptops, small laptops, light weight laptops, gaming laptops | Dell (http://www.dell.com/home/laptops#subcats=&navla=&a=&page=1)*_ 
 
Many thanks for any help!]]></description>
			<content:encoded><![CDATA[<div>Hi all, <br />
what's the name a script (filter with one click) on the left side? <br />
<font color="Red"><u><b><a href="http://www.dell.com/home/laptops#subcats=&amp;navla=&amp;a=&amp;page=1" target="_blank">Dell Laptops / Notebooks: Colorful laptops, small laptops, light weight laptops, gaming laptops | Dell</a></b></u></font><br />
<br />
Many thanks for any help!</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>MrBird</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55907-script-name.html</guid>
		</item>
		<item>
			<title>define issues, I think</title>
			<link>http://www.hotscripts.com/forums/php/55905-define-issues-i-think.html</link>
			<pubDate>Tue, 17 Nov 2009 07:06:30 GMT</pubDate>
			<description>Ive been looking at the code for like an hour and then even started over to see if I messed something up, but I am getting the same result, and thats nothing. Most these pages are stolen from scripts that I have made before, but the defines are something I have changed... 
 
index.php 
 
PHP:...</description>
			<content:encoded><![CDATA[<div>Ive been looking at the code for like an hour and then even started over to see if I messed something up, but I am getting the same result, and thats nothing. Most these pages are stolen from scripts that I have made before, but the defines are something I have changed...<br />
<br />
index.php<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?PHP<br />session_start</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'__sn'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />include&nbsp;</span><span style="color: #DD0000">"config.php"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$layout</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">head</span><span style="color: #007700">();<br />if(isset(</span><span style="color: #0000BB">$_SESSION</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'UINFOSTAFF'</span><span style="color: #007700">&#93;)){<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"hello"</span><span style="color: #007700">;<br />}else{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"hello"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">$layout</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">foot</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>config.php<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?PHP<br />defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'__sn'</span><span style="color: #007700">)&nbsp;or&nbsp;die();<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'__sn'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$CONF</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__THEME'</span><span style="color: #007700">&#93;=</span><span style="color: #DD0000">"opening"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$MYSQL</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__HOST'</span><span style="color: #007700">&#93;=</span><span style="color: #DD0000">"localhost"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$MYSQL</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__DBAS'</span><span style="color: #007700">&#93;=</span><span style="color: #DD0000">"XXXXXXXX"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$MYSQL</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__USER'</span><span style="color: #007700">&#93;=</span><span style="color: #DD0000">"XXXXXXXX"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$MYSQL</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__PASS'</span><span style="color: #007700">&#93;=</span><span style="color: #DD0000">"XXXXXXXXXXXX"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$SITE</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__NAME'</span><span style="color: #007700">&#93;=</span><span style="color: #DD0000">"SoldiersNet"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$SITE</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__MAINURL'</span><span style="color: #007700">&#93;=</span><span style="color: #DD0000">"http://soldiersnet.net/"</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//Must&nbsp;include&nbsp;trailing&nbsp;"/"<br />###############################<br />#&nbsp;DO&nbsp;NOT&nbsp;EDIT&nbsp;BELOW&nbsp;THIS&nbsp;LINE&nbsp;#<br />###############################<br /></span><span style="color: #0000BB">$CONF</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__VERSION'</span><span style="color: #007700">&#93;=</span><span style="color: #DD0000">"1.0a"</span><span style="color: #007700">;<br />include&nbsp;</span><span style="color: #DD0000">"includes/db.php"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$db</span><span style="color: #007700">=new&nbsp;</span><span style="color: #0000BB">db</span><span style="color: #007700">(</span><span style="color: #0000BB">$MYSQL</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__HOST'</span><span style="color: #007700">&#93;,</span><span style="color: #0000BB">$MYSQL</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__USER'</span><span style="color: #007700">&#93;,</span><span style="color: #0000BB">$MYSQL</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__PASS'</span><span style="color: #007700">&#93;,</span><span style="color: #0000BB">$MYSQL</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'__DBAS'</span><span style="color: #007700">&#93;);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">newconn</span><span style="color: #007700">();<br />include&nbsp;</span><span style="color: #DD0000">"includes/layout.php"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$layout</span><span style="color: #007700">=new&nbsp;</span><span style="color: #0000BB">layout</span><span style="color: #007700">(</span><span style="color: #0000BB">$db</span><span style="color: #007700">);<br />include&nbsp;</span><span style="color: #DD0000">"includes/functions.php"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$user</span><span style="color: #007700">=new&nbsp;</span><span style="color: #0000BB">user</span><span style="color: #007700">(</span><span style="color: #0000BB">$db</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$app</span><span style="color: #007700">=new&nbsp;</span><span style="color: #0000BB">app</span><span style="color: #007700">(</span><span style="color: #0000BB">$db</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>includes/db.php<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?PHP<br />defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'__sn'</span><span style="color: #007700">)&nbsp;or&nbsp;die();&nbsp;<br />class&nbsp;</span><span style="color: #0000BB">db</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">$host&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">$user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;</span><span style="color: #0000BB">$pass&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">;<br />.....&nbsp;</span><span style="color: #0000BB">too&nbsp;big&nbsp;of&nbsp;a&nbsp;file</span><span style="color: #007700">....</span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>includes/layout.php<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?PHP<br />defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'__sn'</span><span style="color: #007700">)&nbsp;or&nbsp;die();<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'__sn'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />include&nbsp;</span><span style="color: #DD0000">"../config.php"</span><span style="color: #007700">;<br />class&nbsp;</span><span style="color: #0000BB">layout</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">layout</span><span style="color: #007700">(</span><span style="color: #0000BB">$db</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">=</span><span style="color: #0000BB">$db</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">head</span><span style="color: #007700">(){<br />....&nbsp;</span><span style="color: #0000BB">too&nbsp;big&nbsp;of&nbsp;a&nbsp;file</span><span style="color: #007700">....</span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>includes/functions.php<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?PHP<br />defined</span><span style="color: #007700">(</span><span style="color: #DD0000">'__sn'</span><span style="color: #007700">)&nbsp;or&nbsp;die();<br />class&nbsp;</span><span style="color: #0000BB">user&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$db</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">user</span><span style="color: #007700">(</span><span style="color: #0000BB">$db</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">=</span><span style="color: #0000BB">$db</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br />class&nbsp;</span><span style="color: #0000BB">app&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$db</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">app</span><span style="color: #007700">(</span><span style="color: #0000BB">$db</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">=</span><span style="color: #0000BB">$db</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">userApps</span><span style="color: #007700">(</span><span style="color: #0000BB">$ui</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;!--&nbsp;APP&nbsp;LOADER:&nbsp;Loading&nbsp;Apps--&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$uinfo</span><span style="color: #007700">=</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">"|"</span><span style="color: #007700">,</span><span style="color: #0000BB">$ui</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;*&nbsp;FROM&nbsp;users&nbsp;WHERE&nbsp;id='"</span><span style="color: #007700">.</span><span style="color: #0000BB">$uinfo</span><span style="color: #007700">&#91;</span><span style="color: #0000BB">0</span><span style="color: #007700">&#93;.</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while(</span><span style="color: #0000BB">$row</span><span style="color: #007700">=</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">()){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$uperm</span><span style="color: #007700">=</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">","</span><span style="color: #007700">,</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'permissions'</span><span style="color: #007700">&#93;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">$uperm</span><span style="color: #007700">==</span><span style="color: #DD0000">"(*)"</span><span style="color: #007700">){<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;}else{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$permid</span><span style="color: #007700">=</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">","</span><span style="color: #007700">,</span><span style="color: #0000BB">$uperm</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach(</span><span style="color: #0000BB">$permid&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$value</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;*&nbsp;FROM&nbsp;apps&nbsp;WHERE&nbsp;id='"</span><span style="color: #007700">.</span><span style="color: #0000BB">$value</span><span style="color: #007700">.</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while(</span><span style="color: #0000BB">$rowa</span><span style="color: #007700">=</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">()){<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;if&nbsp;(</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #DD0000">"&lt;acronym&nbsp;title="</span><span style="color: #0000BB">JavaScript</span><span style="color: #DD0000">"&gt;js&lt;/acronym&gt;/apps/"</span><span style="color: #007700">.</span><span style="color: #0000BB">$rowa</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'location'</span><span style="color: #007700">&#93;.</span><span style="color: #DD0000">"/index.&lt;acronym&nbsp;title="</span><span style="color: #0000BB">JavaScript</span><span style="color: #DD0000">"&gt;js&lt;/acronym&gt;.php"</span><span style="color: #007700">)){<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;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"<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;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--&nbsp;Loaded:&nbsp;"</span><span style="color: #007700">.</span><span style="color: #0000BB">$rowa</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'name'</span><span style="color: #007700">&#93;.</span><span style="color: #DD0000">"&nbsp;--&gt;"</span><span style="color: #007700">;<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;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"<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;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script&nbsp;type=\"text/javascript\"&nbsp;src=\"apps/"</span><span style="color: #007700">.</span><span style="color: #0000BB">$rowa</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'location'</span><span style="color: #007700">&#93;.</span><span style="color: #DD0000">"/index.&lt;acronym&nbsp;title="</span><span style="color: #0000BB">JavaScript</span><span style="color: #DD0000">"&gt;js&lt;/acronym&gt;.php\"&gt;&lt;/script&gt;"</span><span style="color: #007700">;<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;}else{<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;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"<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;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--&nbsp;Error:&nbsp;"</span><span style="color: #007700">.</span><span style="color: #0000BB">$rowa</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'name'</span><span style="color: #007700">&#93;.</span><span style="color: #DD0000">"&nbsp;does&nbsp;not&nbsp;exist!&nbsp;--&gt;"</span><span style="color: #007700">;<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;&nbsp;&nbsp;&nbsp;&nbsp;}<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;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset(</span><span style="color: #0000BB">$uinfo</span><span style="color: #007700">,</span><span style="color: #0000BB">$row</span><span style="color: #007700">,</span><span style="color: #0000BB">$rowa</span><span style="color: #007700">,</span><span style="color: #0000BB">$uperm</span><span style="color: #007700">,</span><span style="color: #0000BB">$permid</span><span style="color: #007700">,</span><span style="color: #0000BB">$value</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div></div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>connor</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55905-define-issues-i-think.html</guid>
		</item>
		<item>
			<title>Item Database Issues</title>
			<link>http://www.hotscripts.com/forums/php/55899-item-database-issues.html</link>
			<pubDate>Tue, 17 Nov 2009 02:02:58 GMT</pubDate>
			<description>Alright so I am building an item database; I am having some issues with codes and I figure I could get some help from the users here.  You all have proven useful before.  Wish I had my old account password.  
 
With my database I need to have my price checker to work with it as well.  The code will...</description>
			<content:encoded><![CDATA[<div>Alright so I am building an item database; I am having some issues with codes and I figure I could get some help from the users here.  You all have proven useful before.  Wish I had my old account password. <br />
<br />
With my database I need to have my price checker to work with it as well.  The code will have to be changed some to work in the database and I am not sure exactly what needs to be changed.  If I can get some help it would be greatly appreciated. <br />
<br />
Here is the current code:<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">$_GET</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'id'</span><span style="color: #007700">&#93;)<br />{<br />&nbsp;</span><span style="color: #0000BB">$item&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"min"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"mark"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"max"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br />&nbsp;</span><span style="color: #0000BB">$curlh&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_init</span><span style="color: #007700">();<br />&nbsp;</span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$curlh</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_URL</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'http://itemdb-rs.runescape.com/viewitem.ws?obj='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">array_search</span><span style="color: #007700">(</span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">$_GET</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'id'</span><span style="color: #007700">&#93;),</span><span style="color: #0000BB">$item</span><span style="color: #007700">));<br />&nbsp;</span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$curlh</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_RETURNTRANSFER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br />&nbsp;</span><span style="color: #0000BB">$src&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_exec</span><span style="color: #007700">(</span><span style="color: #0000BB">$curlh</span><span style="color: #007700">);<br />&nbsp;</span><span style="color: #0000BB">curl_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$curlh</span><span style="color: #007700">);<br />&nbsp;</span><span style="color: #0000BB">ereg</span><span style="color: #007700">(</span><span style="color: #DD0000">'&lt;b&gt;Minimum&nbsp;price:&lt;/b&gt;&nbsp;(&#91;0-9\.km,&#93;+)'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$src</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$item</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'min'</span><span style="color: #007700">&#93;);<br />&nbsp;</span><span style="color: #0000BB">ereg</span><span style="color: #007700">(</span><span style="color: #DD0000">'&lt;b&gt;Market&nbsp;price:&lt;/b&gt;&nbsp;(&#91;0-9\.km,&#93;+)'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$src</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$item</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'mark'</span><span style="color: #007700">&#93;);<br />&nbsp;</span><span style="color: #0000BB">ereg</span><span style="color: #007700">(</span><span style="color: #DD0000">'&lt;b&gt;Maximum&nbsp;price:&lt;/b&gt;&nbsp;(&#91;0-9\.km,&#93;+)'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$src</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$item</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'max'</span><span style="color: #007700">&#93;);<br />&nbsp;</span><span style="color: #0000BB">ereg</span><span style="color: #007700">(</span><span style="color: #DD0000">'&lt;img&nbsp;id="item_image"&#91;^&lt;&#93;+'</span><span style="color: #007700">,</span><span style="color: #0000BB">$src</span><span style="color: #007700">,</span><span style="color: #0000BB">$image</span><span style="color: #007700">);&nbsp;<br />&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&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&nbsp;</span><span style="color: #0000BB">$image</span><span style="color: #007700">&#91;</span><span style="color: #0000BB">0</span><span style="color: #007700">&#93;&nbsp;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$_GET</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'id'</span><span style="color: #007700">&#93;;&nbsp;&lt;</span><span style="color: #0000BB">br</span><span style="color: #007700">/&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'<br />&nbsp;&lt;strong&gt;Minumim:&lt;/strong&gt;&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$item</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'min'</span><span style="color: #007700">&#93;&#91;</span><span style="color: #0000BB">1</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;<br />&nbsp;&lt;strong&gt;Market:&lt;/strong&gt;&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$item</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'mark'</span><span style="color: #007700">&#93;&#91;</span><span style="color: #0000BB">1</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;<br />&nbsp;&lt;strong&gt;Maximum:&lt;/strong&gt;&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">$item</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">'max'</span><span style="color: #007700">&#93;&#91;</span><span style="color: #0000BB">1</span><span style="color: #007700">&#93;&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>What I need it to do is to get its id from my database.  The field id is &quot;Ge_id&quot;.  So it needs to get Ge_id and post it in the url.  I then need it to curl the information and get the three prices.<br />
<br />
I next need to store the prices in the database in their fields. &quot;Ge_Minimum, Ge_Market, and Ge_Maximum&quot;.  I need a timestamp to work somehow to where it checks the price from the database.  If it has been less than 12 hours it gets the price from the database.  If it has been more than 12 hours it gets the price again and stores it.  Then it updates the timestamp.  How would I do this?<br />
<br />
I believe this is all I need help on for now.  Let me know if you need any of my scripts to work to get this working.  Thanks in advance.</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>The Knowing</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55899-item-database-issues.html</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Php Loop :S]]></title>
			<link>http://www.hotscripts.com/forums/php/55889-php-loop-s.html</link>
			<pubDate>Mon, 16 Nov 2009 11:10:54 GMT</pubDate>
			<description><![CDATA[Heya guys 
 
Ok this is probally simple but ive been awake for nearly 48 hours and cant think about it and google isnt helping much either, Im gonna be posting a list of id's to a script for now called example.php what i want to do is get everyone of these id, and update a database field with it,...]]></description>
			<content:encoded><![CDATA[<div>Heya guys<br />
<br />
Ok this is probally simple but ive been awake for nearly 48 hours and cant think about it and google isnt helping much either, Im gonna be posting a list of id's to a script for now called example.php what i want to do is get everyone of these id, and update a database field with it, however the ammount submitted will never be the same. could be between 1 - 100 id's.<br />
<br />
Its to mass delete the message's in a message center from check boxes.<br />
<br />
so heres what i got<br />
<br />
on the message page<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">input&nbsp;name</span><span style="color: #007700">=</span><span style="color: #DD0000">"list"&nbsp;</span><span style="color: #0000BB">id</span><span style="color: #007700">=</span><span style="color: #DD0000">"4775"&nbsp;</span><span style="color: #0000BB">value</span><span style="color: #007700">=</span><span style="color: #DD0000">"4775"&nbsp;</span><span style="color: #0000BB">type</span><span style="color: #007700">=</span><span style="color: #DD0000">"checkbox"</span><span style="color: #007700">&gt;&nbsp;<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>when submitted it runs this<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
	<div class="alt2">
		<hr />
		<code style="white-space:nowrap">
		<div dir="ltr" style="text-align:left;">
			<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"><br /></span><span style="color: #007700">if(</span><span style="color: #0000BB">$_POST</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">"submit"</span><span style="color: #007700">&#93;&nbsp;==&nbsp;</span><span style="color: #DD0000">"delete"</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;echo</span><span style="color: #DD0000">"&nbsp;submitted"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$message_delete&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"select&nbsp;*&nbsp;from&nbsp;`messages`&nbsp;where&nbsp;`toid`='$players_id'&nbsp;and&nbsp;`deleted`='0'"</span><span style="color: #007700">)or&nbsp;die(</span><span style="color: #0000BB">mysql_error</span><span style="color: #007700">());<br />&nbsp;&nbsp;&nbsp;&nbsp;while(</span><span style="color: #0000BB">$row</span><span style="color: #007700">=</span><span style="color: #0000BB">mysql_fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$message_delete</span><span style="color: #007700">)){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$messageid&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">"messageid"</span><span style="color: #007700">&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$toname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$row</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">"toname"</span><span style="color: #007700">&#93;;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$deletedmessageid&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">safe</span><span style="color: #007700">(</span><span style="color: #0000BB">$_POST</span><span style="color: #007700">&#91;</span><span style="color: #DD0000">"list"</span><span style="color: #007700">&#93;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo</span><span style="color: #DD0000">"&nbsp;$deletedmessageid"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">mysql_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"update&nbsp;`messages`&nbsp;set&nbsp;`deleted`='1'&nbsp;where&nbsp;`messageid`='$deletemessageid'"</span><span style="color: #007700">)or&nbsp;die(</span><span style="color: #0000BB">mysql_error</span><span style="color: #007700">());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$sucess&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Message&nbsp;id#&nbsp;$deletemessageid&nbsp;Deleted"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}&nbsp;<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
		</div>
		</code>
		<hr />
	</div>
</div>Now its echo'in the same Message id and i cant work out why, The values in the check boxes on the previous page are all right but this script seems to just not wanna work.<br />
<br />
Any ideas ?<br />
<br />
Cheers<br />
Mike</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>smithygotlost</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55889-php-loop-s.html</guid>
		</item>
		<item>
			<title>Too many mail() function calls</title>
			<link>http://www.hotscripts.com/forums/php/55886-too-many-mail-function-calls.html</link>
			<pubDate>Mon, 16 Nov 2009 08:52:34 GMT</pubDate>
			<description><![CDATA[When I send newsletters from my CMS, many of them never get delivered even though mail() function returned 1. I'm just assuming that's server's anti-spam precaution which is only logical and most likely. How do I get around that, is it possible to create a cron job from my PHP script? Or is there...]]></description>
			<content:encoded><![CDATA[<div>When I send newsletters from my CMS, many of them never get delivered even though mail() function returned 1. I'm just assuming that's server's anti-spam precaution which is only logical and most likely. How do I get around that, is it possible to create a cron job from my PHP script? Or is there an even better way?<br />
<br />
Thanks.</div>

]]></content:encoded>
			<category domain="http://www.hotscripts.com/forums/php/">PHP</category>
			<dc:creator>3Nex</dc:creator>
			<guid isPermaLink="true">http://www.hotscripts.com/forums/php/55886-too-many-mail-function-calls.html</guid>
		</item>
	</channel>
</rss>
