Re: [PHP] Re: Can someone tell me why this is not working?
I was about to do something really stupid. I had gotten it to work (even a blind squirell gets a nut every now and again), and had copied the code to send to you to look at.and then realized it was working so you would be chasing ghosts. Thank you for your help. Gary "Daniel Brown" wrote in message news:ab5568160906180925q18afdc95ua9d48f1e8f6ae...@mail.gmail.com... > On Thu, Jun 18, 2009 at 12:22, Gary wrote: >> Thanks...Now I get NULL >> >> I have another set of these if($) echo, and the all work, it is just this >> one that refuses to give it up. > >Gary, if you can, send the link to the live development copy on > which you're working. Even if it's just a temporary copy of the file > for now, for debugging purposes. > > -- > > daniel.br...@parasane.net || danbr...@php.net > http://www.parasane.net/ || http://www.pilotpig.net/ > 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Can someone tell me why this is not working?
Ok, I dont really know how it got working, but it is. I did try the test, and after that it worked, however I had tried one before But thank you all for your time and help. Gary wrote in message news:of24965909.4acbeaf3-on872575d9.00598a62-872575d9.0059e...@zootweb.com... >> [PHP] Re: Can someone tell me why this is not working? >> >> > The center echo does not show. It will show if I replace $newmort > with >> > anything else. I have copied the first "if" statement,pasted it in > the >> > second position, and it works fine. Once I change the var to > $newmort, it >> > will not show. The third echo shows fine, it is only if I use newmort. > I >> > have renamed the var from mort1, because I was getting the same thing. >> > >> > $newmort=STRIPSLASHES($_POST['newmort']); >> > $purchprice=STRIPSLASHES($_POST['purchprice']); >> > $howlong=STRIPSLASHES($_POST['howlong']); >> > >> > if ($purchprice) { >> > echo "Purchase Price:$ $purchprice"; >> > } >> > if ($newmort) { >> > echo "Mortgage Amount:$ $newmort"; >> > } >> > if ($howlong) { >> > echo "How Long has seller owned property: $howlong"; > > Echo out the value of $newmort just above the "if" statement. If it is > zero or blank, the "if" will evaluate to false. > > Is there a second form field named "newmort" lower on the page? If so, it > will be the value of $_POST['newmort'] that you receive in the post. > > Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Can someone tell me why this is not working?
Thanks, but that is not it, have already slashed the $, but the others without the \ still work. "Gabriel Sosa" wrote in message news:c4316a8f-3ee4-43d0-9b30-c4b447428...@gmail.com... > on this line > >> echo "Mortgage Amount:$ $newmort"; > > the echo is trying to evaluate the string... > > in your case you should escape the $ sign... like this \$ > >> echo "Mortgage Amount:\$ $newmort"; > > > > regards > > On Jun 18, 2009, at 1:15 PM, Martin Scotta wrote: > >> if ($newmort) { >> echo "Mortgage Amount:$ $newmort"; >> } >> >> check $newmort value >> >> var_dump( $newmort ); >> if ($newmort) { >> echo "Mortgage Amount:$ $newmort"; >> } >> >> you "if" fails is $newmort is there but empty >> >> >> On Thu, Jun 18, 2009 at 1:11 PM, Gary wrote: >> >>> Everything is exaclty the same, but this one will not work. I have >>> retyped >>> them, copied from those working, changed the name, changed the input >>> name...If I change the var to $zip, it works. >>> >>> Any other suggestions? >>> >>> Thanks again. >>> ""Gary"" wrote in message >>> news:89.71.08167.d8d5a...@pb1.pair.com... The center echo does not show. It will show if I replace $newmort with anything else. I have copied the first "if" statement,pasted it in the second position, and it works fine. Once I change the var to $newmort, >>> it will not show. The third echo shows fine, it is only if I use newmort. I have renamed the var from mort1, because I was getting the same thing. Purchase Price: Mortgage Amount: How long seller has owned property: $newmort=STRIPSLASHES($_POST['newmort']); $purchprice=STRIPSLASHES($_POST['purchprice']); $howlong=STRIPSLASHES($_POST['howlong']); if ($purchprice) { echo "Purchase Price:$ $purchprice"; } if ($newmort) { echo "Mortgage Amount:$ $newmort"; } if ($howlong) { echo "How Long has seller owned property: $howlong"; } Thanks Gary >>> >>> >>> >>> -- >>> PHP General Mailing List (http://www.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> >> >> -- >> Martin Scotta > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Can someone tell me why this is not working?
On Thu, Jun 18, 2009 at 12:22, Gary wrote: > Thanks...Now I get NULL > > I have another set of these if($) echo, and the all work, it is just this > one that refuses to give it up. Gary, if you can, send the link to the live development copy on which you're working. Even if it's just a temporary copy of the file for now, for debugging purposes. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Can someone tell me why this is not working?
Thanks...Now I get NULL I have another set of these if($) echo, and the all work, it is just this one that refuses to give it up. "Martin Scotta" wrote in message news:6445d94e0906180915o392d1500hd906b23dbf5c4...@mail.gmail.com... > if ($newmort) { > echo "Mortgage Amount:$ $newmort"; > } > > check $newmort value > > var_dump( $newmort ); > if ($newmort) { > echo "Mortgage Amount:$ $newmort"; > } > > you "if" fails is $newmort is there but empty > > > On Thu, Jun 18, 2009 at 1:11 PM, Gary wrote: > >> Everything is exaclty the same, but this one will not work. I have >> retyped >> them, copied from those working, changed the name, changed the input >> name...If I change the var to $zip, it works. >> >> Any other suggestions? >> >> Thanks again. >> ""Gary"" wrote in message >> news:89.71.08167.d8d5a...@pb1.pair.com... >> > The center echo does not show. It will show if I replace $newmort with >> > anything else. I have copied the first "if" statement,pasted it in the >> > second position, and it works fine. Once I change the var to $newmort, >> it >> > will not show. The third echo shows fine, it is only if I use newmort. >> > I >> > have renamed the var from mort1, because I was getting the same thing. >> > >> > >> > Purchase Price: >> > >> > >> > >> > Mortgage Amount: >> > >> > >> > >> > How long seller has owned property: >> > >> > >> > >> > >> > $newmort=STRIPSLASHES($_POST['newmort']); >> > $purchprice=STRIPSLASHES($_POST['purchprice']); >> > $howlong=STRIPSLASHES($_POST['howlong']); >> > >> > if ($purchprice) { >> > echo "Purchase Price:$ $purchprice"; >> > } >> > if ($newmort) { >> > echo "Mortgage Amount:$ $newmort"; >> > } >> > if ($howlong) { >> > echo "How Long has seller owned property: $howlong"; >> > } >> > >> > Thanks >> > >> > Gary >> > >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > Martin Scotta > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Can someone tell me why this is not working?
on this line echo "Mortgage Amount:$ $newmort"; the echo is trying to evaluate the string... in your case you should escape the $ sign... like this \$ echo "Mortgage Amount:\$ $newmort"; regards On Jun 18, 2009, at 1:15 PM, Martin Scotta wrote: if ($newmort) { echo "Mortgage Amount:$ $newmort"; } check $newmort value var_dump( $newmort ); if ($newmort) { echo "Mortgage Amount:$ $newmort"; } you "if" fails is $newmort is there but empty On Thu, Jun 18, 2009 at 1:11 PM, Gary wrote: Everything is exaclty the same, but this one will not work. I have retyped them, copied from those working, changed the name, changed the input name...If I change the var to $zip, it works. Any other suggestions? Thanks again. ""Gary"" wrote in message news:89.71.08167.d8d5a...@pb1.pair.com... The center echo does not show. It will show if I replace $newmort with anything else. I have copied the first "if" statement,pasted it in the second position, and it works fine. Once I change the var to $newmort, it will not show. The third echo shows fine, it is only if I use newmort. I have renamed the var from mort1, because I was getting the same thing. Purchase Price: Mortgage Amount: How long seller has owned property: $newmort=STRIPSLASHES($_POST['newmort']); $purchprice=STRIPSLASHES($_POST['purchprice']); $howlong=STRIPSLASHES($_POST['howlong']); if ($purchprice) { echo "Purchase Price:$ $purchprice"; } if ($newmort) { echo "Mortgage Amount:$ $newmort"; } if ($howlong) { echo "How Long has seller owned property: $howlong"; } Thanks Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Can someone tell me why this is not working?
> [PHP] Re: Can someone tell me why this is not working? > > > The center echo does not show. It will show if I replace $newmort with > > anything else. I have copied the first "if" statement,pasted it in the > > second position, and it works fine. Once I change the var to $newmort, it > > will not show. The third echo shows fine, it is only if I use newmort. I > > have renamed the var from mort1, because I was getting the same thing. > > > > $newmort=STRIPSLASHES($_POST['newmort']); > > $purchprice=STRIPSLASHES($_POST['purchprice']); > > $howlong=STRIPSLASHES($_POST['howlong']); > > > > if ($purchprice) { > > echo "Purchase Price:$ $purchprice"; > > } > > if ($newmort) { > > echo "Mortgage Amount:$ $newmort"; > > } > > if ($howlong) { > > echo "How Long has seller owned property: $howlong"; Echo out the value of $newmort just above the "if" statement. If it is zero or blank, the "if" will evaluate to false. Is there a second form field named "newmort" lower on the page? If so, it will be the value of $_POST['newmort'] that you receive in the post. Kirk
Re: [PHP] Re: Can someone tell me why this is not working?
if ($newmort) { echo "Mortgage Amount:$ $newmort"; } check $newmort value var_dump( $newmort ); if ($newmort) { echo "Mortgage Amount:$ $newmort"; } you "if" fails is $newmort is there but empty On Thu, Jun 18, 2009 at 1:11 PM, Gary wrote: > Everything is exaclty the same, but this one will not work. I have retyped > them, copied from those working, changed the name, changed the input > name...If I change the var to $zip, it works. > > Any other suggestions? > > Thanks again. > ""Gary"" wrote in message > news:89.71.08167.d8d5a...@pb1.pair.com... > > The center echo does not show. It will show if I replace $newmort with > > anything else. I have copied the first "if" statement,pasted it in the > > second position, and it works fine. Once I change the var to $newmort, > it > > will not show. The third echo shows fine, it is only if I use newmort. I > > have renamed the var from mort1, because I was getting the same thing. > > > > > > Purchase Price: > > > > > > > > Mortgage Amount: > > > > > > > > How long seller has owned property: > > > > > > > > > > $newmort=STRIPSLASHES($_POST['newmort']); > > $purchprice=STRIPSLASHES($_POST['purchprice']); > > $howlong=STRIPSLASHES($_POST['howlong']); > > > > if ($purchprice) { > > echo "Purchase Price:$ $purchprice"; > > } > > if ($newmort) { > > echo "Mortgage Amount:$ $newmort"; > > } > > if ($howlong) { > > echo "How Long has seller owned property: $howlong"; > > } > > > > Thanks > > > > Gary > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta
[PHP] Re: Can someone tell me why this is not working?
Everything is exaclty the same, but this one will not work. I have retyped them, copied from those working, changed the name, changed the input name...If I change the var to $zip, it works. Any other suggestions? Thanks again. ""Gary"" wrote in message news:89.71.08167.d8d5a...@pb1.pair.com... > The center echo does not show. It will show if I replace $newmort with > anything else. I have copied the first "if" statement,pasted it in the > second position, and it works fine. Once I change the var to $newmort, it > will not show. The third echo shows fine, it is only if I use newmort. I > have renamed the var from mort1, because I was getting the same thing. > > > Purchase Price: > > > > Mortgage Amount: > > > > How long seller has owned property: > > > > > $newmort=STRIPSLASHES($_POST['newmort']); > $purchprice=STRIPSLASHES($_POST['purchprice']); > $howlong=STRIPSLASHES($_POST['howlong']); > > if ($purchprice) { > echo "Purchase Price:$ $purchprice"; > } > if ($newmort) { > echo "Mortgage Amount:$ $newmort"; > } > if ($howlong) { > echo "How Long has seller owned property: $howlong"; > } > > Thanks > > Gary > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Can someone tell me why this is not working?
On Thu, Jun 18, 2009 at 11:44 AM, Gary wrote: > Nope, I added slashes to all of the $, still no go. > > Thank you for your help. > > Gary > > > "Shawn McKenzie" wrote in message > news:53.c2.08167.5206a...@pb1.pair.com... >> Gary wrote: >>> The center echo does not show. It will show if I replace $newmort with >>> anything else. I have copied the first "if" statement,pasted it in the >>> second position, and it works fine. Once I change the var to $newmort, >>> it >>> will not show. The third echo shows fine, it is only if I use newmort. I >>> have renamed the var from mort1, because I was getting the same thing. >>> >>> >>> Purchase Price: >>> >>> >>> >>> Mortgage Amount: >>> >>> >>> >>> How long seller has owned property: >>> >>> >>> >>> >>> $newmort=STRIPSLASHES($_POST['newmort']); >>> $purchprice=STRIPSLASHES($_POST['purchprice']); >>> $howlong=STRIPSLASHES($_POST['howlong']); >>> >>> if ($purchprice) { >>> echo "Purchase Price:$ $purchprice"; >>> } >>> if ($newmort) { >>> echo "Mortgage Amount:$ $newmort"; >>> } >>> if ($howlong) { >>> echo "How Long has seller owned property: $howlong"; >>> } >>> >>> Thanks >>> >>> Gary >>> >>> >> >> if ($purchprice) { >> echo "Purchase Price:\$ $purchprice"; >> } >> if ($newmort) { >> echo "Mortgage Amount:\$ $newmort"; >> } >> if ($howlong) { >> echo "How Long has seller owned property: $howlong"; >> } >> >> -- >> Thanks! >> -Shawn >> http://www.spidean.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > try wrapping the data in htmlentites(). Maybe there is a funky control characters in there or a null value $newmort=htmlentities(STRIPSLASHES($_POST['newmort'])); -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can someone tell me why this is not working?
Nope, I added slashes to all of the $, still no go. Thank you for your help. Gary "Shawn McKenzie" wrote in message news:53.c2.08167.5206a...@pb1.pair.com... > Gary wrote: >> The center echo does not show. It will show if I replace $newmort with >> anything else. I have copied the first "if" statement,pasted it in the >> second position, and it works fine. Once I change the var to $newmort, >> it >> will not show. The third echo shows fine, it is only if I use newmort. I >> have renamed the var from mort1, because I was getting the same thing. >> >> >> Purchase Price: >> >> >> >> Mortgage Amount: >> >> >> >> How long seller has owned property: >> >> >> >> >> $newmort=STRIPSLASHES($_POST['newmort']); >> $purchprice=STRIPSLASHES($_POST['purchprice']); >> $howlong=STRIPSLASHES($_POST['howlong']); >> >> if ($purchprice) { >> echo "Purchase Price:$ $purchprice"; >> } >> if ($newmort) { >> echo "Mortgage Amount:$ $newmort"; >> } >> if ($howlong) { >> echo "How Long has seller owned property: $howlong"; >> } >> >> Thanks >> >> Gary >> >> > > if ($purchprice) { > echo "Purchase Price:\$ $purchprice"; > } > if ($newmort) { > echo "Mortgage Amount:\$ $newmort"; > } > if ($howlong) { > echo "How Long has seller owned property: $howlong"; > } > > -- > Thanks! > -Shawn > http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can someone tell me why this is not working?
Gary wrote: > The center echo does not show. It will show if I replace $newmort with > anything else. I have copied the first "if" statement,pasted it in the > second position, and it works fine. Once I change the var to $newmort, it > will not show. The third echo shows fine, it is only if I use newmort. I > have renamed the var from mort1, because I was getting the same thing. > > > Purchase Price: > > > > Mortgage Amount: > > > > How long seller has owned property: > > > > > $newmort=STRIPSLASHES($_POST['newmort']); > $purchprice=STRIPSLASHES($_POST['purchprice']); > $howlong=STRIPSLASHES($_POST['howlong']); > > if ($purchprice) { > echo "Purchase Price:$ $purchprice"; > } > if ($newmort) { > echo "Mortgage Amount:$ $newmort"; > } > if ($howlong) { > echo "How Long has seller owned property: $howlong"; > } > > Thanks > > Gary > > if ($purchprice) { echo "Purchase Price:\$ $purchprice"; } if ($newmort) { echo "Mortgage Amount:\$ $newmort"; } if ($howlong) { echo "How Long has seller owned property: $howlong"; } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php