Hello NicolasMous.
We are on exactly the same boat or actually I am in the same boat you were 4 months ago. folowing your traces It seems that you found a problem on how to use participant database plugin and retrieve data using a search-box.
you explained it in details for anyone in your case but I still I some problem reproducing it. I am so close! and am working of this for 4 to 5 weeks 8 to 10 hours a day (I am 70 and retired so I can spend ALL my time on this 7 days a week. I learn wordpress that I like very much (now)
I need to finish ny website by the end of month and I was hoping you could me a bit. all help I asked from knowledgeable people only confused me more as they really think I know more than I really do, although I did big progress.
I needed to update our website:
that was REALLY primitive and needed a face lift.
here is my new one,(in construction) with a temporay sub-domain awaiting to be ready.
(click on the dog picture (left column) to see my search file.)
WHAT I AM TRYING TODO
I need visitors to find pet service providers within their own zipcode and performing one or several services. each of our 20 members (pet service provider) covers several zipcodes in Las Vegas and several specialities (so a multiple checkbox was needed.
I contacted xnau from participant database who told me his search and sort form would not work for this purpose (as he did to you) and told me that I needed to make my own search form and adapt it so, being a newbie, I created one using coffeecup web-form-builder (HTML) on my PC. This part was easy and fun, I created a beautiful form. Unfortunately this $300 software does not send results on a wepage (apparently)
after searching and searching I found a php code to replace the one generated by doffecup. it works !!!!
My problem: the search form with checkbox and a drop down menu works very well BUT it return ALL data instead of the selected one!
I am so close. I know that my code only mention
$result = mysql_query("SELECT * FROM wp_uvmj_participants_database", $db);
that return the full content of the database (only 3 participants so far to simplify)
I know I need to add:
WHERE ZIPCODE=$**** and WHERE specialties=$***
but I do not know how to adapt it. trying to modify it returns syntax error from mySQL5.5 and phpmyadmin 5.4
this is the php code I have that returns all members regardless of request for the search form:
<?php
$db = mysql_connect("localhost","database_user","paswword");
if (!$db) {
die("Database connection failed miserably: " . mysql_error());
}
$db_select = mysql_select_db("database name",$db);
if (!$db_select) {
die("Database selection also failed miserably: " . mysql_error());
}
?>
<html>
<head>
<title>members</title>
</head>
<body>
IN CONSTRUCTION. TRY OUT ONLY<br/>
please try later.than you
This is the results according to your selection
if you have any question please call us 702- 739-9591
or email me [email protected]
<div class="cssstyle">
<?php
<strong>$result = mysql_query("SELECT * FROM wp_uvmj_participants_database", $db);
if (!$result) {
die("Database query failed: " . mysql_error());
}</strong>
while ($row = mysql_fetch_array($result)) {
echo "<h2>";
echo $row[company]."";
echo "</h2>";
echo "<p>";
echo $row[first_name];
echo $row[specialty];
echo $row[sub_category];
echo $row[area];
echo $row[photo];
echo $row[bio];
echo "</p>";
}
?>
</div>
</body>
</html>
<?php
//Step5
mysql_close($db);
?>
I marked in strong the part I beleive need attention
our case is so similar , do you think you could help me?
in return, if you need a fancy form I can create one (or more) for you for free. Creating a form with this software returns a folder containing the HTML, PHP, SFW,XML, CSS,swobject.js, and upload it to the server (or can be uploaded manually). so I could send you a folder you could simply upload in your server. The only file that need to be replaced is the PHP file that only upload data into the database and send email.
NO SELECTED members on a web page
the HTML page can be seen with the URL path to the containing folder or can be inserted within a wordpress page using <iframe> that is what I did on this page
you can using the form to try, it does not affect anything, just returning a temporary list of members.