Jump to content

LOSTBOY

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Posts posted by LOSTBOY

  1. I have added authentication script like below @ my htaccess

     

    AuthUserFile /var/www/mydomain.com/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Authentication required"
    AuthType Basic
    
    <Files "*">  
    require valid-user 
    </Files>

     

    Is there is any way to bypass this authentication for a particular url with specific get variables like

    http://mydomain.com/index.php?m=file&action=upload

     

     

    Please give me your ideas and suggestions ...to solve this..

     

     

  2. I have a text field and a submit

    button.The top one has a function connected to the onblur event

    when someone leaves the text field.The submit button has a funciton

    connected to the onclick event. when I move the mouse from

    the text field to the button and press the button.the text input loses focus,

    which fires its blur event and it wont fires its click event. here i give an example:Please check out this

    <html>
    <header>
    <script type="text/javascript" src="../javascript/ui/jquery.js"></script>
    <script type="text/javascript">
    $(function(){
    $("#a").blur(function(){
    	hi1();
    });
    $("#Submits").click(function() {
    	hi2();
    });
    });
    var id = "";
    function hi1(){
    id = "1";
    alert(id);
    return;
    }
    function hi2(){
    id = "2";
    alert(id);
    }
    </script>
    </header
    <body>
    <form name="frm" method="post">
    <input type="text" id="a" name="a" >
    <input type="button" id="Submits" name="Submits" value="click me"  > 
    </form>
    </body>
    </html>
    

    and give me the suggestion to overcome this problem. ??? :'(

  3. hi experts ,

       

            am an php beginner when try to redirect using header() it throws error as below what can i do for this ..

     

    Warning: Cannot modify header information - headers already sent by (output started at c:\wamp\www\rapid\user\login.php:3) in c:\wamp\www\rapid\user\login.php on line 9

     

     

    my code

    <?php
    if(isset($_POST['submit'])): ?>
      <?php
        include_once("clsuser.php");
    
              $objuser = new user;
      $objuser->validateuser($_POST['uname'], $_POST['pass']);
      header('Location: http://localhost/rapid/main/campaign.php');
      ?>
    <?php else: ?>
    
    //HTML CODE HERE
    

    Plz help me ASAP

  4. here is my code.....actually i want to generate Randam Quiz's .....as single quiz per page

    here $_session['$max'] is the maximum questions that user select from our db

     

    if (!isset ($_SESSION['$max'])){
    $_SESSION['$max']=$_POST['sel_ques'];
    $tempArray= array();
    } 
      
    
    do
    {   
      $qno=rand(1, $_SESSION['max']);   
      if (!@in_array($qno,$tempArray)) { 
        $tempArray[$r] = $qno;
        $query="SELECT * FROM question WHERE qid=$qno" ;
        $result=mysql_query($query);
        $id=mysql_result($result,$i,"qid");
        $question=mysql_result($result,$i,"question");
        mysql_result($result,$i,"question");
        $query1="SELECT * from answer where qid=$id";
        $result1=mysql_query($query1);
    $r++;
      }

     

     

    But it not working properly .......plz give ur suggestions

  5. thanks for ur valuable suggestion ..sorry ......am an newbie  to this forum....

      $r=0
      do{   
      $qno=rand(1, $_SESSION['$max']);   
      if (!in_array($qno,$tempArray)){ 
        $tempArray[$r] = $qno; 
        $query="SELECT * FROM question WHERE qid='$qno' " ;
        $result=mysql_query($query);
        $id=mysql_result($result,$i,"qid");
        $question=mysql_result($result,$i,"question");
        mysql_result($result,$i,"question");
        $query1="SELECT * from answer where qid=$id";
        $result1=mysql_query($query1);
        $r++ ;
      } 
    }while($r <= $n)

  6. Hi Experts

       Am an PHP Beginner

     here i give snap of my code ..... there how can i generate non repeating random nos...............this code didnt  work properly what can i do for that

      do{  

     $qno=rand(1, $_SESSION['$max']);  

     if (!in_array($qno,$tempArray)){

       $_SESSION[$tempArray[$r]] = $qno;

    $i=0;

    $query="SELECT * FROM question WHERE qid='$qno' " ;

       $result=mysql_query($query);

       $id=mysql_result($result,$i,"qid");

       $question=mysql_result($result,$i,"question");

       mysql_result($result,$i,"question");

       $query1="SELECT * from answer where qid=$id";

       $result1=mysql_query($query1);

    $r++ ;

     }

    }while($r <= $n)

     

     

     

    thanks in advance

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