sandeepm

Members
  • Content count

    53
  • Joined

  • Last visited

Everything posted by sandeepm

  1. function insertText(elemID, text) { var elem = document.getElementById(elemID); elem.value += text; } innerHTML is used to display text in html divs. By using name also we can get the values.
  2. We have to call function every second, using setinterval
  3. How can you place the function in if condition, is it possible.
  4. By using group by or distinct in query we can get unique values.
  5. i thought that $('#msg').text is not working better to try it $('#clickme').on('click', function(e) { $('#msg').html('hello'); $('#msg').delay(500).html('First Change!'); $('#msg').delay(500).html('Second Change!'); });
  6. Instead of using window.onload use below code $(document).ready(function() { timeleftpay(); });
  7. <!DOCTYPE html> <html> <body> <h1>JavaScript ISO Dates</h1> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = new Date("2015-03-25"); </script> </body> </html>
  8. function test(){ var a = "hellow"; } This is my javascript function i want to use my php data to this function, how?
  9. That entire thing is validate using javascript and jquery it's really fine.
  10. By using GET/ POST method you can transfer the data from one page to another page.
  11. While uploading a video, not uploading but image and files are uploading. The array after showing array Array( [file] => Array ( [name] => vlc-record-2016-05-08-21h02m18s.mp4 [type] => [tmp_name] => [error] => 1 [size] => 0 )) can any one please help me.
  12. Ok, But i am uploading only 200kb video and it's not reading temp_name and type why?
  13. if your requirement is empty the specific array members means just do like this $arr[1] = '';
  14. If you have full of confusions let do one thing echo "<ul>"; while ($record = mysqli_fetch_assoc($result)) { $id = $record['id']; $brand = $record['brand']; $description = $record['description']; $images = $record['images']; $title = $record['title']; echo "<li> $id $brand $description </li>"; ?> <img src="car/<?php echo $images ?>" height="100" title="<?php echo $title ?>" alt="car" /> // write like this and check once <?php } echo "</ul>";
  15. Please add enctype="multipart/form-data" in form opening tag (<fortm enctype="multipart/form-data"></form>) Then you can check while submitting form in post method
  16. this code is help full to you check once Initially you can save all images in one variable then, $(document).ready(function() { window.setInterval(function(){ countdown(); }, 1000);// every one second }); function countdown() { // build your logic to get random images from that variable }
  17. I am working with facebook share button in view file and ajax files, but facebook share button not working in ajax page but it's working in when page load time this is my code, <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.5"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-share-button" data-href="/useradmins/details/<?php echo $param ?>/<?php echo $inst_name.'-'.$institute_id ?>" data-layout="button_count"></div> can you please help me?
  18. i am trying to learn cake php, so before i have some doubts, in cake frame work can we write row queries in controller is that best way because cake php formats are very different. can i fallow the regular query formats and i need some reference's for learning cakephp
  19. i need logout code for apllication. This code is working properly but the issue is when the mouse moments on that browser it's not working can you tell me please.. $url = BASE_URL; $url1='home/logout'; $TimeOutMinutes = 5; // This is your TimeOut period in minutes $LogOff_URL = $url.''.$url1; // If timed out, it will be redirected to this page $TimeOutSeconds = $TimeOutMinutes * 60; // TimeOut in Seconds if (isset($_SESSION['SessionStartTime'])) { $InActiveTime = time() - $_SESSION['SessionStartTime']; if($InActiveTime >= $TimeOutSeconds) { echo "<script type='text/javascript'> window.onload = function () { top.location.href = '" . $LogOff_URL . "'; }; </script>"; } } $_SESSION['SessionStartTime'] = time();
  20. many times i am facing this problem while login into application Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in what it is this wxactly ???/
  21. $email = $_POST['email'];require_once "/var/www/html/swift_mailer/swift_required.php";// Create the Transport$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com',***,'ssl')->setUsername('*******@****.com')->setPassword('***');// Create the Mailer using your created Transport$mailer = Swift_Mailer::newInstance($transport);// Create a message$message = Swift_Message::newInstance('Test Swift Mail Setup')->setFrom(array('******@***.com' => 'Statreferral Admin'))->setTo($email)->setBody($content,'text/html');// Send the message$result = $mailer->send($message); What is the wrong in this code pplease suggest me...... how can i check whether username contain mail server or not.....
  22. In MVC i am including thease lines in config.php file $email = $_POST['email'];require_once "/var/www/html/swift_mailer/swift_required.php";// Create the Transport$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com',465,'ssl')->setUsername(FROM)->setPassword(PASSWORDS);// Create the Mailer using your created Transport$mailer = Swift_Mailer::newInstance($transport); ----- files.php (controller) in controller functions i wrote like this $message = Swift_Message::newInstance('Test Swift Mail Setup')->setFrom(FROM)->setTo($email)->setBody($content,'text/html');// Send the message$result = $mailer->send($message); what is the error............
  23. i am saving db.php and header.php files in same folder i am including db.php file in header.php like <?php include_once("db.php");?> not including the file and givind error message like no database is selected i checked db in phpmyadmin it is perfect, in db.php i wrote connection like $con = mysql_connect("localhost","root",""); mysql_select_db("fun",$con); not connecting, but this same code past in index file it working... what is the mistake.? can any one help me please....
  24. yes how can i check ???
  25. I am facing problem in sending mail to my inbox but everytime it goes to spam by using php mailer function IN PHP what is the code for php mailer