Hello,
I’m completely new to PHP. I’ve created a form which uses can succesfully submit. The data is stored into a MYSQL database.
I’ve created another form to display stored data. This is the code:
<?
$db_server= ‘localhost’;
$database= ‘xxxx’;
$db_user = ‘xxxx’;
$db_passwd = ‘xxxx’;
$db = mysql_connect($db_server,$db_user,$db_passwd) or die(“error :: could not connect to $host MySql Error:”.mysql_error());
$db=mysql_select_db($database) or die(“error :: could not connect to database. MySql Error:”.mysql_error());
$ID=$_GET[“ID”];
$query=”SELECT * FROM HR_applications WHERE ID=$ID”;
$result = mysql_query($query) or die(mysql_error());
$entry = mysql_fetch_object($result);
mysql_free_result($result);
echo “$entry->name”;
echo “$entry->body”;
mysql_close();
?>
This works fine aslong as i set the datatype to varchar(255) in the database. However i want to use the datatype ‘Text’ so i can use larger pieces of text. If i change the data type from varchar to text, create a new record and display it, the body shows empty. When i look into phpmyadmin i can see the actual data.
My question, how do i show data of the type ‘text’?
ty?