PHP and JQuery Stuff
Declaring non Existing object: In order to comply with E_STRICT standards prior to PHP 5.4, or the normal E_WARNING error level in PHP >= 5.4, assuming you are trying to create a generic object and assign the property success , you need to declare $res as an object of stdClass in the global namespace: $res = new \stdClass (); $res -> success = false ; Jquery Email Regex: var userinput = $ ( this ). val (); var pattern = /^\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b$/ i if (! pattern . test ( userinput )) { alert ( 'not a valid e-mail address' ); } Jquery Session: https://www.w3schools.com/jsref/prop_win_localstorage.asp How to bind click event to dynamically created HTML elements in jQuery If you try to do something with the elements that are dynamically added to DOM using the jQuery click() method it will not work, because it bind the click event only to the elements that exist at the ...