Jump to content

Help Required


killah

Recommended Posts

Yes i have been requesting alot of help lately. But i have never done anything like this.

 

I have this script:

 

$soc_houses = mysql_query("SELECT hNAME,hID FROM `houses` WHERE `hID` IN(".$house.")");
while($soc = mysql_fetch_assoc($soc_houses))
{
echo $soc['hNAME'].' => Price: <input type="text" name="price[]"> | Will: <input type="text" name="will[]"> | UpKeep: <input type="text" name="keep"><br>';
}

 

What i am trying to do is set a different price + will + upkeep per house. It's for a RPG Game. And how would i go about displaying it and inserting it into a different database table?

Link to comment
https://forums.phpfreaks.com/topic/143566-help-required/
Share on other sites

Step one:

 

# You add a upgrade name, purchase type, upgrade image, type of upgrade and select the houses the upgrade is purchasable for

 

Step two:

 

# You have the upgrade name, purchase type, upgrade image, type of upgrade, selected houses. Now you want to set a different price, will and upkeep per house selected.

 

Step three:

 

# You insert the row's in the table with the price, will, upkeep per house inputed along with the upgrade name, purchase type, upgrade image, type of upgrade and the selected houses

 

 

My problem is with step two and step three.

 

Step two does not work and i can not asign it to step three.

 

What i am trying to do is explained above. But i will explain in better bellow:

 

 

I have my first page (step one) where i input upgrade name, purchase type, upgrade type and a checkbox to select multiple houses the upgrades can be purchased for. Then on hittin "Next" button it give's me my second page (step two). In step two i have a while function bringing the selected houses with input's next to them for the will, upkeep, and price. How ever when clicking on the submit taking me to page three (step three). I can not get it there. Because it is going like:

 

1,2,3,4,5,6,7

 

While the house id's are like

 

1,5,6,7,8,9,10

 

 

What i want to do is make it so the input's on second page follows the house ID like so

 

Houses: 1,5,6,7,8,9,10

Inputs:  1,5,6,7,8,9,10

 

 

Any more info i can explain :)

Link to comment
https://forums.phpfreaks.com/topic/143566-help-required/#findComment-753931
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.