-
Posts
840 -
Joined
-
Last visited
-
Days Won
1
Everything posted by gristoi
-
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
-
mysql_query returns a resource, you need to loop through that resource to get the data back.
-
action="inde x1.php" to action="index1.php"
- 10 replies
-
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
-
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 )
- 3 replies
-
- return true
- return false
-
(and 2 more)
Tagged with:
-
cant get php5.5 update to work
gristoi replied to quanton's topic in PHP Installation and Configuration
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 -
$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";
-
$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
-
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
-
$lession = array("AA,BB,CC"); should be $lession = array("AA","BB","CC");
-
require_once (__DIR__.'/../login/incDB.php');
-
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.....}
-
if you're using mysql then use the tool design by the people who made it: http://www.mysql.com/products/workbench/
-
http://docs.php.net/manual/en/language.types.array.php
-
chances are $imgs is not an array
-
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?
-
php chat system ,i can't reload the div ,can anyone help me :(?
gristoi replied to lulululululu's topic in Javascript Help
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 -
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
-
mysql parses from right to left. you did not he single quotes around your post variable so it broke the syntax
-
try $query = "SELECT * FROM `car` WHERE `owner` = '{$_POST['owner']}' ";
-
Select value from table and use it as another value from same table.
gristoi replied to gabael's topic in MySQL Help
firstly, how is id 1 relating to anything? you need to look at how you are structuring your tables -
php chat system ,i can't reload the div ,can anyone help me :(?
gristoi replied to lulululululu's topic in Javascript Help
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"