Page 1 of 1

need help

Posted: Fri Oct 01, 2010 10:25 pm
by minos_mks
i have a combo-box and his data it's from the database and it's working fine on the entry form but i have anther form to update this data and i need to retrieve the value of what the user save before and at the same time may be he will update this combo-box so

when the form open it should be loaded by the data that he save before and

when he click on the combo-box loaded with all the values (different table)

thanx

Re: need help

Posted: Sat Oct 02, 2010 6:52 pm
by JakeJ
Your explanation is a little confusing. Please post some code and then explain further.

Re: need help

Posted: Sat Oct 02, 2010 11:29 pm
by minos_mks
i have entry form to make the user enter a donation and in this form one combo-box for the type of this donation.and this combo-box get the data from table named (donation_type)

and i have a different form to makes the user update what he saved already and this form have also the same combo-box for the type but this time this combo-box get the data from table named ( user_donation ) where the data got saved when the user enter it in the first time


so i need when the user open the update form to update this record. the combo-box suppose to get the data from user_donation table (what he enter before and need to update )
and when he click on the combo-box get the data from donation_type ( all the types that he might need it to update what he enter)

thak you for your time

Re: need help

Posted: Sat Oct 02, 2010 11:51 pm
by JakeJ
Ok, but post the code you have and tell us where you think it's probably going wrong.

Re: need help

Posted: Sun Oct 03, 2010 12:48 am
by minos_mks
1- this the code for the combo-box on the entry form ( all the types )

<td bgcolor="#Ff6600">Donation Type</td>
<td><select name="doun_categ">
<?php
$categs=select_donation_categ(categs);
$categ = mysql_fetch_assoc($categs);
do {
?>
<option value="<?php echo $categ['donation_categ_code']?>"><?php echo $categ['donation_main_categ']?> - <?php echo $categ['donation_categ_name']?></option>
<?php
} while ($categ = mysql_fetch_assoc($categs));
// $categs = mysql_num_rows($categ);
if($categs2 > 0) {
mysql_data_seek($categ, 0);
//$row_Recordset1 = mysql_fetch_assoc($model);
}
?>
</select>
</td>


2- and for the other form ( for update the record i made on function to retrieve the record depend on the donation code and eventually will get the type included to the record )

echo"<td><select name=\"type\">";
$donation_types=select_donation_types(donation_types);
$donation_type = mysql_fetch_assoc($donation_types);
do
{
echo"<option value=\"{$donation_type['donation_type_code']}\"";
echo "{$donation_type['donation_type_name']}</option>";
}
while ($donation_type = mysql_fetch_assoc($donation_types));

Re: need help :banghead:

Posted: Mon Oct 04, 2010 6:30 pm
by minos_mks
Nobody Can help me.... :banghead: :banghead: :banghead: :banghead: :banghead:

Re: need help

Posted: Tue Oct 05, 2010 10:16 am
by internet-solution
Follow the forum guidelines, and you are more likely to get help.

Some main guides are -

# Write your question carefully, think about what you need to achieve and exactly what help you are looking for.
# Write a clear subject line, it'll help people deciding whether to look at your post or not - 'help, PHP noob' is probably going to be ignored by some.
# Don't just post - 'This doesn't work' - tell us exactly what doesn't work and make sure to include any error messages you're getting.
# Use the bbcode tags for code blocks - for PHP code use the tags to enclose it, for all other code use the tags - this will make it much easier for people to read your code (especially if you've taken the time to indent it properly).

Re: need help

Posted: Tue Oct 05, 2010 7:06 pm
by minos_mks
ok i will post it better than that , sorrey it's my bad