0

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'];
3
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by vibhaJ
0

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

0

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.

Edited by Ezzaral: Snipped email. Keep it on the forums.

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.