Thank you! It does work, but I still don't understand how.
What does this accomplish?
<input onclick="CheckUncheck('any1');" name="any1" value="" type="checkbox" disabled="true" style="display:none;">
And why are you making 'any1' into an array?
:confused:
I have a search form that lets the user search for the specific features that he checks, or displays all products if the "Any" checkbox is checked. What I need Javascript to do is, to uncheck the "Any" checkbox, if the user checks any of features checkboxes. And also the other way around, if the...
I think I do have it.
- tblProduct has the list of all products.
- tblFeature has the list of all features.
- tblFeatureToProduct has the relationship of features to products. It lists all id_Feature's with corresponding id_Product's.
Either that's what you mean, or I'm not getting it.
Thank you!
Why do you use trim() and mysql_escape_string(), if the values are just numbers that are passed by POST?
(The manual for mysql_escape_string() says: "This function became deprecated, do not use this function. Instead, use mysql_real_escape_string().")
How would you restructure the tables? What's wrong with them now?
The join works fine. There are no errors, and the query does what it is told to do. I just didn't know how to tell it to do what I wanted it to do.
That was quite stupid of me. I used a function to print the checkboxes outside of the form.
Once I print them in the form, how do I access them for deletion?
$qryGetFeatures = "SELECT id_Feature, FeatureName FROM tblFeature";
$rsGetFeatures = mysql_query($qryGetFeatures);
if...
I am try to delete a DB record that is supposed to be passed by $_POST.
Here is my form:
<form method="post" action="<?=$_SERVER['SCRIPT_NAME'];?>" ><br />
<table>
<tr>
<td><input type="submit" name="btnDelete" id="btnDelete" value="Delete Checked"></td>
</tr>
<tr><td colspan="2"><hr...
I don't have a reason to suspect that the tables are not made properly, just the query - the WHERE ... IN part of it.
But I did start a thread in the MySQL forum, and your help is very welcome there.
http://tek-tips.com/viewthread.cfm?qid=1369304&page=1
The query is supposed to search for products that have ALL the specified features (1,2,3).
But what this query does is, search for products that have ANY of the specified features (1 or 2 or 3, for example). It will find all products that have feature 1 or feature 2 or feature 3, and it will...
...result that I want.
This query shows all the products that have any of the string features in them.
What I want is, to show the products that have *all* of the features listed in the string. I am making a search that people will use to search for products that they need. So if someone...
Thanks. That answers question 1.
But how would I write the WHERE clause?
Because I'm not looking for WHERE tblFeature.id_Feature IN ({$_GET['features']}), but rather WHERE ({$_GET['features']}) IN tblFeature.id_Feature
I need to build a query that will query tblProduct and return only products that have all the "features" that are passed through the querystring array ($_GET['features']).
For example, what obviously doesn't work is this:
$qryGetProducts = "SELECT id, category, company, model, title...
I tried this on my Windows machine and it works fine. The only thing I changed for the Linux was the upload directory path from:
$uploadDir = "C:\\xampp\\xampp\htdocs\upload\\";
to:
$uploadDir = "/home/w/i/wiroton.com/html/images/";
The error it gives is:
"Warning...
I don't think it's moving them at all. When I click on Submit, it just gives me the form again.
The file is about 18MB and it's on the same machine, so it can't take more than the 60 seconds.
Is it supposed to give an error message?
I restarted Apache, but it didn't help.
There is no LimitRequestBody directive in httpd.conf.
I see 3 php.ini files. I changed all 3, restarted Apache, and still nothing.
I changed it in php.ini to 25 MB, and it still doesn't work.
Do I need to restart sopmething? What else could it be?
; Maximum allowed size for uploaded files.
upload_max_filesize = 25M
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.