Page 1 of 1

php Frommail

Posted: Mon May 17, 2004 1:52 pm
by after_shox
Is there a formmail for php that will just send me whatever text boxes are in the form by email so i dont have to specify them?

Posted: Mon May 17, 2004 2:42 pm
by lostboy
you could build a loop to cycle thru the elements and place them into an email body

Code: Select all

You just loop through it like any array:

foreach($_POST as $key=>#value){
  # use the key as variable name
  print $$key = $val;
}

Posted: Mon May 17, 2004 3:17 pm
by after_shox
i get

Code: Select all

`T_VARIABLE' or `'$'' in /home/douple/public_html/link/send2.php on line 5

Posted: Mon May 17, 2004 3:38 pm
by feyd
switch the # for $ in value