Re: [PHP] Can someone tell me why this is not working?
Thanks for your reply, but that is not it. I had already removed it$, slashed it, and no, plus it is working in the others. Gary "Robert Cummings" wrote in message news:4a3a5e7c.8000...@interjinn.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"; >> } > > The $ character is a special character for variable interpolation. You > should be escaping it. with a backslash. > > Cheers, > Rob. > -- > http://www.interjinn.com > Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 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"; } The $ character is a special character for variable interpolation. You should be escaping it. with a backslash. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 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. 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