n1ckyb0y Posted January 3, 2007 Share Posted January 3, 2007 HiGot this code to write form fields and values into an email, but I need to capitalize the values! Can anyone help.Here are the initial variables:[color=red]$incoming_fields = array_keys($HTTP_POST_VARS);$incoming_values = array_values($HTTP_POST_VARS);[/color]Here is the load contents bit: [color=red]for ($i = 0; $i < count($incoming_fields); $i++) { if($incoming_fields[$i] != "rec_mailto") {if($incoming_fields[$i] != "rec_subject") {if($incoming_fields[$i] != "rec_thanks") {if($incoming_fields[$i] != "opt_mailto_cc") {if($incoming_fields[$i] != "opt_mailto_bcc") {$message .= "$incoming_fields[$i]:$incoming_values\n";}}}}}}[/color]Thanks from a newby. Link to comment https://forums.phpfreaks.com/topic/32680-using-the-strtoupper/ Share on other sites More sharing options...
matto Posted January 3, 2007 Share Posted January 3, 2007 first of all you should really be using $_POST rather than the old $HTTP_POST_VARSif you would like to capitalize a string then:[code]<?php$upper_string = strtoupper($_POST['var_name']);?>[/code] Link to comment https://forums.phpfreaks.com/topic/32680-using-the-strtoupper/#findComment-152075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.