php forum
php mysql forum
php mysql smarty
 
Topic Options
#103767 - 06/11/02 01:16 PM not saving/returning form data - PLEASE help!
Eris Offline
Junior Member

Registered: 04/23/01
Posts: 30
Loc: KCMO
I'm having a couple of problems. The first is that I want a multiple-option select on the registration page (and on the edit profile page, of course). I want a user to be able to choose one or more of the options in the select, and I want the UBB to take the selected values and poop out a 16x16 graphic for each. Here is what the select currently looks like:

--------------------------
in public_register_page.pl
--------------------------

<select name="customfield1" multiple size="11">
<option value=1:>not a synesthete
<option value=11:>not sure / not sure what other type(s)
<option value=2:>written symbols evoke synesthesia
<option value=3:>sound evokes synesthesia
<option value=4:>taste evokes synesthesia
<option value=5:>time evokes synesthesia
<option value=6:>sight evokes synesthesia
<option value=7:>smell evokes synesthesia
<option value=8:>touch evokes synesthesia
<option value=9:>temperature evokes synesthesia
<option value=10:>pain evokes synesthesia
</select>

-----------------------
in public_topic_page.pl
-----------------------

after:

$rating_line
~;

I put in:

@syntype = openparencloseparen;
$syntypelen = pushopenparen@syntype, $user_profile[16]closeparen;
$syntype = $user_profile[16];
@syntype = splitopenparen/:/, $user_profile[16]closeparen;
$syntypelen = scalaropenparen@syntypecloseparen;
$synloop = 0;
while openparen$synloop <= $syntypelencloseparen
{
$syntype[$synloop] = scalaropenparen$syntype[$synloop]closeparen;
if openparen$user_profile[16] =~ m/1/g closeparen {
# $syntype = qqopenparencloseparen;
}
if openparen$user_profile[16] =~ m/2/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/symb.gif" alt="symbols evoke synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/3/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/sound.gif" alt="sound evokes synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/4/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/taste.gif" alt="taste evokes synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/5/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/time.gif" alt="time evokes synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/6/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/sight.gif" alt="sight evokes synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/7/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/smell.gif" alt="smell evokes synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/8/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/touch.gif" alt="touch evokes synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/9/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/temp.gif" alt="temp evokes synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/10/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/pain.gif" alt="pain evokes synesthesia" width="16" height="16" border="0">closeparen;
}
if openparen$user_profile[16] =~ m/11/g closeparen {
$syntype = qqopenparen<img src="$vars_config{NonCGIURL}/types/other.gif" alt="not sure about syn type" width="16" height="16" border="0">closeparen;
}
$synloop++;
}
and then I put in a:

$row .= qq~

to go back to the rest of the form

---

Now, I can get it to return the first value chosen, but nothing else. (It looks like it's ignoring everything else.) I want it to return ALL the values chosen and poop out a graphic for each.

My SECOND problem is that the form acts as though it's not saving the values. So if I'm editing my profile with this select, and I press "update profile" or whatever it is, and then go back and reload the update profile page, it "unselects" everything I had chosen/saved. Is it not saving the data, not passing the data on, what? ::sighs:: I think I need an array of some sort for it to catch the data in the first place, but I have no idea how to do it / do it and make it work.

(Just FYI, in case it matters: I have eight extra custom fields, the avatar hack, yadda yadda yadda, and everything is just peachy except for when I try to make something into a multiple select.)

Also... Do I need to change anything in any other file (such as the ""customfield1" => 80," in ubb_registration.cgi)? As you can tell, I'm pretty lost at this point.

Thanks for any help!!! =/
_________________________
"If you think it's perfect, I'll fix it." - me

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks