I have set up my sample database up so prices can be entered into the form and then displayed from the database. For some reason its not displaying the decimal point.
I am using english £
when I type 56.32 in to the form, the database outputs it as 56.
When I set up the database I used the following to set up my field
price int(255)Not Null,
What statement do I use for decimal points. Is it long integer by any chance. If it is how do write it into the following code.
<?
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="CREATE TABLE test (id int(6) NOT NULL auto_increment,price int(255) NOT NULL,PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))";
mysql_query($query);
mysql_close();
echo "Database test has been created";
?>