Re: Re: Can someone tell me why this is not working?
| From: | Gary | Date: | Thu, 18 Jun 2009 16:25:19 +0000 |
| Subject: | Re: Re: Can someone tell me why this is not working? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294255@lists.php.net to get a copy of this message | ||
Thanks, but that is not it, have already slashed the $, but the others
without the \ still work.
"Gabriel Sosa" <sosagabriel@gmail.com> wrote in message
news:C4316A8F-3EE4-43D0-9B30-C4B447428B51@gmail.com...
> on this line
>
>> echo "Mortgage Amount:$ $newmort<br />";
>
> the echo is trying to evaluate the string...
>
> in your case you should escape the $ sign... like this \$
>
>> echo "Mortgage Amount:\$ $newmort<br />";
>
>
>
> regards
>
> On Jun 18, 2009, at 1:15 PM, Martin Scotta wrote:
>
>> if ($newmort) {
>> echo "Mortgage Amount:$ $newmort<br />";
>> }
>>
>> check $newmort value
>>
>> var_dump( $newmort );
>> if ($newmort) {
>> echo "Mortgage Amount:$ $newmort<br />";
>> }
>>
>> you "if" fails is $newmort is there but empty
>>
>>
>> On Thu, Jun 18, 2009 at 1:11 PM, Gary <gwpaul@ptd.net> 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"" <gwpaul@ptd.net> wrote in message
>>> news:89.71.08167.D8D5A3A4@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.
>>>>
>>>> <tr>
>>>> <td>Purchase Price: </td>
>>>> <td> <input name="purchprice"
>>>> type="text"></td>
>>>> </tr>
>>>> <tr>
>>>> <td>Mortgage Amount: </td>
>>>> <td> <input name="newmort" type="text"></td>
>>>> </tr>
>>>> <tr>
>>>> <td>How long seller has owned property: </td>
>>>> <td> <input name="howlong" type="text"
>>>> size="4"></td>
>>>> </tr>
>>>>
>>>>
>>>> $newmort=STRIPSLASHES($_POST['newmort']);
>>>> $purchprice=STRIPSLASHES($_POST['purchprice']);
>>>> $howlong=STRIPSLASHES($_POST['howlong']);
>>>>
>>>> if ($purchprice) {
>>>> echo "Purchase Price:$ $purchprice<br />";
>>>> }
>>>> if ($newmort) {
>>>> echo "Mortgage Amount:$ $newmort<br />";
>>>> }
>>>> if ($howlong) {
>>>> echo "How Long has seller owned property: $howlong<br /><br
>>>> />";
>>>> }
>>>>
>>>> Thanks
>>>>
>>>> Gary
>>>>
>>>
>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>
>>
>> --
>> Martin Scotta
>