Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.
1 to 8 of 8
Matt,
I'm assuming this code goes in the php processing form. If so, how do i write the output "echo" for the client to see what their submission was. I just tried putting in this line of code and when i ran it it generated "0000" for the number.
And finally, in a database do I need 3 seperate spots for this or just one long enough for the entire number.
$phone = intval($_POST['phone1']) . intval($_POST['phone2']) . intval($_POST['phone3']); (Is this still correct if this is how I have my code set. I took the "parts" out
echo "
Phone: $phone1. $phone2, $phone3
$phone = "$_POST[phone]";
$phone = implode('',$_POST['phone']);
<input type="text" name="phone[]" value="asdasd" />
Array ( [phone] => Array ( [0] => asdasd ))
<input type="text" name="phone[areacode]" value="415" />
<input type="text" name="phone[prefix]" value="838" />
<input type="text" name="phone[suffix]" value="1212" />
Array ( [phone] => Array ( [areacode] => 415 [prefix] => 838 [suffix] => 1212 ))
echo $_POST['phone']['areacode'];
// results in: 415
echo implode('',$_POST['phone']);
// results in: 5188381212
1 to 8 of 8