I'm Editing little PHP and SQL script
so if the code in the db is

`crystals` int(11) NOT NULL default '0',

and in the php script is

$_POST['crystals']=(int) $_POST['crystals'];

and other code in db is

`class` enum('Knight','Archer') NOT NULL default 'Knight',

What the php script will be (in the place of (int) what i will type) ?

$_POST['class']= (int) $_POST['class'];
Member Avatar


Why you want type casting?
I mean if want to insert posted data in database you can directly insert it without casting.

yea the string worked but i found that it dont need casting:D so u both right thanks :)

vibhadevit may u Pm me please? i need ur help.

Member Avatar

OK, is this solved? If so, click the link below.

PS. I wouldn't post an email address here mate, ask a mod to edit it.

Mark thread solved.