Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. You probably don't really want to start off creating tables in side php but whatever. <?php $sql = "CREATE users"; if (mysql_query($sql)) { echo "table created."; }else { echo "problem creating table."; } ?> that's it in it's most basic form, creating a table.
  2. I know what other people think but lately I have been using varchar for almost anything related with numbers (even timestamps). It's so much easier. With any thing number related "except double for dollar amounts", I have had problems. Whenever I use varchar it always seems to work perfectly.
  3. Yes, most definitely. I have attached 2 classes, that have been modified (by some mods I found), they are classes that I found. I will provide the link as well, there is another function there, one to stream, one to output, and own to force it download instead. What you need to do, is open one of them and output it, open another one and output it on the same page. If that doesn't work then open the data for both of them, and hten you can save them both together into one pdf. if you go to google and type in "php pdf class" that's the first one that come's up, it's amazing. That will take all the "diffficulties" of working with pdf files away, and your left with your imagination on how to merge them. There may even be some functions in there specifically for merging. [attachment deleted by admin]
  4. Ok, I want to go ahead and ask here before I even start. I got the monthly thing working <? session_start(); header("Cache-control: private"); //IE 6 Fix if(!$_SESSION['cyadmin']) { header('Location: ../index.php'); exit; } include('../common/config.php'); include('../common/admin_header.php'); include('../common/functions.php'); ?> <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div> <h1>System Check</h1> <p>A full system check is run here on the following things:</p> <ul> <li>Monthly Billing</li> <li>Late Fees Calculations</li> <li>Sending out monthly reminders (for members wanting reminders about billers</li> </ul> <p>The system will run through all it's necessary procedures and provide a full report at the end of the entire process.</p> <?php # CHECK LAST SYSTEM DATE // check to see the last day the system check was ran, we only want to allow it to run // ONE TIME per day. // However it has to atleast run ONE time per day. $currentdate = date("m/d/Y"); $selectsysdate = "SELECT * FROM systemcheck WHERE lastcheck = '$currentdate';"; $querysysdate = mysql_query($selectsysdate); if ($rowsys = mysql_fetch_array($querysysdate)) { die("System check can only be ran once per day."); } # BILL USERS MONTHLY // Here is where the aggravations start to happen. // I am going to try to do this in an organized and structured manner so we can // hopefully make additions and changes as needed // FIRST we need to get all the information about the user's so we can work with. // We don't need to concern ourselves with any payments they made, or anything like // that, because they are handled throughout there respective areas. $select = "SELECT * FROM cy_members;"; // get users $query = mysql_query($select); // query users $billerror = 0; // to report number of successfully billed accounts. $billok = 0; // to report the number of failed account billings. while ($row = mysql_fetch_array($query)) { // get the data to work with // get all the dates and proper variables prepared so we can start working with them // don't forget we have timestamps in the database, so if the timestamp is needed // during these calculations I can go ahead and use the date straight from the // database to have the timestamp. $nextbillingdate = date("m/d/Y", $row['system_nextbillingdate']); $lastbillingdate = date("m/d/Y", $row['system_lastbillingdate']); $currentowedamount = $row['system_currentdueamount']; $currentdate = "06/02/2007";//date("m/d/Y"); //"06/02/2007"; $currentdate_s = strtotime($currentdate); // first we need to perform some simple calculations to find out if there // billing date has arrived or not // basically if the current date is the same day as, or after the next billing // date, then it's time to do some calculations if ($currentdate == $nextbillingdate) { // this is the amount they are now going to owe, because 19.95 is added onto there // owed amount every month. $newamount = $currentowedamount + "19.95"; // the last billed date becomes today because they were just billed. $newlastbillingdate = $currentdate_s; // the next billing date is 1 month from today (the date they were billed). $newnextbillingdate = mktime(date("h", $currentdate_s), date("i", $currentdate_s), date("s", $currentdate_s), date("m", $currentdate_s)+1, date("d", $currentdate_s), date("y", $currentdate_s)); // so far we have successfully charged them there monthly charges of 19.99, we are // also going to hang onto that currentowedamount because that is the amount // they owe before the 15 days are up. // Now this will permanently take care of all of these issues with billing monthly // the next thign to do is database all the information so we can run the proper // calculations for there late fee's if they are applicable. $update = "UPDATE cy_members SET system_currentdueamount = '$newamount', system_nextbillingdate = '$newnextbillingdate', system_lastbillingdate = '$newlastbillingdate', system_leftover = '$currentowedamount';"; if (mysql_query($update)) { $billok++; $billsuccess = $billok . " accounts where billed successfully."; }else { $billerror++; $billfailure = "There was a problem with billing " . $billerror . " members this month."; } } unset($nextbillingdate); unset($lastbillingdate); unset($currentdate); unset($currentdate_s); } # CALCULATE LATE FEES # SEND OUT MONTH REMINDERS ON ADDED BILLERS TO MEMBERS # Progress Report echo "FULL PROGRESS REPORT"; echo "<hr />"; echo "<h1>Monthly Billing Report</h1>"; echo $billsuccess . "<br />"; echo $billfailure . "<br />"; echo "<hr />"; echo "<h1>Late Fee Calculation Report</h1>"; echo $latefeesuccess . "<br />"; echo $latefeefailure . "<br />"; echo "<hr />"; echo "<h1>Monthly Reminders Reports</h1>"; echo $remindersuccess . "<br />"; echo $reminderfailure . "<br />"; $systemdate = date("m/d/Y"); $insert = "INSERT INTO systemcheck (lastcheck) VALUES ('$systemdate');"; mysql_query($insert); ?> Ok, this works fine, (bills them monthly). The next step (I have 3 steps I have to accomplish), the next one I need some serious feedback on. Right now when they are billed they are billed 19.95, whatever was there before is added into leftover (so I can remember how much it was). Basically is needs to keep up with day's that they are late. Ok, let me give a rough example. 01-01-2007 - they sign up for an account, and are billed 19.95 for there first payment. A transaction is also put in for 19.95 (they are already aware of this). (it clears automatically or whatever. 01-15-2007 - if they haven't paid there first month they are added an additional 10.00 onto there owed amount. 02-01-2007 - The bill for this month is added onto the total amount they owe. (19.95) 02-15-2007 - I need to check if they have paid there dues for this month, if they haven't then an additional 10.00 is added as a late fee onto there current amount. 03-01-2007 - They are billed an additional 19.95 (and it's added to the amount they owe.) 03-15-2007 - Need to check if they paid this month's bills (if not) then they are added an additional 10.00 to there current owed amount. It continues in this same cycle * The monthly billing cycle is always based on the month they signed up for the account. Ok now that you know this, I have the monthly billing itself done. Now I just need to check to see if they have paid there dues 15 days after there last billed date, if they did then fine, if not then I need to add a 10.00 fee, but all the while every month, I need to keep up with it?? Any advice on how i can plan this out before tackling it later today will be greatly appreciated.
  5. Very nice, in my opinion that is. One thing I noticed is that in the banner there is this little box inside the graphics of the banner, like a border but it's inside the banner. Is there anyway you could replicate that same border appearance (with imagery or something) around the site, I think that would look great.
  6. Ok, here is the code. <h1>System Check</h1> <p>A full system check is run here on the following things:</p> <ul> <li>Monthly Billing</li> <li>Late Fees Calculations</li> <li>Sending out monthly reminders (for members wanting reminders about billers</li> </ul> <p>The system will run through all it's necessary procedures and provide a full report at the end of the entire process.</p> <?php # CHECK LAST SYSTEM DATE // check to see the last day the system check was ran, we only want to allow it to run // ONE TIME per day. // However it has to atleast run ONE time per day. $currentdate = date("m/d/Y"); $selectsysdate = "SELECT * FROM systemcheck WHERE lastcheck = '$currentdate';"; $querysysdate = mysql_query($selectsysdate); if ($rowsys = mysql_fetch_array($querysysdate)) { die("System check can only be ran once per day."); } # BILL USERS MONTHLY // Here is where the aggravations start to happen. // I am going to try to do this in an organized and structured manner so we can // hopefully make additions and changes as needed // FIRST we need to get all the information about the user's so we can work with. // We don't need to concern ourselves with any payments they made, or anything like // that, because they are handled throughout there respective areas. $select = "SELECT * FROM cy_members;"; // get users $query = mysql_query($select); // query users $billerror = 0; // to report number of successfully billed accounts. $billok = 0; // to report the number of failed account billings. while ($row = mysql_fetch_array($query)) { // get the data to work with // get all the dates and proper variables prepared so we can start working with them // don't forget we have timestamps in the database, so if the timestamp is needed // during these calculations I can go ahead and use the date straight from the // database to have the timestamp. $nextbillingdate = date("m/d/Y", $row['system_nextbillingdate']); $lastbillingdate = date("m/d/Y", $row['system_lastbillingdate']); $currentowedamount = $row['system_currentdueamount']; $currentdate = "06/02/2007"; //date("m/d/Y"); $currentdate_s = strtotime($currentdate); // first we need to perform some simple calculations to find out if there // billing date has arrived or not // basically if the current date is the same day as, or after the next billing // date, then it's time to do some calculations if ($currentdate_s == $row['nextbillingdate']) { // this is the amount they are now going to owe, because 19.95 is added onto there // owed amount every month. $newamount = $currentowedamount + "19.95"; // the last billed date becomes today because they were just billed. $newlastbillingdate = $currentdate_s; // the next billing date is 1 month from today (the date they were billed). $newnextbillingdate = mktime(date("h", $currentdate_s), date("i", $currentdate_s), date("s", $currentdate_s), date("m", $currentdate_s)+1, date("d", $currentdate_s), date("y", $currentdate_s)); // so far we have successfully charged them there monthly charges of 19.99, we are // also going to hang onto that currentowedamount because that is the amount // they owe before the 15 days are up. // Now this will permanently take care of all of these issues with billing monthly // the next thign to do is database all the information so we can run the proper // calculations for there late fee's if they are applicable. $update = "UPDATE cy_members SET system_currentdueamount = '$newamount', system_nextbillingdate = '$newnextbillingdate', system_lastbillingdate = '$newlastbillingdate', system_leftover = '$currentowedamount';"; if (mysql_query($update)) { $billok++; $billsuccess = $billok . " accounts where billed successfully."; }else { $billerror++; $billfailure = "There was a problem with billing " . $billerror . " members this month."; } } unset($update); unset($newnextbillingdate); unset($newamount); unset($newlastbillingdate); unset($currentdate); unset($currentowedamount); unset($lastbillingdate); unset($nextbillingdate); } # CALCULATE LATE FEES # SEND OUT MONTH REMINDERS ON ADDED BILLERS TO MEMBERS # Progress Report echo "FULL PROGRESS REPORT"; echo "<hr />"; echo "<h1>Monthly Billing Report</h1>"; echo $billsuccess . "<br />"; echo $billfailure . "<br />"; echo "<hr />"; echo "<h1>Late Fee Calculation Report</h1>"; echo $latefeesuccess . "<br />"; echo $latefeefailure . "<br />"; echo "<hr />"; echo "<h1>Monthly Reminders Reports</h1>"; echo $remindersuccess . "<br />"; echo $reminderfailure . "<br />"; $systemdate = date("m/d/Y"); $insert = "INSERT INTO systemcheck (lastcheck) VALUES ('$systemdate');"; mysql_query($insert); ?> THis code is going to take me forever, right now I thought I had the recurring billing (monthly) working. I noticed some issues, so I put in something that only allows the script to run once per day. This will remove all issues. I basically have to accomplish 3 parts to this script. 1. Bill users monthly based on there billing period. 2. Calculate late fee’s for overdue balances and. 3. Send out monthly reminders when users request monthly reminders for one of there billers. Number 1 I thought I had done, and number 3 will be easy. All of these are things that will only need to be checked on once a day, I am definitely going to need some guidance for number 2 when I get there, but for now I am on number 1. How do I fix number 1. I thought I had it working, but it's not. Any advice. The way I know it's not working is when I had the other thing setup it seemed to work but I couldn't test it. Right now I changed is as I was suggested to == instead, and it's not running the tests at all. Now if it's on the same day or not it's not running the billing cycle.
  7. Actually that was all I was waiting for. Ok about the programming, I meant that a little differently. You are right about that. Most of these things I have heard from other people, and never asked for proof. So can you show me proof that postGreSql is better than Mysql and in what way's. So out of those 4 things I "thought" where fact can you help me differentiate which one's are fact, and which one's I created just off of other peoples "opinions".
  8. Dislikes I don't like it at all compared to what I saw earlier. On the old site I liked * The way the headers looked * That it was centered * The graphic in the footer on all the pages. You took all of those out and it lost a lot of the "appeal" that I originally felt for it. Likes 1. You fixed the link 2. You added a contact us page. Ideas 1. Change it back like it was originally 2. I had a lot more in mind for your contact page. Based on your original layout I could in vision some really good looking things for your form. If you added in the right tint coloring to the form fields. A lot of other ideas for that.
  9. It's hard to explain, it's more of. See when I do the calculations I am updating next billing date with next month, and last billed date with THIS month. So then it's always fresh, doesn't that cover that issue entirely. Since I am using the current month to check if it's either the nextbillingdate or after, once it does process, then the next billing date is changed to next month, so if the script tries to run again, it should be able to tell that. I am going to also leave this post open, because this is only the beginning, I have a much harder (REALLY HARD) calculation part of it I have to do tomorrow, so I will probably be posting here some tomorrow when I start getting into the hairy parts of the programming.
  10. Yes, thank you for reminding me. I am having a hard time "testing" this so I am trying to figure out a good way to debug it, I fed it a future date, to force it to do the calculations, now I can't seem to get them reset. I am going to reset the fields and test it, thanks for all the feedback. Yes, if it's a date late it won't do calculations, what if they forget to do it one day
  11. Yes, but you seem to be the same person. When you originally posted your questions you stripped out a list of questions I asked in my first post. Then you answers with the same answers I got from wildteen. You are starting to get on my nerves. You opened 2 phpfreaks.com accounts, I think you are infactuated with me. I am a guy, and I think you are a fagget, you messaged me 3 time's. You created 2 accounts, posted my original questions and re answered them in another account using wildteens original answers. I think you are a fagget.
  12. Yes, but I update the last billed date with today, and the next billing date with one month from today. So it gets updated each time, keeping it from happen, I didn't post all the code because I was just wondering about that one thing. Thanks for the feedback.
  13. However, I don't really understand why I am responding to my own post here. http://www.phpfreaks.com/forums/index.php/topic,91179.msg365394.html#msg365394 I posted this exact same thing when I first started. So you had to of copied/pasted my original post. So either your a cock, or you didn't feel like taking the time to ask them yourself. In the end it showed me something. When I first started, I posted all of these questions, so I guess it proved I had these questions when I first started, and gained enough mastery to be able to answer ALL of my old questions. That speaks for itself. In the end you took my questions and posted your URL there.
  14. You are going to want to some different stuff on your website as well, because right now it's not mentioning anything about web/application development, or hints towards. So hopefully you can end up getting that to where it can get business.
  15. 1. You will never memorize all there tags. CSS you can memorize all of, html/xhtml you can memorize all of, but php you can't. The core memorized would even be difficult. On top of that you have Pecl, and custom functions, it's just not logical. You will know what all of them do, and be able to learn new one's in a matter of minutes once you get better. There is a point called "programmers mentality" where you are behind just a programming, but you live/breath/think programming. it's a way of life, not a mastery. It's never mastered, there is always new stuff to learn. Being a programmer is about being willing to learn those new things, and apply them to projects as they come. 2. If you get the hang of sql syntax, then jump into mysql and learn it. After that no other database platform will really give you problems. With mastery over sql (dml, and it's other languages) you will be able to easily use mysql, postgresql, oracle, dbkwik and whatever else your heart desires. It's one of the simplest languages to actually learn, i advise that when you first start using PHPMYADMIN then run the queries yourself for the first few months so you can learn everything first. Then start letting it do the queries for you when you create your databases. Later it slows you down a lot but in the beginning it will help you tremendously. 3. I don't agree with full page databasing (just me). database is meant to hold data, nothing more. If you want a cms, I prefer building custom CMS's systems (building the website but having the xhtml formatted content outputted to the page), this is based on personal preference. either way that's what databases are for. Same as xml is for transporting data, databases are for holding data. They hold, gather, and allow you to run queries/reports on data using php or another language. 4. If a website is static then there's no need. Do what the project requires, if they need control over there own content use a database, if there are systems where data need's to be used, then use a database. Don't use one just for the sake of using one, there is a time and a place for everything learning this will help you focus your energy where needed. I tried to spread myself too thin. I wanted to do everything under the sun with web development/application development, believe me it doesn't work. I gave up, and now I do what I can do, learn what I can when I can, and leave the rest to people who know how to do it properly. 5. There are a lot of time's you want to database information that is in a form, but the form itself shouldn't be in a database really (no point). 6. No, it's best to use both. The globally recommended way is do onchange/onsubmit form validation with javascript, ALWAYS, ALWAYS, ALWAYS do the server side validation. Even if you don't do client side, do server, because they can cut javascript off. Of course PHP is the processor (but also do validation on the server side as well.) 7. You won't have need for all those languages. just one language will provide you with enough clients to keep you busy, then in your spare time learn whatever sub languages you want and call them all "secondary" so people know what you are best in. Then you can learn all you want, but never let those "secondary" languages interfere with the knowledge of your primary language, make sure you always stay up to date on your primary language above everything else. it's better to know one thing really, really well, and lot's of things just a little than not know any of them at all hardly. 8. Normally all the languages have the same syntax, doesnt' mean they know how to use them properly. For example I know syntax for ASP/JSP, but I don't know how to use them. If I get an ASP project that's small that's fine I can do it, anything above small I have a friend that does them, same with coldfusion and ASP. Even high level languages like Perl, Python I learnt basic syntax for, but at this moment couldn't implement it if my life depended on it. In my spare time I seek to get better with them, but I make sure it doesn't interfere with my knowledge of PHP at all. 9. Do javascript where you need it. When you can use CSS instead, then do. MAKE SURE the application is usable if javascript is turned off. However in the end you want to make sure that if it's a massive AJAX application, and you want more usability, have a non-AJax version for people who don't have javascript enabled (you will be surprised how many don't enable it, or support it properly.) 10. CSS/XHTML are always better. Validated, cleanly coded. Better for search engines, easier to maintain, easier to keep up with, and faster to create once you learn CSS coding, and cross browser compatibility secrets. 11. Don't use javascript drop down menu's unless there is alternative text based menu's somewhere on the site. You can also achieve dropdown menu's using CSS as well. 12. Only if the server is set to parse html files. You can set PHP to parse whatever you want, you can also alter these settings with HTACCESS file. However it's not recommended because you may need to move it to another server at some point where you will encounter problems. I have gotten in the habit of making every page I create now in .php because I know there will be some point when I need to program on that page. Another thing about htm vrs html files is the htm extension is recommended, it was meant to be used as .htm when it was first created. 13. EVERYWHERE I have read has told me to always use .htm, because even 32 systems can run them properly, it's best to ALWAYS use .htm. 14. It's an extension based off an entirely different language. There main uses are for error pages (forbidden, or page not found) which can be setup as well using some of those file extensions with a little of htaccess magic. 15. Not necessarily, dynamic is dynamic. DHTML is strictly javascript/vbscript 16. No, you could have been using it a long time ago, you probably should be careful with 6 at first until it's been out longer though (when it does) 17. No, never. It's always done strictly on the server, never on the client side. javascript/vbscript are done BY the browser, so it can change, php, asp, jsp, coldfusion, and server side javascript are done on the server itself, so it never is affected by the cross browser compatibility issues faced with client side programming. 18. It's just another language like php, asp, and jsp. it's not liked as much because the coding looks like bloated html, and in the end it always seems considerably slower than other languages. 19. You will never get to that point. Where you are satisfied. learn xhtml, css, javascript, php, and sql/mysql first. If you are good at graphic design learn photoshop and/or fireworks. If you aren't hire a graphic designer. From there just get better at them, and learn what else you need as you need it (ajax concepts is also nice to know). 20. It's javascript with style. It is basically a way for javascript to interact with the server without having to refresh the page. It's good, very good. It's not that hard to learn once you get down javascript/xml 21. ADO is a database system that is used with ASP, it's something you probably won't ever need unless you get really good at ASP. 22. You can never say you mastered anything because mastery isn't something you claim, it's something every else notices. When people start saying you are good, then chances are you are good. If you start calling yourself good, then you are starting to make your first mistakes. When you get into advanced stuff like filehandling, directory handling, data gathering (mining), bots, and heavy calculations then you have pretty much gotten a good grasp of anything you can encounter, and new languages will become easier to grasp at that point. 23. Never. I can generally do most things without having to look (that I do in day to day life) but I still find myself atleast once a day coming here for help with something, or scouring through google/php.net for code examples or how to use a function I never heard of, or thought I knew how to use but didn't. 24. There is never a definite end to the amount of ways something can be done. Something as simple as getting today's date can be done in hundreds of different ways, it's all left up to the imagination of the individual programmer. . 25. It's a form of asp that can be used on servers other than windows. 26. Learn them individually to an extent, but then you need to learn the general mechanics behind interacting with a client, building a website/application, planning debugging, testing, and overall how the process works and how each piece ties in. most of that you can only get from experience. 27. Again I advice one primary to start, and leave the rest at secondary. 28. It stands for extensible markup language, it's used for carrying around data, and allows it to be formatted with XSL< and changed into different formats, as well as converted to other forms of data. Mysql is a set database system that holds data, xml is a file that can be carried around, transported, cut up, and changed around, and easily parsed with php. 29. If you write valid xhtml (can be validated at w3schools website) then you are affectively utilizing the xml portion. Xhtml is basic html with rule's, follow those rules and search engines will like you more, you will also get more "fame" from other developers for being "validated". Hard to explain. That's really looked up to in the development community. 30. 2 day's to learn it, there is nothing to it. It takes longer to learn what it is, and what it's for than to actually learn it. it took me 6 months (literally) to understand what it was for, until someone explained it properly, it took me 2 days to learn it's syntax (because it's defined by you), if you follow the right rules then everything is fine. 31. There is only one variation to XML and that's XML. Other stuff like xsl, xslt, x-path, x-fo are all way's to "style", or "manipulate" the xml. Sit down with an xml file and try to style it with xsl, in the end you would have used all the languages, because x-path, x-fo and other syntax(s) are all used within xsl to help do different things. X-path is meant to find different tags, with xsl is meant to style them, they are all pretty much under one nicely fitting roof. 32. http://www.webstyleguide.com/ I never found anything better than that. 33. So do I so I got a personal content writer. I am a writer, I write books, but I am not a professional writer, so I can't sit there and do content like a real writer can, use a content writer, hey you can even use mine. 34. Go to each one and submit your site with them. You can't use yahoo, excite, and some others without paying, but google and directories (some), and a few others you can easily run around and get a list of there submittal pages together for future references, and it's easy submitting to them. Automatic submittals aren't good by what I hear. 35. Craigslist.com, inetgiant.com, usfreeads.com, and search engines. PLus directories related to what you are trying to advertise, google adwords, google adsense, and general newspapers. Lot's of other things, just get creative. 36. More than can be listed. Content keyword => code ratio, outbound link number, outbound link quality. Some secrets you can use are utilize meta tags, optimize for specific keywords, use title tags in links and alt tags in images to your advantage, and other stuff you will learn as time goes on with experience.,
  16. if ($currentdate_s >= $row['nextbillingdate']) { } Is that correct in identifying whether or not the current date, is after the nextbillingdate. Both are timestamps, one is a timestamp of the current date. The other one is a timestamp of the upcoming billing date (the date they need to be billed). So basically if the current date is before the time period where the billing need's to occur it doesn't need to do anything. If it's the same day, or after then it need's to do the calculations inside the if statement. Is the above code pretty much what I need (based on what I described) to figure this out.
  17. No, I also meant I have that already taken into account. In the database I have to have the last billed date, and next billing date so I can show them to the client throughout the system. Maybe I didn't fully understand what you meant, because I thought through calculations that I could perform with last billed/next billing date but I couldn't think of anything. That's why I took the same idea you presented but with a different date (add a third date in there to tell me when the system check was last ran. Either way based on your advice, I have now something I can wrap my head around, thanks.
  18. Also back on track, if you go http://www.oleaa.net/?show=home there, that link that is suppose to go to the IP script actually goes to the image one. It works properly on the projects page, but not the homepage (just something I noticed when going over the site. The other thing I noticed is you didn't have a contact form, it'll only take you 5 minutes to create one and will make someone contacting you a LOT more likely.
  19. Hmm that gave me an idea, but I already have lastbillingcycle nextbillingcycle. I have to keep tracking those. However I could have a last modified date on both, and record in the system when last the system was modified, and use that to decide when the last maintenance check was ran, and then use that to base my calculations on, how does that sound.
  20. See if the API your are using has documentation, if it does pour through it, there should be an FAQ or something related to problems that you can find that might help you debug the issue better.
  21. Hmm, I am basing this opinion on my own thoughts not what other people said. 1. I found some good functions on there, thanks. 2. Wish the headers looked a little different. Other than that, looks good.
  22. http://www.google.com/search?source=ig&hl=en&q=error%3A+302%28found%29++in+php&btnG=Google+Search
  23. Ok, I have a billing system I created, and it has a lot of information in it. It's a pretty large system. I have to create a maintenance page, that will be ran manually for now but will eventually be setup to a cron job to run automatically, like everything day, or every 15 minutes or something. I have 2 things I need to accomplish with this, and I was doing some Pre-planning to try to make sure everything was going to run smoothly. Ok, well basically I need to pull out all the user information, check to see what billing date they have, when it comes 15 days after the billing date and if they haven't paid it charges a 10.00 late fee. At the end of each billing cycle they are also billed 19.95, and it resets the next billing cycle to the next month. All of that is very simple. Another thing I needed to do was check the list of billers and see if the user requested a "reminder" and if they did, from there I could send out a monthly reminder (easy as well). After thinking about both of these problems I was trying to come up with a decent structure for my maintenance page, and it's fairly straight forward (haven't started on it yet, I am just planning right now). The current problem I keep going over is, I can do everything I mentioned. however now when I think about the different problems that can encounter, if someone re-runs the script on the same day, or within the same month for that matter then a few bad things will happen. 1. It will double up the late fee. 2. It will send double monthly reminders. Those are just 2 bad things I know will happen before I even create the script, does anyone have any advice on how I can keep that from happening.
  24. No those aren't related to database commands, they are strictly related for php. Those are totally ignored. The idea is PHP need's those to be able to tell it's still part of it. Here there's something better than us trying to explain something so complicated in such a short area, here is a full informational explanation. http://spindrop.us/2007/03/03/php-double-versus-single-quotes/ http://www.weberdev.com/get_example-3750.html http://www.thescripts.com/forum/thread3954.html Those are some about single quote's versus double quote's. Below are some more that are related to escaping characters. http://www.java2s.com/Code/Php/String/String-Escape.htm Escapes are somewhat hard to explaining. Performing escapes for something you are putting in the database is the oposite. There are PHP escapes that are requried for a string to recognize what you are doing, like / to escape double quotes inside of double quotes. There is something different though for a database, data can't be put directly into a mysql database without being completely escaped within the string.
  25. http://www.dbforums.com/archive/index.php/t-1059308.html This is all I could find, hopefully it helps it was as close as I could come to finding something helpful.
×
×
  • 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.