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'];

Recommended Answers

All 5 Replies

Member Avatar for diafol

string?

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 for diafol

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.