Here is my select query:
$username = $_GET['username'];
$stmt = $mysqli->prepare('SELECT email, phone, addressLine1, addressLine2, city, postcode FROM users WHERE username = ?');
$stmt->bind_param('s', $username);
$stmt->execute();
$stmt->bind_result($email, $phone, $addressLine1, $addressLine2, $city, $postcode);
$stmt->fetch();
printf('<p>Address Line 1:</p> <input type="text" name="AddressLine1" value=%s><br>', $addressLine1);
However, instead of $addressLine1 giving the result "A test address" it will only give "A"
I have been at this for a while but haven't worked it out yet.
They are stored as VARCHAR
s in my DB.
EDIT: This is where i use addressLine1
printf('<p>Address Line 1:</p> <input type="text" name="AddressLine1" value=%s><br>', $addressLine1);