Jump to content

ldougherty

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Everything posted by ldougherty

  1. http://us3.php.net/manual/en/language.oop5.decon.php PHP 5 introduces a destructor concept similar to that of other object-oriented languages, such as C++. The destructor method will be called as soon as all references to a particular object are removed or when the object is explicitly destroyed or in any order in shutdown sequence.
  2. The Data API allows a program to perform many of the operations available on the YouTube website. It is possible to search for videos, retrieve standard feeds, and see related content. http://code.google.com/apis/youtube/getting_started.html#data_api
  3. The only way to truly determine what is happening would to be look at the variable output as the script is executing. I suggest as your computing the grade that you keep echoing out the actual variable value to figure out where it is not computing the way you expect.
  4. You could use the strip_tags function.. http://us2.php.net/manual/en/function.strip-tags.php This should allow you to remove all of the HTML tags from your specified line leaving you with just the text.
  5. When you say it doesn't work what exactly does it do? Does it write the line as text? Does it write the PHP code as text? Does it do nothing at all? If it does nothing then try looking at your error logs or turning display errors on via your code so you can see what is happening.
  6. Specifying a custom 404 will not do the trick, the reason you get this message is because PHP is trying to interpret the file even though it doesn't exist. Check this article, should be a good reference. http://jenseng.com/archives/000035.html
  7. Your logic is not far off, assuming the variables are just plain variables and not arrays you could use the isset function to determine if the variable has a value or not. http://us.php.net/isset Simply use it like If (!isset($var1)) { echo "var1 is empty"; } That states if $var1 is NOT SET then echo it is empty.
  8. Do you have webmail access for your designtwenty1.com account? If so does the message end up in the spam folder there as well or are there particular rules you have in place in Outlook that are defining the message as spam. There are plenty of things you can do to validate an email but not a whole lot when sending via php on linux. Just be sure your hostname is valid on the server in that it resolves and you have a proper reverse DNS record. If you were sending via SMTP you could also include domain key validation.
  9. I'm not sure why you'd be trying to pull from both tables if all the information you want is in table #1 In contacts are the following fields: teamName telnum division privatenum So the query would be select * from contacts where division = '1' This would return all the information from contacts where the division = 1
  10. What you need to do is change the value of the length field using the on select javascript function I don't have the code off hand but the idea is that when a user selects something from the drop down (ie on select) the document.description.size should be adjusted. If you do a quick search on Google for on select you'll find a wealth of walk throughs.
  11. http://dev.mysql.com/doc/refman/5.0/en/delete.html multiple-table DELETE statements can use the same types of join allowed in SELECT statements, such as LEFT JOIN. For example, to delete rows that exist in t1 that have no match in t2, use a LEFT JOIN: DELETE t1 FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.id IS NULL;
  12. First off you would need to determine what page you are currently browsing, ie page 1, 4, 5, 10 etc... Then you base your logic off of that. Essentially creating 3 sets, set a would be 1,2,3 set b would be curpage-1, curpage, curpage+1 set c would be page_count-2,page_count-1,page_count The tricky part comes here, what if your browsing page 1,2,3,13,14, or 15 then what do you display? Generally you see these methods where that have 1,2,3 ... Next and when you click on next it brings up results 4,5,6.
  13. Use: SELECT ... INTO OUTFILE 'file_name' See http://dev.mysql.com/doc/refman/5.0/en/select.html for more information. I wouldn't suggest this though, a flat file is not a great resource for querying and you'll likely end up with greater issues using a flat file.
  14. Check out http://www.regular-expressions.info/ This is a good resource site for regex
  15. Obviously when you run it through phpmyadmin you replace the variables with actual values and this is when it works. Therefore the problem must be with the value of the variables in the query on your script. Try echoing out the variables prior to running the query to see if they have the values you expect.
  16. So right now you have one toggle that basically switches between live and test mode and you want a third option? You'd have to change it to something other than true or false because that only works on two statements, not 3. Something like this is the direction to go in. if (MODULE_TEST_STATUS == 'live') { ## LIVE MODE $this->form_action_url = 'https://website.page1.com'; } elseif (MODULE_TEST_STATUS == 'test') { ## TEST MODE $this->form_action_url = 'https://website.page2.com'; } else { ## SIMULATOR $this->form_action_url = 'https://website.page3.com'; } } And on the form itself you need to add a 3rd entry and change the values from true, false to live, test, simulator.
  17. Assuming you are storing the comments in a mySQL database then you would be able to query the results and display them as you wish. The following tutorial should be of assistance. http://www.tizag.com/mysqlTutorial/mysqlquery.php
  18. What you are referring to is dynamic select http://www.plus2net.com/php_tutorial/php_drop_down_list.php
  19. This error appears because of your PHP error reporting settings. Usually, it appears when your variable is not properly set. There are two ways to handle this issue: 1. Check if $_POST['action'] is set before using it. For example: if (!isset($_POST['action'])) { //If not isset -> set with dumy value $_POST['action'] = "undefine"; } 2. Suppress Notice warnings Notice warnings could be suppressed by changing the error_reporting variable in your PHP.ini. error_reporting could be set to show all errors except those for notices and coding standards warnings: error_reporting = E_ALL & ~E_NOTICE The same is accomplished by adding the following line in your php page: <?php error_reporting (E_ALL ^ E_NOTICE); ?>
  20. Honestly it wouldn't make a difference as you are running a query to delete the data in both methods. It all depends on how often you do it. You are either running a query to remove more results once every couple hours or running multiple queries more often to remove less results. I'd stick with the method you are already using, less queries = better performance
  21. This error occurs either when there is no active database connection specified before you try and execute a query or you are trying to run a query on something that doesn't exist like a table or column.
  22. If it is always showing the same result set its likely that your variables are not being set to what you believe they are. I'd start echoing out variables through out the code before they come into play to see exactly what aspect of your code isn't working properly.
  23. Try updating your query as follows.. $sql = "UPDATE tx SET patient = $_POST['patient'], mrn = $_POST['mrn'], check1 = $_POST['check1'], check2 = $_POST['check2'], check3 = $_POST['check3'], comments = $_POST['comments'], check1_date = '$check1_date', check2_date = '$check2_date', check3_date = '$check3_date', signoff_status = $_POST['signoff_status'], tp_date = '$tp_date' WHERE id_incr = $_POST['id_incr']";
  24. If you are not familiar I suggest reading through the Session Handling section at php.net http://us.php.net/manual/en/book.session.php The examples section will be truly helpful in understanding how to pass variables with sessions.
  25. If the values for your variables have spaces in them make sure you call them with '' such as $mycar['$1'] rather than $mycar[$1] as only the first part of the value would be caught without the ''
×
×
  • 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.