Forum Replies Created
-
Hey @mercime! Well,
I’ve been told and yes I was mistaking, but on members page I have the search form to search members, but no result from this one, not by first/last name and not by username.
Anyway, I had to do some coding and wrote that small function:
———-
<?php
$term = $_POST[“fname”].’ ‘.$_POST[“lname”];
header(‘http://www.allthatsheneeds.com/members/?s=$term.’#’);
?>
———-
I found out that buddypress search uses s, letters and member_search as parameters, and send them to this url above, so why not to just send them via my form 🙂
Problem:
‘s’ represent first name but that’s it, I can’t pass any other param except this one.. (they all been ignored ) do you have any idea how to pass also my ‘lname; value? to which param should I send it?Thank you so much!
I am sorry,
change the input names to match the $POST[] values.
example: <input name=”fname” />
so: $POST[‘lname’]
and for fname too..btw, to whom it might help:
this is the full code, inserted in my header (or the place you want to display your search form):
———
<form action=”http://www.allthatsheneeds.com/allthatsheneeds_custom_search.php” method=”POST” id=”” class=”standard-form”>
<div class=”editfield field_1 field_first-name”>
<input type=”hidden” name=”label_1″ value=”First Name” />
<input type=”text” name=”field_1″ id=”field_1″ value=”” />
</div>
<div class=”editfield field_2 field_last-name alt”>
<input type=”hidden” name=”label_2″ value=”Last Name” />
<input type=”text” name=”field_2″ id=”field_2″ value=”” />
</div>
<div class=”editfield field_36 field_location”>
<input type=”hidden” name=”label_36″ value=”Location” />
<input type=”text” name=”field_36″ id=”field_36″ value=”” />
</div>
<div class=”submit”>
<input type=”submit” value=”Go” />
</div>
</form>
———
And, I created the file: allthatsheneeds_custom_search.php
and inserted this:
——-
<?php
$term = $_POST[“fname”].’ ‘.$_POST[“lname”];
header(‘http://www.allthatsheneeds.com/members/?s=$term.’#’);
?>
——-Good luck friends.
Hey mercime! Well,
I’ve been told and yes I was mistaking, but on members page I have the search form to search members, but no result from this one, not by first/last name and not by username.
Anyway, I had to do some coding and wrote that small function:
———-
<?php
$term = $_POST[“fname”].’ ‘.$_POST[“lname”];
header(‘http://www.allthatsheneeds.com/members/?s=$term.’#’);
?>
———-
I found out that buddypress search uses s, letters and member_search as parameters, and send them to this url above, so why not to just send them via my form 🙂
Problem:
‘s’ represent first name but that’s it, I can’t pass any other param except this one.. (they all been ignored ) do you have any idea how to pass also my ‘lname; value? to which param should I send it?Thank you so much!