Jump to content

BigB

Members
  • Content count

    28
  • Joined

  • Last visited

Community Reputation

1 Neutral

About BigB

  • Rank
    Member
  1. BigB

    Abstract classes for testing code?

    Just a guess, abstract class -> abstract method, this way you're always got the error checking code running before you access the rest of the classes/methods. So any instance will automatically call the error method first etc. Link might be helpful (Even if Java): http://www.javacoffeebreak.com/faq/faq0084.html
  2. Hi @mamm02 Your code looks close, try below. NOT TESTED: if ($_POST['question'] === 'Shakespeare') { echo "your answer is right! <br/><br/><a href='puzzl.html'> go to the next question! </a>"; } else { echo "your answer is wrong! <br/><br/><a href='test.html'> try again </a>"; }
  3. BigB

    If not available else function

    Hi. Just comment it out then? //available or not if ( nd_booking_is_qnt_available(nd_booking_is_available($nd_booking_id,$nd_booking_date_from,$nd_booking_date_to),$nd_booking_date_from,$nd_booking_date_to,$nd_booking_id) == 1 ) { $nd_booking_availability = ""; }else{ // DO NOTHING // --------- >> Commented out: $nd_booking_availability = "<span class='nd_options_color_white nd_booking_font_size_10 nd_booking_line_height_10 nd_booking_letter_spacing_2 nd_booking_padding_3_5 nd_booking_top_10 nd_booking_position_absolute nd_booking_right_10 nd_booking_bg_yellow'>".__('NOT AVAILABLE','nd-booking')."</span>"; }
  4. BigB

    Allow variable rules on "Quantity Rules"

    Hi @Thatch77, We are little lost with your question, have you looked in Wordpress admin dashboard for any of the options you're trying to achieve? It looks like you could edit some code here for your objective, you could create another condition (quantity), though it may never get called or used, there is missing code and I am assuming this is a third-party add-on, may want to check on the third-party add-on web page. Example only... does nothing... Where was the variables $quanity and $amt set?? Where is it returned too?? and how are they used?? } elseif ( !empty($quanity) and !empty($amt)) { $quanity = $amt; return '$quanity';
  5. Looks cleaner than my code :-) Maybe just... Add comments throughout your code. Thought about using a class/methods? Maybe a few extra Try / Catch Nice work, don't know what other things to suggest, I am no guru.
  6. BigB

    Statistics

    Hi, I assume you mean something like: ?> <table width="50%" align="center"> <tr><td>REMOTE_ADDR: <td/><td><?php echo $_SERVER['REMOTE_ADDR']; ?></td></tr> <tr><td>HTTP_USER_AGENT: <td/><td><?php echo $_SERVER['HTTP_USER_AGENT']; ?></td></tr> <tr><td>HTTP_REFERER: <td/><td><?php if(isset($_SERVER['HTTP_REFERER'])) {echo $_SERVER['HTTP_REFERER'];} ?></td></tr> <tr><td>Date: <td/><td><?php echo date("r"); ?></td></tr> </table> <?php
  7. Sorry, bit late to this party, Note. if you're using wordpress, you may want to backup before updating theme or you will have to do it all again... For css style. (Not sure this is what you mean...) @import url("style.css"); OR ...<head> <link rel="stylesheet" type="text/css" href="style.css"> </head>...
  8. Your welcome, happy coding :-)
  9. Create a page - ie my_error_find.php and include the file you are testing to see if you can generate a useful error. <?php ######### ERROR FINDING PAGE ######### ini_set('display_errors', 1); ini_set('display_startup_errors', 1); ini_set('error_reporting', E_ALL); error_reporting(E_ALL); error_reporting(-1); include("Your_file_name.php"); // <<== PATH TO FILE WITH ERRORS include("Your_file_name.php"); // <<== PATH TO FILE WITH ERRORS ?>
  10. BigB

    Any body familiar with IPTV?

    Yes, requinix is saying try the Html <video> tags Example <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video> Reference w3school: https://www.w3schools.com/tags/tag_video.asp
  11. I believe it to kilometres, you could round(48.272494811035, 2); for cleaner numbers to work with.
  12. I think having to many nested loops may use up resources and freeze up your page, may require a longer timeout set_time_limit(60); on the page and possibly a wait(1); depending on how much data, not the best solution I would say, if you could use something like "Barand" first post with the join or organise as much of the your data via SQL, you will have smoother code.
  13. Thanks all, appreciate the great feedback :-) Some very useful knowledge.
  14. Hi, Would it not be better to do as much as you can in the SQL? Use a compare SQL statement like: SELECT A.*, B.* FROM TABLE_A A INNER JOIN TABLE_B B ON A.ID = B.ID WHERE A.column1 != B.column1 OR A.column2 != B.column2 Not sure if this will help,
×

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.