I tried that one already and just tried it again... Same result.
Here's my mission:
I have a database on the same server as CMSMS. I'm trying to show the data as results to a search (form)
I've gone back and re created the form (not using Formbrowser currently, not sure exactly what it's for).
Here's the latest setup & issue(s):
Link to form: http://staging.aomam.org/index.php?page ... actitioner
Form name: Business Search
Alias: bus-search
Input field name: busname
I also have a field named "bus_search_handle" with field type "Store results in database" (do I need this?)
I have added a user-defined tag to process the form.
Name: bussearch_handle
CODE:
//query for business name listing
$busname = $HTTP_POST_VARS["m5_11"];
$sql = "SELECT * FROM `members` WHERE `bus_name` LIKE '$busname%' ORDER BY bus_name";
//uncomment to see errors
//echo $sql ."";
$results = mysql_query($sql)
or die(mysql_error("Your search could not be performed at this time."));
$rowcount = 0;
while ($row = mysql_fetch_array($results)) {
$rowcount++;
extract($row);
$bus = false;
if (! empty($last_name)){
$bus = true;
echo "";
echo $last_name;
echo ", ";
}
if (! empty($first_name)){
$bus = true;
echo $first_name;
echo " - ";
}
if (! empty($credentials)){
$bus = true;
echo $credentials;
}
if (! empty($bus_name)){
$bus = true;
echo "";
echo "";
echo $bus_name;
echo "";
}
if (! empty($interest)) {
$bus = true;
echo "";
echo "Area of Interest: ";
echo $interest;
}
if (! empty($bus_add)){
$bus = true;
echo "";
echo $bus_add;
}
if (! empty($bus_city)){
$bus = true;
echo "";
echo $bus_city;
echo ", ";
}
if (! empty($bus_state)){
$bus = true;
echo $bus_state;
echo " ";
}
if (! empty($bus_zip)){
$bus = true;
echo $bus_zip;
}
if (! empty($bus_phone)){
$bus = true;
echo "";
echo "Phone: " . $bus_phone;
}
if (! empty($spl_phone)){
$bus = true;
echo "";
echo "Phone 2: " . $spl_phone;
}
if (! empty($bus_fax)){
$bus = true;
echo "";
echo "Fax: " . $bus_fax;
}
if (! empty($bus_cell)) {
$bus = true;
echo "";
echo "Cell: " . $bus_cell;
}
if ($bus == true) {
echo "";
}
$bus2 = false;
if (! empty($bus_name2)) {
$bus2 = true;
echo "";
echo "";
echo $bus_name2;
echo "";
}
if (! empty($bus_add2)) {
$bus2 = true;
echo "";
echo $bus_add2;
}
if (! empty($bus_city2)) {
$bus2 = true;
echo "";
echo $bus_city2;
echo ", ";
}
if (! empty($bus_state2)) {
$bus2 = true;
echo $bus_state2;
echo " ";
}
if (! empty($bus_zip2)) {
$bus2 = true;
echo $bus_zip2;
}
if (! empty($bus_phone2)){
$bus2 = true;
echo "";
echo "Phone: " . $bus_phone2;
}
if (! empty($bus_fax2)){
$bus2 = true;
echo "";
echo "Fax: " . $bus_fax2;
}
if ($bus2 == true) {
echo "";
}
if (! empty($email)){
echo "";
echo "Email: " . '' . $email . "";
}
if (! empty($url)) {
echo "";
echo "URL: " . '' . $url . "";
}
echo "";
}
if ($rowcount == 0) {
echo "";
echo "There are no listings for the letter $letter.";
echo "";
}
echo "";
echo "";
****END CODE****
I also have a page to display the results.
Page name: Business Name Search Results
Alias: search4
Active: yes
Show in menu: no
cachable: no
CODE:
{bussearch_handle}
****END CODE****
Is this even possible or is there a better way?
Thanks,
Rich