Answer the question
In order to leave comments, you need to log in
PHP processing html form or compiling a complex request?
Finally, I got my hands on an old project... of course, after the last months of studying MVC, OOP looked at that code with a smile, but it turns out that even then I could do something...
Now I'm trying to get away from Jquery as much as possible .. And now what I encountered...
Is it possible to find out the type of the form field using PHP tools? That is, somehow define text, checkbox or select?
What additional attributes can be inserted to eat PHP? a la data... It is necessary in some places to transfer more than just value ..
Or does it all need to be hammered into the database?
And in order not to produce questions, to consult ...
Here I am creating a large automated query - ... WHERE 1=1 and a bunch of AND.
AND for now! I form it like this..
$sql="";
foreach ($_POST as $key => $criteria) {
$sql="AND $key".$criteria['select']['min'].$criteria['min']." AND $key".$criteria['select']['max'].$criteria['max'];
}
... WHERE 1=1 AND po>=100 AND po<1000
SELECT * FROM geo_base as a INNER JOIN geo_data as b ON a.id=b.id WHERE...
AND a.po или b.population..
Answer the question
In order to leave comments, you need to log in
Is it possible using PHP to find out the type of a form field? That is, somehow define text, checkbox or select?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question