Jump to content

Skylight_lady

Members
  • Posts

    131
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Skylight_lady's Achievements

Member

Member (2/5)

0

Reputation

  1. Interesting !! But it's too short of the Growth amount. Ive been using the values: Balance = 20000 MonthlyAmount = 500 InterestRate = 3 Years = 4 The correct formula is as follows: Year1 = (Balance + (MonthlyAmount * 12)) * InterestRate; Year2 = (Year1 + (MonthlyAmount * 12)) * InterestRate; Year3 = (Year2 + (MonthlyAmount * 12)) * InterestRate; The end of year balance, is added to 12 months repayments and multiplied by the interest rate. However, if i used the simple maths it won't correct it. Thereforem a more complicated formula is required like the "pow"
  2. Well it's supposed to be exactly like http://www.aib.ie/personal/savings/Savings-Calculator?gclid=CMyTpKLng7QCFYRF2wodo18AFg If you roll over the last year and see the growth. Then all over the above calculation are wrong. It's only correct if i set the contribution to "0" value
  3. Hi Guys, I'm trying to get a monthly contribution added to the saving coumpound interest. The original code i have is: $IntTotal = ($balance*(pow(1+$Rate,$terms)-1)); The above code allows me to calculate the interest total without a monthly contribution added. How do i insert the monthly contribution into that? Is there another way to write this in php? Thanks
  4. Hi, Thanks for that. Is there a using that by calculating 2 figures with two sliders together? I have the following code eg: $( "#slider-range-max" ).slider({ range: "max", min: 0, max: 90000, value: 45000, slide: function( event, ui ) { $( "#amount" ).val( ui.value ); var aaa = $("#amount").val(); var bbb = $("#amountb").val(); var ccc = $("#amountc").val(); var ddd = $("#amountd").val(); var eee = $("#amounte").val(); var fff = $("#amountf").val(); $("#total").val(+aaa + +bbb + +ccc + +ddd + +eee + +fff); } }); $( "#slider-range-max-dif" ).slider({ range: "max", min: 0, max: 30, value: 15, slide: function( event, ui ) { $( "#difference" ).val( ui.value ); var adif = $("#difference").val(); var bdif = $("#differenceb").val(); var cdif = $("#differencec").val(); var ddif = $("#differenced").val(); var edif = $("#differencee").val(); var fdif = $("#differencef").val(); $("#total_dif").val(+adif + +bdif + +cdif + +ddif + +edif + +fdif); } }); However, i can't seem to get something like this calculation to work: $("#result").val(+aaa * (+adif / 100)); and $( "#result" ).val( $( "#amount" ).val( $( "#slider-range-max" ).slider( "value" ) ) * ( $( "#difference" ).val( $( "#slider-range-max-dif" ).slider( "value" ) ) / 100 ) ); With either of the codes above i'm trying to get the result from one row by dividing the adif by 100 and multiplying it by aaa. The result i seem to be getting is NaN. Whats the correct way to do this. I'm no javascript/jquery expert.
  5. Hi Guys, Is there any cash/price slide bar around like wonga dot com. Their code is a bit complicated so i want something very similar with a few rows of sliders.
  6. Thanks for that. My code is very similar. The problem i had was that i accidently had "die" at the end of the code which terminated the program after the first file was deleted
  7. Hi Guys, here is a problem i have with deleting a file(s) via a cron job. Now i have written a code which deleted all files in a directory .... but it's not what i want. i want to delete one or more files that all have the same value in the database table with an value of delete eg: $query = "SELECT * FROM files_uploaded WHERE file_id = 'delete'"; As my previous code deleted all files in a directory, i have now changed the code to below, but this only deletes one file and not two or more even tho they have the same file_id in the database. $address = '/home/www/mydir/files-uploaded/'; $file = $file_name; if (is_file($address.$file)) { unlink($address.$file); } In the code above the $file_name value is not being shown to you but is stored in the database and displays correctly. How do i get this to delete one or more files depending on the file_id in the database?
  8. I'm afraid jessirose is correct. The column months can be 32 .... Anyways to be more clear it has to be in the number of months and not a date from the users input. Well, it seems like the query works for jazzman1 if he's getting the correct result. I'll have to double check in a few days what was causing me to get a completely different total without any errors. Maybe it was calculating two different queries at the same time and gave me a strange result then. Thanks for your help guys.
  9. I want to get the SUM of "(amount - Newamount) * months" for all the rows from the table eg: amount Newamount months 10.00 5.00 10 100.00 40.00 12 The first rows total will be 50.00 while the second rows total will be 720.00. Then the SUM of it all should be 770.00. I hope this clear enough !
  10. In the table i have: amount double(10,2) NOT NULL DEFAULT '0.00' Newamount double(10,2) NOT NULL DEFAULT '0.00' months int(10) NOT NULL DEFAULT '0' I found another way around this by using php only with the following code "+=": $Newamount += ....... This allows me to calculate each row to get its total. However, i want to know about this sql query as i never leave things alone without knowing the answer.
  11. Can someone please tell me why this query is not working: $query = "SELECT SUM((amount - Newamount) * months) AS TOTAL FROM mytable WHERE Newamount != '0.00'"; Even if i use: $query = "SELECT SUM(amount - Newamount) AS TOTALSMALL FROM mytable WHERE Newamount != '0.00'"; It would return the right amount. But i want to do more calculations with the months added. Each row will have different months.
  12. That also sounds like using the full path like https://www.myweb.com/securefolder/test.php will also do the same trick from what you and that blog is saying. Doesn't this also mean doing redirects for the folders to make them https without a user changing it to http in the web browser.
  13. You say this is your last code: $insert = "INSERT INTO tblPurchasesHeader (Vendor, InvoiceDate,Invoice,TotalAmount,TaxAmount) VALUES (".$_POST['vendor']."' Why on earth did you not add ' in the very first $_post in the value? You were told to do so and it has to be there. That's exactly what that error means. Like: '".$_POST['vendor']."' If you still get an error or it's not inserting then always echo your query so you know where the problem is. Please close this thread as your going back to your original problem without any changes made.
  14. Can you not id or class a CSS to add the new styles with color:#000000 for a black colour? You really need to learn CSS for this. Google will help you.
  15. Hi guys, I'm not sure if this is the right forum to post. Please move if not. My problem is that I have a website with 5 child folders inside the www folder. Now what I want to do is buy 1 ssl .... Will I be able to secure just two of those folders and how via cpanel? Also, what do I have to do to make sure the key lock on the bottom of the screen is clean eg all href links and image links should be https .... Does it matter if the are in one of the child folders not secure but still uses https to access it as written in the code address. Also, am I not allowed to link to an external website in the secured folders?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.