Jump to content
php.lv forumi

FT3

Reģistrētie lietotāji
  • Posts

    183
  • Joined

  • Last visited

Posts posted by FT3

  1. Warning: preg_replace() [function.preg-replace]: Compilation failed: unmatched parentheses at offset 1 in C:\AppServ\www\forum\2.php on line 5

     

    Warning: preg_replace() [function.preg-replace]: Compilation failed: unmatched parentheses at offset 2 in C:\AppServ\www\forum\2.php on line 6

     

    Warning: preg_replace() [function.preg-replace]: Compilation failed: missing ) at offset 2 in C:\AppServ\www\forum\2.php on line 7

     

    Warning: preg_replace() [function.preg-replace]: Compilation failed: missing ) at offset 3 in C:\AppServ\www\forum\2.php on line 8

     

    Warning: preg_replace() [function.preg-replace]: Compilation failed: unmatched parentheses at offset 1 in C:\AppServ\www\forum\2.php on line 13

     

    Warning: preg_replace() [function.preg-replace]: Compilation failed: unmatched parentheses at offset 2 in C:\AppServ\www\forum\2.php on line 14

  2. $adress = $_SERVER['HTTP_HOST'];
    $link = $_SERVER['PHP_SELF'];
    
    
    $query = mysq_fetch_object(mysql_query("select count(id) as cnt from clients where adress='$adress'"));
    if($query->cnt == 0){
    mysql_query("insert into clients (adress,link) values ('$adress','$link')");
    }

     

    Fatal error: Call to undefined function mysq_fetch_object()
  3. <?php
    $replace_array = array(
    //BB CODES
    '[bb]' => '<B>',
    '[/bb]' => '</B>',
    //ANTI
    '<' => '<',
    '>' => '>',
    //SMILES
    ':)' => '<img src="http://www.krot.lv/engine/modules/mchat/smiles/smile-23.gif" alt=":)" />', 
    ':(' => '<img src="http://sartira.net/engine/modules/mchat/smiles/smile-20.gif" alt=":(" />' 
    );
    
    $text_t = str_ireplace(array_keys($replace_array), $replace_array, $text_t);
    ?>

     

    kad teksts ir [bb]TEKSTS[/bb] rada <b>TEKSTS</b> bet vajag lai butu TEKSTS

     

    es zinu del ka tas ir del < = < un > = > , bet ka lai ustajsit ka [bb] šim kodam butu izņemums ? !

  4. Tada lieta kad uzpiezu uz attelu nekas nemainas ?!

     

    bet ja uzlieku type "submit" viss strada, help

     

    Kas pa vainu ?

     

    <?php
    session_start();
    
    if($_POST['LV']){
    $_SESSION['valoda']="LV";
    }
    
    elseif($_POST['RU']){
    $_SESSION['valoda']="RU";
    }
    
    elseif($_POST['ENG']){
    $_SESSION['valoda']="ENG";
    }
    ?>
    
    <form method="post" action="">
       <input type="image" name="LV" src="lv.png" >
       <input type="image" name="RU" src="ru.png" >
       <input type="image" name="ENG" src="eng.png" >
    </form>
    
    <?php
    if ($_SESSION['valoda']>=RU)
    { include("lang/RU.php"); }
    
    elseif ($_SESSION['valoda']>=LV)
    { include("lang/LV.php"); }
    
    elseif ($_SESSION['valoda']>=ENG)
    { include("lang/ENG.php"); }
    
    else
    { include("lang/LV.php"); }
    
    
    ?>

     

    ir ari tads variants

     

    <button type="submit" name="LV"><IMG SRC="LV.png"></button>

     

    bet man vjg lai butu pliks attels , uzpiežot mainas sessias :)

  5. mekleju tadu javascriptu vai kodu nezinu kas tads ir :D

     

    piemiers :

     

    div panelis1

    ===================

    input lauks ,

    ja es ievadu kautko

    to uzrada div paneli2 , bez buttoniem

    ===================

     

     

    div panelis2

    ===================

     

    nanananna

     

    ===================

  6. if(isset($_GET['newsadd'])){
      echo "its news add";
    }else{
      echo "aaaaa";
    }

     

    ka lai vel pieliek klat if(isset($_GET['moviesadd']))

     

    piem.

    newsadd un movie add , echo ir savadai , bet else paliek viens un tas pats !

  7. te tads jautajums kpc kad uzpiezu x vins dzes visus ierakstus , nevis manu izveleto ?

     

    <table align="center"border=1>
    <?php
    $show = mysql_query("SELECT * FROM mchat ORDER BY id") or die(mysql_error());
    
    while($row = mysql_fetch_array($show))
     {
     echo "<tr><td>";
     echo $row['ID'];
     echo $row['nick'];
     echo "</td><td>";
     echo $row['mess'];
     echo "</td>";
     echo "<TD><form method='post' action=''><input type='submit' name='delete' value='Х' /></form></TD></tr>";
    
    if($_POST['delete']){
    mysql_query("DELETE FROM mchat WHERE `ID` = '{$row['ID']}' ");
    }
    
    }
    
    ?>
    </table>

×
×
  • Create New...