I'm having an issue with inputting data stored in a PHP variable into a HTML form, using the value property in the tag. The problem seems to be that strings are being cut around spaces, where only the first part of the string before the space making it to the form. Strings without spaces appear with a forward slash at the end.

The idea for the form is that a customer could edit the details store about them on a MySQL database, and then changing the values with an update statement. So it's really important that the values appear as they are stored in the PHP variables.

Example:

![http://i.imgur.com/pvfYApy.png](https://i.stack.imgur.com/wttwW.png)

```
<?php
//session start//
session_start();

//Connect to the server and database//
$con=mysqli_connect("127.0.0.1","root","","mia");

//Generate the sql statement for retrieval of customer details//
$customerdetails="SELECT Name, BusinessName, Address, Postcode, TelNo, Email
                  FROM customer
                  WHERE CustomerID = " . $_SESSION['CustomerID'] . "";

//execute the 'Customer details retrieve' sql statement//
$result= mysqli_query($con, $customerdetails);

while ($row = mysqli_fetch_array($result))
    {
        $Name='' . $row['Name'] . '';
        $BusinessName=$row['BusinessName'];
        $Addresss=$row['Address'];
        $Postcode=$row['Postcode'];
        $TelNo=$row['TelNo'];
        $Email=$row['Email'];
    }

//Write the web page//
echo "<!Doctype html>
<html>
<head>
<title>
    Edit Details
</title>
</head>

<body>
<h1>Edit Details</h1>
<p>Please change values below where apropriate</p>
<form name='input'
          action='../php/update_customer.php'
          method='post'>
        Name:           <input type='string'
                               name='Name' value=" . $Name ."/> </br>
        Business Name:  <input type='text'
                               name='BusinessName' value=" . $BusinessName ."/> </br>
        Address:        <input type='text'
                               name='Address' value=" . $Addresss ."/> </br>                       
        Post Code:      <input type='text'
                               name='Postcode' value=" . $Postcode ."/> </br>
        Telephone No:   <input type='text'
                               name='TelNo' value=" . $TelNo ."/> </br>
        Email Address:  <input type='text'
                               name='Email' value=" . $Email ."/> </br>
        <input type='submit'   value='Update'/>
    </form>

<p>" . $Name . "</p>
<p>" . $_SESSION['CustomerID'] . "</p>
</body>
</html>";

?>

```