Tags down


PHP MySQL if date and time unavailable add to alert message

By : Jen
Date : September 16 2020, 06:00 AM
will help you If you are using .= you need to first initialise the variable before .= will work on the variable.
You attempted to do that in this IF block
code :
if (!$_POST['name']) {
    $error = "<br/>- Please enter your name";
$error = '';
if (isset($_POST['datetime'])){

    // So now you can change this test to use .=
    if (!$_POST['name']) {
        $error .= "<br/>- Please enter your name";
ini_set('display_errors', 1); 

Share : facebook icon twitter icon

How should i store availability calendar information in mysql? for [id] [date] [available/unavailable]

By : Jason
Date : March 29 2020, 07:55 AM
wish help you to fix your issue Definitely option 2. Index both start_date and end_date columns and you'll be fine. Your code will need to ensure there are no overlaps for a given cottage.

How can I repeatedly play a sound while a javascript alert message is up and stop it when the alert message is dismissed

By : HHHappy
Date : March 29 2020, 07:55 AM
I wish this helpful for you I assume you're using html 5 to play the audio. See the loop attribute. Then just call stop() on the line after the alert(). alert() blocks script execution, so it will work.

I need to display an alert message when the last date matches

By : Hussain Siddique
Date : March 29 2020, 07:55 AM
it should still fix some issue I am using codeigniter. I have a table with fields like tax,start_date and end_date. i retrieve the start and end date from the table. When the date is equal to the end date i need to alert the user that this is the final day so change your settings. i am new to codeigniter so i do not have much idea about it. for example my start_date is 20/2/2015 and end_date is 20/5/2015, i need to get an alert message on 20/5/2015. my table structure is , Here is the 3 files MVC
the controller:
code :
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class my_controller extends CI_Controller {

    public function index()
        $data["result"] = $this->my_model->date_verification();
class my_model extends CI_Model
        public function date_verification()
            $qry_str = "SELECT *
            FROM `service_taxdate`
            service_taxdate.start_date = service_taxdate.end_date";
            $q = $this->db->query($qry_str);
            return $q->result();            
// html headers ...etc
foreach($result as $row)
echo "the id: ".$row->id ." has the same start and finish date ".$row->start_date."<br>" ;

Alert message if date and time is older than a value

By : debashree
Date : March 29 2020, 07:55 AM
like below fixes the issue I'd suggest you to parse the form date, create the comparison date according to the expected period and then return if the formDate is greater than comparisonDate.
Please, let me know if the code below is according to what you expected:
code :
function getFormDate() {
    const formYear = $("#input_year").val();
    const formMonth = $("#input_month").val() - 1;
    const formDay = $("#input_day").val();
    const formHour = $("#input_hour").val();
    const formMinute = $("#input_minute").val();
    return new Date(formYear, formMonth, formDay, formHour, formMinute, 0, 0)

function getComparisonDate() {
    const today = new Date()
    let comparisonDate = new Date()
    comparisonDate.setMonth(today.getMonth() - 2)
    comparisonDate.setHours(today.getHours() - 60)
    return comparisonDate

function thereIsMissingValue() {
    let anyMissing = false;
    const inputs = $(".container-date input, .container-time input")
    inputs.each(function () {
        if (!$(this).val())
            anyMissing = true
    return anyMissing

function displayMessage() {
    const formDate = getFormDate()
    const comparisonDate = getComparisonDate()


    const isOlderThanComparison = formDate < comparisonDate

    const isInTheFuture = formDate > new Date()

    const isValidDate = !isOlderThanComparison && !isInTheFuture

function calculate() {
    if (thereIsMissingValue()) {


$('#input_year, #input_month, #input_day, #input_hour, #input_minute').change(function () { calculate(); })
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<div class="container-date">
    <div class="date_day">
        <input type="text" maxlength="2" name="input_day" id="input_day" value="">
    <div class="date_month">
        <input type="text" maxlength="2" name="input_month" id="input_month" value="">
    <div class="date_year">
        <input type="text" maxlength="4" name="input_year" id="input_year" value="">

<div class="container-time">
    <div class="time_hour">
        <input type="text" maxlength="2" name="input_hour" id="input_hour" value="">
    <div class="time_minute">
        <input type="text" maxlength="2" name="input_minute" id="input_minute" value="">

<div class="container-date-validation" style="display:none">
    <p class="older-date" style="display:none">Invalid date. Only dates after
        <span id="min-allowed-date"></span> are allowed.
    <p class="future-date" style="display:none">Invalid date. It doesn't allow dates in the future.</p>
    <p class="valid-date">This is a valid date</p>

Is there a way to search a document for a start-date and end-date time interval and send alert notifications using rever

By : Manda J
Date : March 29 2020, 07:55 AM
Any of those help You can construct any query that would match the desired documents at search time, and embed that in your rule. The reverse-query is used at document insert time, to figure out which rules match the new document.
In your case it sounds like you are looking for (Dog OR Cat OR timestamp) AND (start-date LE '2018-02-28') AND (end-date GE '2018-02-28'). That comes down to some kind of cts:query like this:
code :
  cts:word-query(("Dog","Cat", "timestamp"),("distance-weight=10")),
  cts:element-range-query(xs:QName("start-date"), "<=", xs:date('2018-02-28')),
  cts:element-range-query(xs:QName("end-date"), ">=", xs:date('2018-02-28'))
Related Posts Related Posts :
  • Laravel URL redirecting back
  • Authentication in Laravel using 2 tables
  • Problem with DocuSign, migrating from dev environment to prod environent (Go-Live)
  • Laravel - it is looking for a column "deleted_at" even if I didn't created that column
  • how to change max_input_vars value on godaddy server
  • How to clear memory on each execution?
  • Count number of files with certain string in it [PHP]
  • Rewriting HTML anchor using str_replace and regex
  • How to use doctrine with slim framework 4?
  • Php nothing happens when I click login, just removes both fields
  • How to Store multiple values in single field laravel
  • WordPress get last insert id from database
  • how do i go getting this eloquent relationship right?
  • Symfony two services in docker configuration
  • If i load the checkboxes from database, and i uncheck the checkbox after submit it is still checked
  • Your requirements could not be resolved to an installable set of packages (phpseclib/bcmath_compat)
  • Map associative array to another array php
  • Laravel orderBy highest points
  • Unable to populate cell by zero value from $_GET array
  • PHP downloading will randomly give a network error
  • Shortcode style parsing
  • Data not Inserting In WordPress Database
  • Converting a nested if-else based on range condition into switch statement
  • Why is the use language construct in php unable to see changes in the value of a variable?
  • Laravel + Swift Mailer: Error: no valid recipients
  • Magento 2 installation on Manjaro (Arch Linux) ~ php extension missing
  • How to prevent manually set url in laravel
  • How to enable XDebug in Apache but not in CLI?
  • Redirect to the prev of the prev url
  • how to configure php email in blue host to use mail() function?
  • php variable scope - include/required scripts vs ajax
  • How to write question in Markmail support (i.e. open meeting support)
  • Laravel query not working when using as scope
  • LexikJWTAuthenticationBundle | JwtToken is working but Authentication says "Full authentication is required to acce
  • how can i use variable in where condition ( in clause) in yii2
  • Fix broken unicode escape without leading slash in PHP
  • What is called after a Data Persister on Api-Platform?
  • How can I stop the regex at first match?
  • How can I echo ( php for loop variables ) in html table?
  • Function that echo string then replace letters
  • svg programming, coords are messed up
  • Is there any array function to make array value as key and other value as value of that key?
  • Difference between get_discount_total() and get_total_discount()?
  • Ajax call using Laravel not working when ad blocker is enabled
  • How to create a function that check multiple values passed as an argument
  • Fetch current and next row and compare in a loop
  • How to Import CSV to 'Update' existing record in DB using Laravel
  • PHPMailer doesnt seem to work with Hostgator Hosting
  • Changing file permissions in php
  • index.php page not loading on main domain on a GCE VM instance
  • Prepared Statement Inside Stored Procedure Called by PHP Prepared Statement
  • Insert multiple values as array into one column
  • PHP Convert RGB Array to String variable
  • Restream a Shoutcast/Icecast Stream Using PHP
  • Cannot write to my csv file from Oracle database using PHP
  • How to get data from mysql to the select option in php
  • My JQUERY AJAX success function not working
  • How to use same Blade template for add and edit operation of one controller in Laravel?
  • Two image not create thumbnail at same time in Php
  • Laravel Keep caching though cleared
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk