Comments (9)
This function located in includes/sql.php
/--------------------------------------------------------------/
/* Function for Finding all product name
/* Request coming from ajax.php for auto suggest
/--------------------------------------------------------------/
function find_product_by_title($product_name){
global $db;
$p_name = remove_junk($db->escape($product_name));
$sql = "SELECT name FROM products WHERE name like '%$p_name%' LIMIT 5";
$result = find_by_sql($sql);
return $result;
}
from warehouse-inventory-system.
Hi bro thank for your atenttion , I understant the fuction of the method
called " find_product_by_title" but my dude is about how the file
add_sale.php sends the parameter $_POST['product_name'] to ajax.php int
the next form the parameter "product_name" doesn't exist. but this form
send ti ajax.php this parameter. I will put in red.
id="sug-form">*
-
<div class="form-group">*
-
<div class="input-group">*
-
<span class="input-group-btn">*
-
<button type="submit" class="btn
btn-primary">Buscar*
-
</span>*
-
<input type="text" id="sug_input" class="form-control"
name="title" placeholder="Buscar por nombre de producto">*
-
</div>*
-
<div id="result" class="list-group"></div>*
-
</div>*
- *
- *
<?php
-
// Auto suggetion*
-
$html = '';*
-
if(isset($_POST['product_name']) && strlen($_POST['product_name']))*
-
{*
-
$products = find_product_by_title($_POST['product_name']);*
-
if($products){*
-
foreach ($products as $product):*
-
$html .= "<li class=\"list-group-item\">";*
-
$html .= $product['name'];*
-
$html .= "</li>";*
-
endforeach;*
-
} else {*
-
$html .= '<li onClick=\"fill(\''.addslashes().'\')\"
class="list-group-item">';*
-
$html .= 'No encontrado';*
-
$html .= "</li>";*
-
}*
Help me please,
Thank.
2016-06-07 15:36 GMT-05:00 Siamon Hasan [email protected]:
This function located in includes/sql.php
/--------------------------------------------------------------/
/* Function for Finding all product name
/* Request coming from ajax.php for auto suggest
/--------------------------------------------------------------/
function find_product_by_title($product_name){
global $db;
$p_name = remove_junk($db->escape($product_name));
$sql = "SELECT name FROM products WHERE name like '%$p_name%' LIMIT 5";
$result = find_by_sql($sql);
return $result;
}—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEuDtawzTLV46VNzMHmvhfUiDHR5gVzJks5qJdZLgaJpZM4IwJ2n
.
from warehouse-inventory-system.
i'm retrieving data by jQuery, check out function.js file.
from warehouse-inventory-system.
Ok I understand, Thanks very much =)
2016-06-07 21:11 GMT-05:00 Siamon Hasan [email protected]:
i'm retrieving data by jQuery, check out function.js file.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEuDtQjvxH84qwTEbAJvPXld2UaboEIJks5qJiS5gaJpZM4IwJ2n
.
from warehouse-inventory-system.
No problem!
from warehouse-inventory-system.
Hi , the really I staying many hours in this example because I need to
present this in my school this last week and please I need your help onlly
in this part becase I start to develop recently and I dont know javascript
in hight level.I need the next image in your source code.
[image: Imágenes integradas 1]
please help me only with this..
Thank you for your attention
Really thank you very much.
2016-06-07 23:12 GMT-05:00 Siamon Hasan [email protected]:
No problem!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEuDtUTbFf9l4VEW3u2vvrLeE-NjEAZsks5qJkFCgaJpZM4IwJ2n
.
from warehouse-inventory-system.
Can you help me bro?..I need know if you can help me.
Thanks
2016-06-08 0:41 GMT-05:00 jeanfranco gutierrez <
[email protected]>:
Hi , the really I staying many hours in this example because I need to
present this in my school this last week and please I need your help onlly
in this part becase I start to develop recently and I dont know javascript
in hight level.I need the next image in your source code.[image: Imágenes integradas 1]
please help me only with this..
Thank you for your attention
Really thank you very much.
2016-06-07 23:12 GMT-05:00 Siamon Hasan [email protected]:
No problem!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEuDtUTbFf9l4VEW3u2vvrLeE-NjEAZsks5qJkFCgaJpZM4IwJ2n
.
from warehouse-inventory-system.
you mean this code
`function suggetion() {
$('#sug_input').keyup(function(e) {
var formData = {
'product_name' : $('input[name=title]').val()
};
if(formData['product_name'].length >= 1){
// process the form
$.ajax({
type : 'POST',
url : 'ajax.php',
data : formData,
dataType : 'son',
encode : true
})
.done(function(data) {
//console.log(data);
$('#result').html(data).fadeIn();
$('#result li').click(function() {
$('#sug_input').val($(this).text());
$('#result').fadeOut(500);
});
$("#sug_input").blur(function(){
$("#result").fadeOut(500);
});
});
} else {
$("#result").hide();
};
e.preventDefault();
});
}`
from warehouse-inventory-system.
Closet en tu culo
2016-10-13 12:48 GMT-05:00 Siamon Hasan [email protected]:
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEuDtYJ14Q_vSLJcRjCNdms8zJcAv0nbks5qzm78gaJpZM4IwJ2n
.
from warehouse-inventory-system.
Related Issues (20)
- Changing datetime HOT 2
- how change the timezone of the system? HOT 2
- Not Show Icon
- Error on this Query : SHOW TABLES FROM uw-inventario LIKE "users" HOT 1
- Changing the sale value HOT 1
- set up everything and error happens after login HOT 1
- Doesn`t load the index page HOT 3
- am not able to make changes to the index page background or anything in style sheet HOT 2
- Session Start issue HOT 1
- Error on this query HOT 1
- Looking for support? Improvements?
- [Error] - I can sell more than I have in stock HOT 1
- me da un error en upload
- Installation HOT 1
- Error en daily and monthly
- CSRF Change Admin Password
- load barcode
- Can't start session after log in
- Hello developers, can you add a version number?
- Parssing error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from warehouse-inventory-system.