Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gristoi

  1. do $answer = mysql_query( $getanswer, $con ) or die("MySQL ERROR: ".mysql_error());
  2. https://www.google.co.uk/search?q=jquery+ajaxphp+example&oq=jquery+ajaxphp+example&aqs=chrome..69i57j0l5.5793j0j7&sourceid=chrome&espv=210&es_sm=91&ie=UTF-8
  3. mysql_query returns a resource, you need to loop through that resource to get the data back.
  4. action="inde x1.php" to action="index1.php"
  5. isnt that meant to be part of your learning process? going and resourcing the information to overcome this. The developers in this forum will happily help you overcome a problem, but not do your homework for you
  6. the call to the click is event driven, when you click on something a series of events bubble up through the component ( their native behaviours) when you use javascript to intercept these events you have to override their default behaviour.; so a button being what it is, if you click on it and it is ,for example, a button in a form, then if you return false it will stop the button from submitting the form. With this in mind you will see a lot of logic saying .... if field a in form is empty ... then stop button from completing its click event.... otherwise continue with the submit ( return true )
  7. I develop on a mac, easiest way is to instal php using homebrew. google 'php homebrew mac' . is very simple. I have php 5.3,5.4 and 5.5 installed and swich at will
  8. $query = "SELECT exp_weblog_data.field_id_5, exp_weblog_titles.title, field_id_57 FROM exp_weblog_data inner join exp_weblog_titles ON exp_weblog_data.id = exp_weblog_titles.entry_id WHERE exp_weblog_data.field_id_5 LIKE '%". $param ."%' LIMIT 10";
  9. $db = new DBConnection(); $fetchItems = new dbHandler($db, 'exp_weblog_titles'); $param = htmlspecialchars($_GET["term"]); $items = $fetchItems->getResultsByTerm($param, 'title', 10); term = the where in the query, 'title' if the column you want, table is set in the construct of the handler
  10. i am not going to look through your entire code, but a few warning flags are a. you are contemplating using globals and b. you are not using __construct(). Looking though your setup you are declaring new instances of nest. i would advise you look at 2 things - Dependency Injection and the IoC container
  11. what does the getResultsByterm method do? you need to post more code
  12. $lession = array("AA,BB,CC"); should be $lession = array("AA","BB","CC");
  13. require_once (__DIR__.'/../login/incDB.php');
  14. are you actually posting any data to this script? you need to add some conditional checking in to make sure the data is there. ie: if(isset($_POST['ip])){......do stuff.....}
  15. mysql Workbench
  16. if you're using mysql then use the tool design by the people who made it: http://www.mysql.com/products/workbench/
  17. http://docs.php.net/manual/en/language.types.array.php
  18. chances are $imgs is not an array
  19. i understand you're question. user clicks remove -> the ajax calls sends data to back end -> record gets removed -> you get ajax response back -> remove the row from the page. Is this correct?
  20. so what you're trying to do is not create a chat system, but find one to fit your needs. If you dont want to code it yourself then ask in the freelance section and pay someone to do it for you
  21. you need to listen to the click event of the remove button. something like this: $('.remove').click(function(e){ e.preventDefault(); var me = $(this); var customer-id = me.data('customer-id'); $.ajax({ 'url': 'processing/delete-playlist-items.php', 'async': false, data: { customer-id: customer-id }, success: function (response) { // use something like me.getParent('td').fadeOut(); or something similar to remove the row } }); }); it would be a lot easier for the scope of the event if you added the data attributes you want to send to the anchor, then you can implement what i put there for you . hope it helps
  22. mysql parses from right to left. you did not he single quotes around your post variable so it broke the syntax
  23. try $query = "SELECT * FROM `car` WHERE `owner` = '{$_POST['owner']}' ";
  24. firstly, how is id 1 relating to anything? you need to look at how you are structuring your tables
  25. so, you want to reload the div and not the page, then you want to use ajax: have a google for "ajax simple chat tutorial"
×
×
  • 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.