The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Want to Display output from a foreach in a template
Ok
Simple thing I have a Form that people can put membership numbers into, then a script will check in Mysql if they are or not Then print out Yes or No and expiry if Yes Works fine for single lookup but make it do more lookup ie 8 the output templete just shows last lookup in the list result. if you just print the out ot the screen all the 8 results are there Help Code:
foreach ( $_POST as $name => $value) { if ((stristr($name,'membership')) && ($value !=0 ) ) { // Check to See if Member $check_if_member=$db->query_first("SELECT MemberID, DateExpire FROM ~~~~~ WHERE MemberID = $value"); if ($check_if_member){ $membership_number=$value; $Expire_Date=$check_if_member['DateExpire']; } else { $membership_number=$value; $Expire_Date="" ; } print_r ($check_if_member) ; echo "<br /> $name, $value <br />" ; } eval('print_output("'. fetch_template('rsoc_member_check_output') . '");'); membership_number2, 1 membership_number3, 2 membership_number4, 3 membership_number5, 2 membership_number6, 34 Array ( [MemberID] => 14**** [DateExpire] => *******) membership_number8, 14**** What do i need to either do in the script or template to output the above ? * = protect data Giz |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|