41
neda_barna
Re: combo box
  • 2007/9/24 10:43

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


but dosent work
pay attention to:
that i have list of referee
and i want when i check on referee from list
and put number into a textbox
then do a query (update)
note:can i check the chebox and insert a number into a textbox
then click a submit button(for do my query)
did it work or no?



42
neda_barna
Re: combo box
  • 2007/9/24 9:47

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


thx
my problem solved
i forget that i must have submit button
koatik
i have another problem
i have a list that have check box
this code
function refereeList$case$case_next NULL$sid NULL$withcheck FALSE  ){
    
    global 
$query$order$start$limit;

        
  
$referee_r JournalReferee::getAll$queryTRUE$order$limit$start );
    
//echo '<pre>'; print_r( $referee_r ); echo '</pre>'; // !!!!!!!!!! DEBUG !!!!!!!!!!!!!
    
    
$action 'referee.php?case='.$case_next.'&case_pre='.$case.'&order='.$order.'"';
    
//if ( $sid ) { $action.= '&sid='.$sid; }
 
    
$total JournalReferee::getCountAll$query ); // DEBUG!!
    //$total = count( JournalReferee::getAll( $query, FALSE ) );
    

 

        
$content '<form action="'.$action.'" method="post">
          <table><tr>'
;
    if ( 
$withcheck ) {
        
$content.= '<td></td>';
        }
    
$content.= '<td class="head">'._REF_NAME.'</td>
        <td class="head">'
._REF_FIELD.'</td>
        <td class="head">'
._REF_EMAIL.'</td>
            <td class="head" nowrap>'
._REF_STATUS;
    
    
// --- Status Description --- Referee's staus desc in brief !    
    
if ( ) {
                } elseif ( 
) {
                } elseif ( 
) {
                } else {
            
$content.= '<br /><small><sup><font color="#AAAA22">'._REF_ASSIGN_JOB.'</font> '._REF_CHAR_PIPE.'
                 <font color="#CC2222">'
._REF_ASSIGN_EXP.'</font> '._REF_CHAR_PIPE.
                 <font color="#22AA22">'
._REF_ASSIGN_FIN.'</font></sup></small>';
        }

    
$content.= '</td></tr>';
    
        
$class 'even';

        foreach ( 
$referee_r as $referee ) {

                
$uid $referee->getVar'uid' );
                
$name $referee->getVar'name' );
                
$email $referee->getVar'email' );
                
$status $referee->getStatus();
        
        
$field substr_words$referee->getVar'bio' ), );

        if ( 
) {
                } elseif ( 
) {
        } elseif ( 
) {
        } else {
            
$_status '<table border="0" ><tr>
            <td><b><font color="#AAAA22">'
.$status'assign' ].'</font></b></td><td> '._REF_CHAR_PIPE.' </td>
            <td><b><font color="#CC2222">'
.$status'expire' ].'</font></b></td><td> '._REF_CHAR_PIPE.' </td>
            <td><b><font color="#22AA22">'
.$status'finish' ].'</font></b></td>
            </tr></table>'
;
        }
    
                
//$date = formatTimestamp ( $paper->getVar( 'date' ), 's' );
        
$class = ($class == 'odd') ? 'even' 'odd';
                
        
$content.= '<tr>';
        if ( 
$withcheck ) {
            
$content.= '<td class="head"><input type="checkbox" name="check[]" value="'.$uid.'"</td>';    
        }
        
$content.= '
                    <td class="'
.$class.'">'.$name.'</td>
                    <td class="'
.$class.'">'.$field.'</td>
            <td class="'
.$class.'">'.$email.'</td>
                    <td class="'
.$class.'">'.$_status.'</td>
            '
;
                
$content.= '</tr>';

        }
    
$content.= '</table><br />';
        if ( 
$withcheck ) {
              
$searchForm '<table border="0" class="listHead"><tr>
             <td nowrap>'
._REF_ASSIGN_ALLLIST.'</td>
               </tr></table>'
;
                          
$form '<form action="extended_expire.php" method="post">

    <table class="eleHead"><tr>
    <td nowrap> '
._REF_EXP.': <input type="text" name="key" value="" size="20" /></td>

    </tr><tr>'
;

 
    
//$form.=    '<td>&nbsp;</td></tr><tr><td colspan="1" nowrap>&nbsp;</td>';
    
     
$form .=    '<td nowrap> <input type="submit" class="formButton" name="search" value="'._REF_SAVE.'" /></td>

          </tr></table>
          </form>'
;
    
echo 
$searchForm;
echo 
$form;
        
               
//$content.= '<input type="hidden" name="sid" value="'.$sid.'">
        //    <input type="submit" class="formButton" name="assign" value="'._REF_BUTTON_ASSIGN.'">';
        
}
    
$content.= '</form><br />';
    
    return 
$head.$content;
}

now i want if on1 row of list checked
do this code
[code]$word=$_POST['key'];
$word1=$word * 86400;
$query="UPDATE ".$xoopsDB->prefix ( referee )." SET exp_date = exp_date + '$word1' WHERE uid=$uid AND name=$name ";
$xoopsDB->query($query);
if($xoopsDB->query($query)){
echo "Data was correctly inserted into DB!";
}
} [code]
please tell me how can write this code
thx for your help



43
neda_barna
Re: combo box
  • 2007/9/24 9:22

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


i write this code but dont work
why???????????
$combo '<form action="extended_expire.php" method="post">
           <table class="eleHead"><tr>
          <td nowrap><select name="referee">
           <option  value="A">'
._REF_ASSIGN_ALLLIST.'</option>
           <option  value="B">'
._REF_LIST_UNIQE.'</option>
           <option value="C">'
._REF_LIST_ALLA.'</option>
             </select></td>

          </tr></table>
          </form>'
;

echo 
$combo;
echo 
$searchForm;
 
if (
$_POST['referee']=='A')
{
echo 
refereeList'referee''assign'$sidTRUE  );
} elseif (
$_POST['referee']=='B')
{
echo 
"hello";
}



44
neda_barna
Re: combo box
  • 2007/9/24 9:00

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


thx so much



45
neda_barna
combo box
  • 2007/9/24 6:46

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


i have one combox with this code
$form .= '<td nowrap><select name="referee">
           <option value="A">'
._REF_ASSIGN_ALLLIST.'</option>
           <option value="B">'
._REF_LIST_UNIQE.'</option>
           <option value="C">'
._REF_LIST_ALLA.'</option>
             </select></td>

now i want write if value=A do this work
or if value=B do this work
how can write this code



46
neda_barna
Re: get data from textbox
  • 2007/9/23 6:38

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


???????



47
neda_barna
Re: get data from textbox
  • 2007/9/22 10:44

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


i read this document
but dont solve my problem
my code is:
<?php
 
include_once ( "header.php" );
 include_once ( 
XOOPS_ROOT_PATH."/class/xoopsformloader.php" );



 include 
XOOPS_ROOT_PATH.'/header.php';


    
$form '<form action="find1.php" method="post">

    <table class="eleHead"><tr>
    <td nowrap> '
._DIC_SEARCH.': <input type="text" name="key" value="" size="20" /></td>

    </tr><tr>'
;
  
//dokme ra be vasat safhe mibare
 // $form.=    '<td>&nbsp;</td></tr><tr><td colspan="2" nowrap>&nbsp;</td>';
    
$form .=    '<td nowrap> <input type="submit" class="formButton" name="search" value="'._DIC_BUTTON_GO.'" /></td>


        </tr></table>
                </form>'
;

    
$caption '<table>

            <tr class="head"><td>'
._DIC_MEAN.' </td></tr>

        </table>'
;

    
$list '<form action="find1.php" method="post">

    <table><tr><td></td>

    <td class="head"><a href="find1.php?case='
.$case.'&order=sid&order_pre='.$order.'&start='.$start.'

        &query_pre='
.$word.'&op='.$op.'">'._DIC_WORD.'</a></td>

    <td class="head"><a href="find1.php?case='
.$case.'&order=title&order_pre='.$order.'&start='.$start.'

            &query_pre='
.$meaning.'&op='.$op.'">'._DIC_MEANING.'</a></td>

    <td class="head"><a href="find1.php?case='
.$case.'&order=author&order_pre='.$order.'&start='.$start.'

            &query_pre='
.$example.'&op='.$op.'">'._DIC_EXAMPLE.'</a></td>      

    </td>

    </tr>'
;
echo 
$form;
echo 
$caption;
$word=$_POST['word'];
$query "SELECT * FROM ".$xoopsDB->prefix("tb1")." WHERE word LIKE '$word'" ;
//$query. = tb1.idE = tb3.idE";

while($myrow $xoopsDB->fetchArray($query) )

{

$word $myrow['word'];

//$meaning = $myrow['meaning'];

//$example = $myrow['example'];



$list.= '<tr><td class="even">'.$word.'</td></tr>';

}

$list.= '</table>';

echo 
$list;
$res=$xoopsDB->query($query);
//echo $res;

//$key = get_http_var( 'key' );
//$key = $this->getVar( 'key' );

//$query = "( word LIKE '%$key%'  )";

                       


include XOOPS_ROOT_PATH.'/footer.php';
?>

please read my code
do you think waht is it my problem
i think it is from this line
$word=$_POST['word'];

please tell me is it my problem



48
neda_barna
Re: get data from textbox
  • 2007/9/22 9:57

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


what????????????
i dont underestand what you said!!!!!



49
neda_barna
get data from textbox
  • 2007/9/22 8:36

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


hi all
i have 1 textbox and 1 button in my form
now,i want search that get a word from textbox and search the word that exist in database or no
now i want know
how can get a word from database
yhis is my code but it dosent work
$word=$_POST['word'];
$query "SELECT * FROM ".$xoopsDB->prefix("tb1")." WHERE word LIKE '$word'" ;

please tell me how must write this code



50
neda_barna
Re: search code
  • 2007/9/19 10:53

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


no one can helt me?
i write this project with php
this a dictionary online
this segment is search
i have 2 table
1-idF,word
2-idF,idMF,meaning,example,garce
i want use this project into a xoops
but idont know what of segment must change
please help me




TopTop
« 1 2 3 4 (5) 6 7 »



Login

Who's Online

148 user(s) are online (103 user(s) are browsing Support Forums)


Members: 0


Guests: 148


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits