Re: Can someone tell me why this is not working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" <robert@xxxxxxxxxxxxx> wrote in message 
news:4A3A5E7C.8000109@xxxxxxxxxxxxxxxx
>
>
> 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.
>>
>> <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 />";
>> }
>
> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux