One temporary soulution would be in Habbo theme to change name of all variables in the forth part,
ec in furni number 2 change all
$ltd_id = $2ltd_id
$ltd_name = $2ltd_name
$image_url = $2image_url
$selectfromltd = $2selectfromltd
ec ec
Printable View
Very messy omg!
Please big hotels with 100+ online tell me if you use this plzplz!! :love:
Replace the code in the buyltd.php page with this :
That will fix the problem.Code:<?php
$ltd_id = preg_replace('/[^0-9]/', '', $_POST["ltd_id"]);
$user_id = $_SESSION['user']['id'];
$selectfromusers = mysql_query("SELECT * FROM users WHERE id = '".$user_id."'") or die(mysql_error());
$getmoney = mysql_fetch_array($selectfromusers);
$money_current = $getmoney['credits'];
$selectfromfurninum = mysql_query("SELECT * FROM rev_ltd WHERE furni_id = '".$ltd_id."'") or die(mysql_error());
$getfurninum = mysql_fetch_array($selectfromfurninum);
$furnileft = $getfurninum['furni_left'];
$furnisold = $getfurninum['furni_sold'];
$ltd_price = $getfurninum['furni_price'];
if($furnileft > '0')
{
if($money_current < $ltd_price)
{
echo "You don't have enough money for this item";
}
else
{
$newmoney = $money_current - $ltd_price;
mysql_query("UPDATE users SET credits='".$newmoney."' WHERE id='".$user_id."'") or die(mysql_error());
$newfurnileft = $furnileft - '1';
$newfurnisold = $furnisold + '1';
mysql_query("UPDATE rev_ltd SET furni_sold='".$newfurnisold."' WHERE furni_id = '".$ltd_id."'") or die(mysql_error());
mysql_query("UPDATE rev_ltd SET furni_left='".$newfurnileft."' WHERE furni_id = '".$ltd_id."'") or die(mysql_error());
$highestid = mysql_query("SELECT * from items ORDER BY id DESC LIMIT 1") or die(mysql_error());
$checknewid2 = mysql_fetch_array($highestid);
$newid2 = $checknewid2['id'];
$newid = $newid2 + '1';
mysql_query("INSERT INTO items (id, user_id, room_id, base_item, extra_data, x, y, z, rot, wall_pos) VALUES ('".$newid."','".$user_id."',0,'".$ltd_id."',0,0,0,0,0,0)") or die(mysql_error());
echo "Item bough successfully!";
}
}
else
{
echo "All of furniture is already sold, sorry";
}
?>
<meta http-equiv="refresh" content="1; URL=me">
now a new problem really bad that you cant even use this it buys the item but makes phoenix have the duplication error so you gotta work on that the most.
Hello, i followed corectly everything but, when i press "Buy" and after it goes to buyltd.php page, i get this ERROR (See Below). How can i fix it ?
ERROR:
Code:Unknown column 'id' in 'order clause'