need help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

need help

Post 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
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: need help

Post by JakeJ »

Your explanation is a little confusing. Please post some code and then explain further.
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

Re: need help

Post 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
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: need help

Post by JakeJ »

Ok, but post the code you have and tell us where you think it's probably going wrong.
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

Re: need help

Post 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));
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

Re: need help :banghead:

Post by minos_mks »

Nobody Can help me.... :banghead: :banghead: :banghead: :banghead: :banghead:
internet-solution
Forum Contributor
Posts: 220
Joined: Thu May 27, 2010 6:27 am
Location: UK

Re: need help

Post 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).
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

Re: need help

Post by minos_mks »

ok i will post it better than that , sorrey it's my bad
Post Reply