I am having trouble getting this to work. I am getting "Parse error: syntax error, unexpected T_STRING in public_html/send.php on line 22. Line 22 is the mail statement I highlighted red.

If anyone can help me out I would be very grateful.

<?php

$to='dgordon1966@gmail.com';
$subject='Registration Confirmation';

$number=$_POST;
$name=$_POST;

$body= .$name. .$number.


mail ($to, $subject, $body);
echo 'Thanks for registering. See you soon!';
?>

$body= .$name. .$number.

should be

$body= $name.$number;

It looks like you are trying to put a space between the 2 variables so you need to use quote marks:

$body = $name.' '.$number
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.