Passing Strings from HTML to PHP

the mail() function

Moderators: egami, macek, gesf

Post Reply
quarinteen
New php-forum User
New php-forum User
Posts: 2
Joined: Sat Feb 18, 2017 10:07 pm

Mon Mar 13, 2017 10:58 am

Hello have what is probably a basic question. Cant seem to get strings to pass from a HTML form to a PHP script. Below is just a snipe

HTML Item
<input id="name" type="text" name="name" placeholder="Your Full Name" />

passes to separate form
$Name = Trim(stripslashes($_POST['name']));

then it is put in the body of an email and sent
$Body = "";
$Body .= "Name: ";
$Body .= $Name;

When it comes to my email all thats there is Name: then the string is missing. Any help would be appreciated. Thank you.

hyper
php-forum Active User
php-forum Active User
Posts: 294
Joined: Mon Feb 22, 2016 5:52 pm

Wed Mar 15, 2017 11:34 am

Do you have a full form, or just the input field?

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests