I am saving records like below in my MySQL database:
Name: Hello World Age: 17
Ref. by: Lorem Ipusm Sample: Blood
www.domainname.com
Investigations Results Units N.Ranges
Haemoglobin 14.5 Gms%. {13-18}
you might have got an idea ,i am doing the following:
$data = mysqli_real_escape_string($dbc, nl2br($_POST['data']));
$sql = "INSERT INTO data (Data) VALUES ('$data')";
$exec = mysqli_query($dbc, $sql);
But when I am displaying the output, it removes all the extra whitespaces and shows output like:
Name: Hello World Age: 17
Ref by.: Lorem Ipsum Sample: Blood
www.domainname.com
Investigation Results Units N.Ranges
Haemoglobin 14.5 Gms%. {13-18}
All the alignment is messed up, any way to make what I want work? Thanks in advance.
<pre></pre>tags.