$_POST['amount'] = abs((int) $_POST['amount']);
Check the type first, don't assume it is a string
$_POST['amount'] = abs((int) $_POST['amount']);
Why are you doing this again?
if (!preg_match("/^[-_a-zA-Z0-9]+$/", $_POST['amount'])){
I imagine that you really only want digits. BTW `-` if used in a character class should be at the end
if (!preg_match("/^[-_a-zA-Z0-9]+$/", $_POST['price'])){
Again, why are you permitting characters?
if($_POST['amount'] >= 1 && $_POST['amount'] <= $user_class->points && $_POST['price'] >= 1){
Use braces, or split into multiple lines for legability
$result= mysql_query("INSERT INTO `pointsmarket` (owner, amount, price )"."VALUES ('$user_class->id', '$_POST[amount]', '$_POST[price]')");
Check the result, don't ignore it
$result = mysql_query("UPDATE `grpgusers` SET `points` = '".$newpoints."' WHERE `id`='".$user_class->id."'");
Again, check the result
$user_class = new User($_SESSION['id']);
Say what now?
$result = mysql_query("SELECT * FROM `pointsmarket` WHERE `id`='".$_POST['points_id']."'");
Zing, injection point
I gave up after this. More holes than a Glaswegian slapper's stockings after a hard Saturday night on the town.