Jump to content

PravinS

Members
  • Posts

    459
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by PravinS

  1. SELECT TOP is not supported in MySQL, you need to use LIMIT try this SELECT ID, Name, Score FROM Scores ORDER BY Score DESC LIMIT 10
  2. Check this script online http://www.php-guru.in/2014/pagination-php-mysql/
  3. mysql_connect() function is not supported in PHP 5.5.0 and your PHP version may have been upgraded to 5.5.0 check this url: http://php.net/manual/en/function.mysql-connect.php
  4. echo tha $_POST['who] value at the top and check what value you are getting after submitting the form.
  5. Yes, use AJAX to get current quantity($qty) value
  6. Try this: echo date("m",strtotime('2014-08-20 07:32:20'));
  7. Try TCPDF
  8. for PHP SOAP you can try NuSOAP Toolkit
  9. you can check it in jsfiddle for the output
  10. search the following line html += '<td>' + i + '</td>'; and replace it with if (i == d.getDate()) html += '<td style="color:blue;">' + i + '</td>'; else html += '<td>' + i + '</td>';
  11. Use $result = json_decode($string,true); you will get $result in array format
  12. Check this simple logic <table border="0" cellspacing="0" cellpadding="5"> <tr> <?php $array = array(1,2,3,4,5,6); $i = 1; foreach($array as $val) { echo '<td>'.$val.'</td>'; if ($i % 2 == 0) echo "</td></tr>"; $i++; } ?> </tr> </table> I hope this will help you
  13. you have only 1 while loop and 2 endwhile
  14. You can use it like this also <?php $link = '<a href="post?id='.$id.'&title='.$slug_title.'">'.$title.'</a>'; ?>
  15. you need to check the MySQL query $query = urldecode($query); echo the above line and check the query
  16. try FCKeditor or TinyMCE
  17. why do you want to split the form, it can be done in single form
  18. you have used "Like" as column name, it is reserved word in mysql
  19. you can use PHP time zone instead of javascript time zone
  20. remove the back ticks (``) from VALUES of INSERT query and use single quotes (' ') $query = "INSERT INTO user(user,pass,priv,mail,avatar,date) VALUES('$user','$pass','$priv','$mail','$avatar','$date')"; may this works for you
  21. check the SQL query, whose resource id is passed to mysql_fetch_array() function at mentioned line or else show us the code of C:\xampp\htdocs\index.php
  22. use this updated javascript function function checkForm() { var obj = document.getElementsByName('dest[]'); var destCount = obj.length; var destSel = false; for(var i = 0; i < destCount; i++) { if(obj[i].checked == true) destSel = true; } if(destSel == false) { alert('Select one or more destinations'); } return destSel; }
  23. use this code <html> <head> <script language="javascript"> function checkForm(){ var obj = document.getElementsByName('dest[]'); var destCount = obj.length; var destSel = false; for(i = 0; i < destCount; i++){ if(obj.checked == false){ destSel = true; break; } } if(!destSel){ alert('Select one or more destinations'); } return destSel; } </script> </head> <body> Select at least one destination <form action="" method="post"> <input id="cx" type="checkbox" name="dest[]" value="CX" /> <label for="cx">Cox's Bazar</label><br /> <input id="su" type="checkbox" name="dest[]" value="SU" /> <label for="su">Sundarban</label><br /> <input id="sy" type="checkbox" name="dest[]" value="SY" /> <label for="sy">Sylhet</label><br /> <input id="ch" type="checkbox" name="dest[]" value="CH" /> <label for="ch">Chittagong</label><br /> <br /> <input type="submit" name="Go" value=" Go " onclick="return checkForm();"/> </form> </body> </html> also check the jsfiddle
  24. Just remove onsubmit="return checkForm(this);" from form tag and add it to button as onclick="return checkForm(this);" Use this <form action="" method="post"> <input id="cx" type="checkbox" name="dest[]" value="CX" /> <label for="cx">Cox's Bazar</label><br /> <input id="su" type="checkbox" name="dest[]" value="SU" /> <label for="su">Sundarban</label><br /> <input id="sy" type="checkbox" name="dest[]" value="SY" /> <label for="sy">Sylhet</label><br /> <input id="ch" type="checkbox" name="dest[]" value="CH" /> <label for="ch">Chittagong</label><br /> <br /> <input type="submit" name="Go" value=" Go " onclick="return checkForm(this);"/> </form>
×
×
  • 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.