php-general Digest 5 May 2009 07:09:26 -0000 Issue 6104
Topics (messages 292244 through 292253):
Re: Query stopping after 2 records?
292244 by: Martin Zvarík
292245 by: Andrew Hucks
292247 by: Martin Zvarík
Avoid to open mysql querries then times in the page
292246 by: Matthieu
292248 by: Bastien Koert
292250 by: Ashley Sheridan
Re: how to enable ttf support in php 5.2.9
292249 by: PJ
292251 by: Ashley Sheridan
Re: elseif statements
292252 by: Gary
Forcing a Post of data
292253 by: Richard Kurth
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Miller, Terion napsal(a):
I need help/advice figuring out why my query dies after 2 records. Here is
the query:
// Build your INSERT statement here
$query = "INSERT into `warrants` (wid, name, age, warrant, bond, wnumber,
crime) VALUES (";
$query .= " '$wid', '$name', '$age', '$warrant',
'$bond', '$wnumber', '$crime' )";
$wid = mysql_insert_id();
// run query
mysql_query($query) or die ("GRRRRRRR");
echo $query;
It inserts two records and dies half way thru the 3rd?
Thanks in advance for clues to fix this.
T.Miller
Should be:
------------------
$sql = ...
$query = mysql_query($sql) or die(...
while ($r = mysql_fetch_array($query)) { ....
------------------
Notice that you need to assign the mysql_query to a $query variable!
If you understand this, then there's most probably a mistake in your SQL
statement.
Martin
--- End Message ---
--- Begin Message ---
When you say die, does it just stop, or do you get an error message?
Depending on how long it's taking to perform the action, the script
will stop just because it's taking a while. (by default, I think it's
30 seconds.)
If so, use: ini_set("max_execution_time", "time in seconds");
On Mon, May 4, 2009 at 3:43 PM, Martin Zvarík <[email protected]> wrote:
> Miller, Terion napsal(a):
>>
>> I need help/advice figuring out why my query dies after 2 records. Here
>> is
>> the query:
>>
>> // Build your INSERT statement here
>>
>> $query = "INSERT into `warrants` (wid, name, age, warrant, bond, wnumber,
>> crime) VALUES (";
>> $query .= " '$wid', '$name', '$age', '$warrant',
>> '$bond', '$wnumber', '$crime' )";
>> $wid = mysql_insert_id();
>>
>> // run query
>> mysql_query($query) or die ("GRRRRRRR");
>>
>>
>> echo $query;
>>
>> It inserts two records and dies half way thru the 3rd?
>> Thanks in advance for clues to fix this.
>> T.Miller
>>
>
>
> Should be:
> ------------------
>
> $sql = ...
>
> $query = mysql_query($sql) or die(...
>
> while ($r = mysql_fetch_array($query)) { ....
>
> ------------------
>
> Notice that you need to assign the mysql_query to a $query variable!
>
>
> If you understand this, then there's most probably a mistake in your SQL
> statement.
>
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
If the query stopped after getting 2 entries then this has nothing to do
with max_execution_time.
But stupid topic anyway, I don't know why are we even trying to figure
what Miller meant, he most probably solved it already...
Andrew Hucks napsal(a):
When you say die, does it just stop, or do you get an error message?
Depending on how long it's taking to perform the action, the script
will stop just because it's taking a while. (by default, I think it's
30 seconds.)
If so, use: ini_set("max_execution_time", "time in seconds");
On Mon, May 4, 2009 at 3:43 PM, Martin Zvarík <[email protected]> wrote:
Miller, Terion napsal(a):
I need help/advice figuring out why my query dies after 2 records. Here
is
the query:
// Build your INSERT statement here
$query = "INSERT into `warrants` (wid, name, age, warrant, bond, wnumber,
crime) VALUES (";
$query .= " '$wid', '$name', '$age', '$warrant',
'$bond', '$wnumber', '$crime' )";
$wid = mysql_insert_id();
// run query
mysql_query($query) or die ("GRRRRRRR");
echo $query;
It inserts two records and dies half way thru the 3rd?
Thanks in advance for clues to fix this.
T.Miller
Should be:
------------------
$sql = ...
$query = mysql_query($sql) or die(...
while ($r = mysql_fetch_array($query)) { ....
------------------
Notice that you need to assign the mysql_query to a $query variable!
If you understand this, then there's most probably a mistake in your SQL
statement.
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello,
I'm a totally newbie to php/Mysql but I'd like to know if it is normal that
I have to connect 3 times to the db in one page.
For example, I have
1. A connection for the login / pass a $_SESSION['login'] before the HTML
tags
2. I need to say hello to the user so I reconnect, run a query to select the
user having the login and echo 'Hello '.$user['login'].'!''
3. I need to show him his friends a bit later, so I have to connect a last
time and re-run a querry because I can't use the data $user that I used in
my upper php code...
Is there a walkthroug to have only one connection for the page?
Thanks
Matthieu
--- End Message ---
--- Begin Message ---
Yep, though I would still query 2x. Once for the login data, no sense
retrieving more if the log on fails. Then the second query is to get
all the user data into a session object. There are two schools of
thought about this, pull all the required data into the session, which
doesn't scale well but if your site is not that busy, it won't matter
all that much. The other option is to query each time the user needs
some data and just keep the user_id in the session and run small quick
queried to get the data you need.
This is where you need to understand architectural trends. The REST
architecture is all about true stateless application design where the
app does not use sessions which allows for massive horizontal scaling.
The app could connect to any server in the environment for access to
the data and any server could deliver any data. Many large scale
applications use this design to scale out. Facebook is one.
Be honest about how busy the site will be and use that as a guiding
principle, but build it in layers to make swapping out bits easier.
Hth
On 5/4/09, Matthieu <[email protected]> wrote:
> Hello,
>
> I'm a totally newbie to php/Mysql but I'd like to know if it is normal that
> I have to connect 3 times to the db in one page.
>
> For example, I have
>
> 1. A connection for the login / pass a $_SESSION['login'] before the HTML
> tags
>
> 2. I need to say hello to the user so I reconnect, run a query to select the
> user having the login and echo 'Hello '.$user['login'].'!''
>
> 3. I need to show him his friends a bit later, so I have to connect a last
> time and re-run a querry because I can't use the data $user that I used in
> my upper php code...
>
>
> Is there a walkthroug to have only one connection for the page?
>
> Thanks
>
> Matthieu
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Bastien
Cat, the other other white meat
--- End Message ---
--- Begin Message ---
On Mon, 2009-05-04 at 23:09 +0030, Bastien Koert wrote:
> Yep, though I would still query 2x. Once for the login data, no sense
> retrieving more if the log on fails. Then the second query is to get
> all the user data into a session object. There are two schools of
> thought about this, pull all the required data into the session, which
> doesn't scale well but if your site is not that busy, it won't matter
> all that much. The other option is to query each time the user needs
> some data and just keep the user_id in the session and run small quick
> queried to get the data you need.
>
> This is where you need to understand architectural trends. The REST
> architecture is all about true stateless application design where the
> app does not use sessions which allows for massive horizontal scaling.
> The app could connect to any server in the environment for access to
> the data and any server could deliver any data. Many large scale
> applications use this design to scale out. Facebook is one.
>
> Be honest about how busy the site will be and use that as a guiding
> principle, but build it in layers to make swapping out bits easier.
>
> Hth
>
>
>
> On 5/4/09, Matthieu <[email protected]> wrote:
> > Hello,
> >
> > I'm a totally newbie to php/Mysql but I'd like to know if it is normal that
> > I have to connect 3 times to the db in one page.
> >
> > For example, I have
> >
> > 1. A connection for the login / pass a $_SESSION['login'] before the HTML
> > tags
> >
> > 2. I need to say hello to the user so I reconnect, run a query to select the
> > user having the login and echo 'Hello '.$user['login'].'!''
> >
> > 3. I need to show him his friends a bit later, so I have to connect a last
> > time and re-run a querry because I can't use the data $user that I used in
> > my upper php code...
> >
> >
> > Is there a walkthroug to have only one connection for the page?
> >
> > Thanks
> >
> > Matthieu
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
>
> Bastien
>
> Cat, the other other white meat
>
I'd do it with 2 queries too, but I'd pull the name from the DB as
you're checking their credentials. Basically, just query the database
for their username and password, but alter the SELECT statement to pull
their name along with any other details you need. Later, pull the list
of friends as you need them. I just think this is a bit neater, as you
only need their name once, in one row of data, but I'm guessing the
friends list would pull more than one row, and it wouldn't make sense to
have the name of the person who just logged in in each row, repeated.
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
Jim Lucas wrote:
> PJ wrote:
>> Is there a module to be activated or what has to be installed to have
>> ttf support in php?
>> My port on FreeBSD does not have an option for ttf support under make
>> config .
>> I'm trying to learn & understand the following:
>> In file1 : <img src="button.php?s=36&text=PHP+is+Cool" />
>> In file2 (button.php)- originally php3 :
>> <?php
>> Header("Content-type: image/gif");
>> if(!isset($s)) $s=11;
>
> The above should be:
>
> if ( empty($_GET['s']) ) {
> $s = 11;
> } else {
> $s = (int)$_GET['s'];
> }
>
>> $size = imagettfbbox($s,0,"times.ttf",$text);
>
> and this should be
>
> $text = '';
> if ( !empty($_GET['text']) )
> $text = your_custom_input_cleaner_function($_GET['text']);
>
> $size = imagettfbbox($s,0,"times.ttf",$text);
>
>> $dx = abs($size[2]-$size[0]);
>> $dy = abs($size[5]-$size[3]);
>> $xpad=9;
>> $ypad=9;
>> $im = imagecreate($dx+$xpad,$dy+$ypad);
>> $blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
>> $black = ImageColorAllocate($im, 0,0,0);
>> $white = ImageColorAllocate($im, 255,255,255);
>> ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
>> ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
>> ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black,
>> "times.ttf", $text);
>> ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white,
>> "times.ttf", $text);
>> ImageGif($im);
>> ImageDestroy($im);
>> ?>
>> ONLY the above & nothing else. So far, all I get is a small blue square.
>> Replacing the $text with the text just gives a rectangle a bit wider.
>> gd is installed but ttf is not, so I figure that is the culprit.
>> But how is the text supposed to be assigned to $text from file1?
>> TIA
Thank you for that. Now it works. I see, the $s had to come from
somewhere...
But what's the custom_cleaner_function - I mean, to clean what? & Why?
What if I use some foreign accents, like é or À ?
--
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-------------------------------------------------------------
Phil Jourdan --- [email protected]
http://www.ptahhotep.com
http://www.chiccantine.com/andypantry.php
--- End Message ---
--- Begin Message ---
On Mon, 2009-05-04 at 18:42 -0400, PJ wrote:
> Jim Lucas wrote:
> > PJ wrote:
> >> Is there a module to be activated or what has to be installed to have
> >> ttf support in php?
> >> My port on FreeBSD does not have an option for ttf support under make
> >> config .
> >> I'm trying to learn & understand the following:
> >> In file1 : <img src="button.php?s=36&text=PHP+is+Cool" />
> >> In file2 (button.php)- originally php3 :
> >> <?php
> >> Header("Content-type: image/gif");
> >> if(!isset($s)) $s=11;
> >
> > The above should be:
> >
> > if ( empty($_GET['s']) ) {
> > $s = 11;
> > } else {
> > $s = (int)$_GET['s'];
> > }
> >
> >> $size = imagettfbbox($s,0,"times.ttf",$text);
> >
> > and this should be
> >
> > $text = '';
> > if ( !empty($_GET['text']) )
> > $text = your_custom_input_cleaner_function($_GET['text']);
> >
> > $size = imagettfbbox($s,0,"times.ttf",$text);
> >
> >> $dx = abs($size[2]-$size[0]);
> >> $dy = abs($size[5]-$size[3]);
> >> $xpad=9;
> >> $ypad=9;
> >> $im = imagecreate($dx+$xpad,$dy+$ypad);
> >> $blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
> >> $black = ImageColorAllocate($im, 0,0,0);
> >> $white = ImageColorAllocate($im, 255,255,255);
> >> ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
> >> ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
> >> ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black,
> >> "times.ttf", $text);
> >> ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white,
> >> "times.ttf", $text);
> >> ImageGif($im);
> >> ImageDestroy($im);
> >> ?>
> >> ONLY the above & nothing else. So far, all I get is a small blue square.
> >> Replacing the $text with the text just gives a rectangle a bit wider.
> >> gd is installed but ttf is not, so I figure that is the culprit.
> >> But how is the text supposed to be assigned to $text from file1?
> >> TIA
> Thank you for that. Now it works. I see, the $s had to come from
> somewhere...
> But what's the custom_cleaner_function - I mean, to clean what? & Why?
> What if I use some foreign accents, like é or À ?
>
> --
> Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
> -------------------------------------------------------------
> Phil Jourdan --- [email protected]
> http://www.ptahhotep.com
> http://www.chiccantine.com/andypantry.php
>
>
content coming from MS Office clipboard pastes generally contain
characters that are encoded wrong, and do not display correctly in web
pages unless they have very relaxed doctypes. The function I generally
use is:
function removeMSCrap($crap)
{
$find = Array(chr(128), chr(133), chr(8226), chr(145), chr(8217),
chr(146), chr(8220), chr(147), chr(8221), chr(148), chr(8226), chr(149),
chr(8211), chr(150), chr(8212), chr(151), chr(8282), chr(153), chr(169),
chr(174));
$replace = Array("€", "…", "″", "'", "'",
"'", "'", """, """, """, """, "•",
"•", "–", "–", "—", "—", "™", "™",
"©", "®");
$roses = str_replace($find, $replace, $crap);
return $roses;
}
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
This just keeps getting weirder, the results change sometimes even when the
same info is entered..
This is the revised code (after some helpful hints from some readers)
Anyone help, I am supposed to show this tomorrow to client.
Gary
<?php
$_SESSION['sale_session']=$_POST['sale'];
$_SESSION['assess_session']=$_POST['assess'];
$_SESSION['county_session']=$_POST['county'];
// checks if bot
if ($_POST['address'] != '' ){
exit("Changed field");
}
$sale_value=$_POST['sale'];
$assess_value=$_POST['assess'];
$county=$_POST['county'];
$chester_ratio=.51;
$montco_ratio=.53;
$delco_ratio=.58;
/*$ratio=.51;
/*$correct_assess=($sale_value)*($ratio); this is now the assessment should
be */
$chester_correct_assess=($sale_value)*($chester_ratio);
$montco_correct_assess=($sale_value)*($montco_ratio);
$delco_correct_assess=($sale_value)*($delco_ratio);
$chester_assess_difference=($assess_value)-($chester_correct_assess);
$montco_assess_difference=($assess_value)-($montco_correct_assess);
$delco_assess_difference=($assess_value)-($delco_correct_assess);
/* $assess_difference=($assess_value)-($sale_value * $ratio);
$percent_difference=($assess_difference)/($assess_value);*/
$chester_percent_difference=($chester_assess_difference)/($assess_value);
$delco_percent_difference=($delco_assess_difference)/($assess_value);
$montco_percent_difference=($montco_assess_difference)/($assess_value);
$chester_percent_savings=($chester_percent_difference)*100;
$delco_percent_savings=($delco_percent_difference)*100;
$montco_percent_savings=($montco_percent_difference)*100;
if($_COOKIE['county_cookie'] ==('Chester County') &&
($chester_assess_difference >=50000))
{
echo '<h2 style="margin:0;color:#ff0000;">Yes, Your property appears to
qualify!</h2><br /><br />';
echo "You 1 believe your home would today sell for <b>
$".number_format($sale_value)." </b><br />";
echo "Your current tax assessment is<b>
$".number_format($assess_value)."</b><br />";
echo "You live in <b>$county </b><br />";
echo "Your potential savings could be<b> "
.number_format($chester_percent_savings,0)."%</b><br /><br />";
echo "According to preliminary calculations based on the information you
have entered, you may enjoy a savings of <b>
".number_format($chester_percent_savings,0)."% </b>off a combined total of
county, school and township real estate taxes. Actual dollar amount savings
will differ depending on the township that the property is located. Please
contact my office for a more precise estimate of savings.<br />";
}
elseif($_COOKIE['county_cookie']==('Delaware County') &&
($delco_assess_difference >=30000)) {
echo '<h2 style="margin:0;color:#ff0000;">Yes, Your property appears to
qualify!</h2><br /><br />';
echo "You 2 believe your home would today sell for <b>
$".number_format($sale_value)." </b><br />";
echo "Your current tax assessment is<b>
$".number_format($assess_value)."</b><br />";
echo "You live in <b>$county </b><br />";
echo "Your potential savings could be<b> "
.number_format($delco_percent_savings,0)."%</b><br /><br />";
echo "According to preliminary calculations based on the information you
have entered, you may enjoy a savings of <b>
".number_format($delco_percent_savings,0)."% </b>off a combined total of
county, school and township real estate taxes. Actual dollar amount savings
will differ depending on the township that the property is located. Please
contact my office for a more precise estimate of savings.<br />";
}
elseif($_COOKIE['county_cookie']==('Montgomery County') &&
($montco_assess_difference >=50000))
{
echo '<h2 style="margin:0;color:#ff0000;">Yes, Your property appears to
qualify!</h2><br /><br />';
echo "You 3 believe your home would today sell for <b>
$".number_format($sale_value)." </b><br />";
echo "Your current tax assessment is<b>
$".number_format($assess_value)."</b><br />";
echo "You live in <b>$county </b><br />";
echo "Your potential savings could be<b> "
.number_format($montco_percent_savings,0)."%</b><br /><br />";
echo "According to preliminary calculations based on the information you
have entered, you may enjoy a savings of <b>
".number_format($montco_percent_savings,0)."% </b>off a combined total of
county, school and township real estate taxes. Actual dollar amount savings
will differ depending on the township that the property is located. Please
contact my office for a more precise estimate of savings.<br />";
}
elseif(($chester_assess_difference <=50000) &&
($chester_assess_difference>=1000)) {
echo '<h3 style="margin:0;">While it appears you may enjoy some savings, the
dollar amount may not reach the threshold required for action. If property
values in your area continue to decline, you may wish to revisit this issue
again next year.</h3><br /><br />';
}
elseif(($delco_assess_difference <=30000) &&
($delco_assess_difference>=1000)) {
echo '<h3 style="margin:0;">While it appears you may enjoy some savings, the
dollar amount may not reach the threshold required for action. If property
values in your area continue to decline, you may wish to revisit this issue
again next year.</h3><br /><br />';
}
elseif(($montco_assess_difference <=50000) &&
($montco_assess_difference>=1000)) {
echo '<h3 style="margin:0;">While it appears you may enjoy some savings, the
dollar amount may not reach the threshold required for action. If property
values in your area continue to decline, you may wish to revisit this issue
again next year.</h3><br /><br />';
}
elseif(isset($chester_assess_difference) <=1000){
echo '<h3 style="margin:0;">NO, Your property does not appear to qualify. If
property values in your area continue to decline, you may wish to revisit
this issue again next year. </h3><br /><br />';
}
elseif(isset($delco_assess_difference) <=1000){
echo '<h3 style="margin:0;">NO, Your property does not appear to qualify. If
property values in your area continue to decline, you may wish to revisit
this issue again next year. </h3><br /><br />';
}
elseif(isset($montco_assess_difference) <=1000){
echo '<h3 style="margin:0;">NO, Your property does not appear to qualify. If
property values in your area continue to decline, you may wish to revisit
this issue again next year. </h3><br /><br />';
}
echo "chester $chester_ratio .''. $chester_correct_assess .''.
$chester_percent_savings<br/>";
echo "montco $montco_ratio.''. $montco_correct_assess .''.
$montco_percent_savings<br />";
echo "delco $delco_ratio .''. $delco_correct_assess.''.
$delco_percent_savings<br />";
echo "$county";
?>
""Gary"" <[email protected]> wrote in message
news:[email protected]...
>I am trying to get this to work, however it only reads the second if
>statement. I get no error messages, but as I change counties, the % stays
>the same.
>
> Can someone enlighten me, or should I be looking at switch statements?
>
> Thanks for your help.
>
> Gary
>
>
>
> <?php
> $_SESSION['sale_session']=$_POST['sale'];
> $_SESSION['assess_session']=$_POST['assess'];
> $_SESSION['county_session']=$_POST['county'];
>
> // checks if bot
> if ($_POST['address'] != '' ){
> exit("Changed field");
> }
>
>
> $sale_value=$_POST['sale'];
> $assess_value=$_POST['assess'];
> $county=$_POST['county'];
>
> $chester_ratio=.51;
> $montco_ratio=.53;
> $delco_ratio=.58;
> /*$ratio=.51;
>
>
> /*$correct_assess=($sale_value)*($ratio); this is now the assessment
> should be */
> $chester_correct_assess=($sale_value)*($chester_ratio);
> $montco_correct_assess=($sale_value)*($montco_ratio);
> $delco_correct_assess=($sale_value)*($delco_ratio);
>
>
> $chester_assess_difference=($assess_value)-($chester_correct_assess);
> $montco_assess_difference=($assess_value)-($montco_correct_assess);
> $delco_assess_difference=($assess_value)-($delco_correct_assess);
>
> /* $assess_difference=($assess_value)-($sale_value * $ratio);
> $percent_difference=($assess_difference)/($assess_value);*/
> $chester_percent_difference=($chester_assess_difference)/($assess_value);
> $delco_percent_difference=($delco_assess_difference)/($assess_value);
> $montco_percent_difference=($montco_assess_difference)/($assess_value);
>
> $chester_percent_savings=($chester_percent_difference)*100;
> $delco_percent_savings=($delco_percent_difference)*100;
> $montco_percent_savings=($montco_percent_difference)*100;
>
> if(($_COOKIE['county_cookie'] ='Chester') && ($chester_assess_difference
> >=50000))
>
> {
> echo '<h2 style="margin:0;color:#ff0000;">Yes, Your property appears to
> qualify!</h2><br /><br />';
> echo "You 1 believe your home would today sell for <b>
> $".number_format($sale_value)." </b><br />";
> echo "Your current tax assessment is<b>
> $".number_format($assess_value)."</b><br />";
> echo "You live in <b>$county </b><br />";
> echo "Your potential savings could be<b> "
> .number_format($chester_percent_savings,0)."%</b><br /><br />";
> echo "According to preliminary calculations based on the information you
> have entered, you may enjoy a savings of <b>
> ".number_format($chester_percent_savings,0)."% </b>off a combined total of
> county, school and township real estate taxes. Actual dollar amount
> savings will differ depending on the township that the property is
> located. Please contact my office for a more precise estimate of
> savings.<br />";
>
> }
> elseif(($_COOKIE['county_cookie']='Delaware') && ($delco_assess_difference
> >=30000)) {
>
>
> echo '<h2 style="margin:0;color:#ff0000;">Yes, Your property appears to
> qualify!</h2><br /><br />';
> echo "You 2 believe your home would today sell for <b>
> $".number_format($sale_value)." </b><br />";
> echo "Your current tax assessment is<b>
> $".number_format($assess_value)."</b><br />";
> echo "You live in <b>$county </b><br />";
> echo "Your potential savings could be<b> "
> .number_format($delco_percent_savings,0)."%</b><br /><br />";
> echo "According to preliminary calculations based on the information you
> have entered, you may enjoy a savings of <b>
> ".number_format($delco_percent_savings,0)."% </b>off a combined total of
> county, school and township real estate taxes. Actual dollar amount
> savings will differ depending on the township that the property is
> located. Please contact my office for a more precise estimate of
> savings.<br />";
> }
> elseif(($_COOKIE['county_cookie']='Montgomery') &&
> ($montco_assess_difference >=50000))
>
> {
> echo '<h2 style="margin:0;color:#ff0000;">Yes, Your property appears to
> qualify!</h2><br /><br />';
> echo "You 3 believe your home would today sell for <b>
> $".number_format($sale_value)." </b><br />";
> echo "Your current tax assessment is<b>
> $".number_format($assess_value)."</b><br />";
> echo "You live in <b>$county </b><br />";
> echo "Your potential savings could be<b> "
> .number_format($montco_percent_savings,0)."%</b><br /><br />";
> echo "According to preliminary calculations based on the information you
> have entered, you may enjoy a savings of <b>
> ".number_format($montco_percent_savings,0)."% </b>off a combined total of
> county, school and township real estate taxes. Actual dollar amount
> savings will differ depending on the township that the property is
> located. Please contact my office for a more precise estimate of
> savings.<br />";
> }
>
> else if(($chester_assess_difference <=50000) &&
> ($chester_assess_difference>=1000)) {
> echo '<h3 style="margin:0;">While it appears you may enjoy some savings,
> the dollar amount may not reach the threshold required for action. If
> property values in your area continue to decline, you may wish to revisit
> this issue again next year.</h3><br /><br />';
> }
> else if(($delco_assess_difference <=30000) &&
> ($delco_assess_difference>=1000)) {
> echo '<h3 style="margin:0;">While it appears you may enjoy some savings,
> the dollar amount may not reach the threshold required for action. If
> property values in your area continue to decline, you may wish to revisit
> this issue again next year.</h3><br /><br />';
> }
> else if(($montco_assess_difference <=50000) &&
> ($montco_assess_difference>=1000)) {
> echo '<h3 style="margin:0;">While it appears you may enjoy some savings,
> the dollar amount may not reach the threshold required for action. If
> property values in your area continue to decline, you may wish to revisit
> this issue again next year.</h3><br /><br />';
> }
> else if(isset($chester_assess_difference) <=1000){
> echo '<h3 style="margin:0;">NO, Your property does not appear to qualify.
> If property values in your area continue to decline, you may wish to
> revisit this issue again next year. </h3><br /><br />';
> }
> else if(isset($delco_assess_difference) <=1000){
> echo '<h3 style="margin:0;">NO, Your property does not appear to qualify.
> If property values in your area continue to decline, you may wish to
> revisit this issue again next year. </h3><br /><br />';
> }
> else if(isset($montco_assess_difference) <=1000){
> echo '<h3 style="margin:0;">NO, Your property does not appear to qualify.
> If property values in your area continue to decline, you may wish to
> revisit this issue again next year. </h3><br /><br />';
> }
> /*This is just a test to see which one is being displayed*/
> echo "chester $chester_ratio .''. $chester_correct_assess .''.
> $chester_percent_savings<br/>";
> echo "montco $montco_ratio.''. $montco_correct_assess .''.
> $montco_percent_savings<br />";
> echo "delco $delco_ratio .''. $delco_correct_assess.''.
> $delco_percent_savings";
> ?>
>
>
--- End Message ---
--- Begin Message ---
How can I force this to be a POST and not a GET
<a href=customer.php?cid=1&location=customeradd.php> Add Customer </a>
or is the only way you can pass data with a POST is from a Form submission.
--- End Message ---