Jump to content

Okay, I've done my best, I am truly stuck now.


Monkuar

Recommended Posts

Okay, I have a P value field in my Database ROW.  It contains 0,1,2

 

0 is my About Me,

 

1 is my Signature Section

 

2 is my Friends section:

 

Check this screenshot:

 

17795094.png

46643450.png

 

Now you see that little green arrow? When you click on it, I have the code for it here:

 

if (isset($ibforums->input['down'])){
		if ($ibforums->input['down'] == "0"){
$new = '1,0,2';
}			
$DB->query("UPDATE ibf_members set p='$new'  WHERE id={$ibforums->member['id']}");
header("Location: ?i={$ibforums->input['i']}");
}

 

As you can see, it updates it 1,0,2.  (Default is 0,1,2) for variable $p.

 

Here is my code.

 

$p = explode(",", $member['p']);
$middle=array ( "0"  => array ( "section" => $aboutme,
                                       "b" => "banana",
                                       "c" => "apple"
                                     ),
                  "1" => array ("section" => $signature,
                                       "b" => "banana",
                                       "c" => "apple"
                                     ),


                  "2"   => array ("section" => $f,
                                       "b" => "banana",
                                       "c" => "apple"
                                     ),
                );

$order = $p;
print_r($middle);
foreach ($order as $index)
{
  $middlesection.= $middle[$index]['section'];
}

 

I echo out my $middlesection variable in my profile page, that's the screenshot that you see.  My problem is, How can I check the input's when they click the green arrow button to know "not to go down anymore", I will be adding a up Arrow icon next to it... (I am very lost and little bit confused on how to check the input to make it all work)

 

see like right now, on that screenshot it is:

1,0,2  (Signature,Aboutme,Friends)

 

but if I click on that arrow again, how do I Dynamically make the 0 make sure it is the last one? but then see if I have to switch the 0 to 1,2,0 how would I check input on my 2 to know if it was the last one to move over to the second "," ?? It's just so confusing, (am I doing it wrong? it seems really confusing)  But yeah...  I appreciate your responses, hope you can guide,help me to get this done. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.