View Full Version : Help on Email form required

02-10-2011, 01:59 AM
Hi I picked up this script from another thread on the forum, can someone please help by editing it so it will send a browsed file from a field in the form as I dont have the skill to work it out. I see manyother optionson the BB but dont know how to incorporate into this script as it work sas is with the exception of the attached file i will also attach a view of the form. Thanks in advance.
Start of script
//--------------------------Set these paramaters--------------------------

// Subject of email sent to you.

$subject = 'New CV for RTB Consulting Ltd';
// Your email address. This is where the form information will be sent.

$emailadd = 'email address';

// Where to redirect after form is processed.

$url = './confirmation.html';

// Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.

$req = '1';

// --------------------------Do not edit below this line--------------------------

$text = "Results from form:\n\n";

$space = ' ';

$line = '


foreach ($_POST as $key => $value)


if ($req == '1')

if ($value == '')

{echo "$key is empty";die;}


$j = strlen($key);

if ($j >= 20)

{echo "Name of form element $key cannot be longer than 20 characters";die;}

$j = 20 - $j;

for ($i = 1; $i <= $j; $i++)

{$space .= ' ';}

$value = str_replace('\n', "$line", $value);

$conc = "{$key}:$space{$value}$line";

$text .= $conc;

$space = ' ';


mail($emailadd, $subject, $text, 'From: '.$emailadd.'');

echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';

End of script

form can be seen here http://rtbconsulting.co/Contracting@RTB.html

02-10-2011, 06:46 AM
resolved the problem with code in another thread many thanks