Jump to content

dreamwest

Members
  • Posts

    1,223
  • Joined

  • Last visited

    Never

Posts posted by dreamwest

  1. PHP just sends the HTML to the browser, it doesn't interpret the HTML, so it doesn't load the image. That's the job of the browser. So the reason it's not working is because by the time the browser tries to load the image (the php script has already send the output and stopped executing) the image was unlinked and does no exist anymore.

     

    Is there a way around this?

  2. so you only have 2 dollars and 40 cents to your name? Thats unfortunate

     

    At least its not in the negative

     

    Over paypal,

     

    lol I got 2.40$ left and i need to get a .com, im trying to find a 1.99$ TLD Register.. i found 1 last year it was go daddy, but it wont work now.. iuno i need to find another Registrar..

     

    thanks, lol anyone got any ideas on some sites 1.99$ for .com

     

    Ill give you $50 (AU) if you write me a decent javascript tutorial for my site with examples. Dont copy and paste it from some site though. But you can compile it from different sources.

     

     

  3. I have some php code snippets stored in my database:

     

    <?php
    
    echo 'Hello';
    
    ?>

     

    How can i select this and execute it?? If not is there an alternative??

     

    $res = mysql_query("select * from code were id =1");
    
    $row= mysql_fetch_assoc($res);
    
    $code = $row['code'];  //this is the code to be executed
    
    

  4. There have been like 7 Friday the 13ths this year.

     

    Also its Thursday the 12th for some users right now. Anyways, you actually believe in that garbage? Its all non-sense I tell you!  :(

     

    No Way!

     

    Next youll tell me santa isnt coming to see me this year.....

  5. *bump* This time it made it to the middle of the fourth page....so am I really on my own on this one?

     

    Properly because of the type of content your after - ppl's private info. Im not going to ask what you intend to do with it.

     

    preg_match_all() will definatley work with a foreach loop

  6. This will produce the codes you need using chr()

     

    function password_gen($min=6,$max=6,$id){ /*has a default min value of 6 and maximum value of 6*/
    $pwd=""; // to store generated password
    for($i=0;$i<rand($min,$max);$i++){
      $num=rand(48,122);
      if(($num >= 97 && $num <= 122))     $pwd.=chr($num);
      else if(($num >= 65 && $num <= 90))  $pwd.=chr($num);
      else if(($num >=48 && $num <= 57))    $pwd.=chr($num);
      else    $i--;
    }
    return $pwd;
    }
    
    echo password_gen(6,6, 12 );
    

  7. $link = connectToDB();
    
    if(isset($_POST['submit'])){
    
    $filename=$_POST['filename'];
    $handle = fopen("$filename", "r");
    
    //GRAB LAST ID FROM LOG TABLE
    $batchid=mysql_insert_id();
    
    //INSERT EACH ROW INTO THE TABLE
    $cnt = 1;
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE){
    
    $import="INSERT INTO inventoryTable(campcode,imbatchid, importdate,fname, mname, lname, phone, address1, address2, city, state, zip) VALUES('$data[0]','$batchid',NOW(),'$data[1]','$data[2]','$data[3]', '$data[4]','$data[5]','$data[6]','$data[7]','$data[8]','$data[9]')";
    mysql_query($import) or die(mysql_error());
    ++$cnt;
    }
    fclose($handle);
    print "Import done";
    
    //LOG THE BATCH IMPORT
    $user=$_SESSION['SESS_MEMBER_ID'];
    $log_query="INSERT INTO batchImportLog(ImportDate,FileLocation,RecordCount, ImUserID ) VALUES(NOW(),'xxx','{$cnt}','{$user}')";
    mysql_query($log_query) or die(mysql_error());
    
    print '<br>All done!';
    }else{
    
    print "<form action='import.php' method='post'>";
    print "Type file name to import:<br>";
    print "<input type='text' name='filename' size='20'><br>";
    print "<input type='submit' name='submit' value='submit'></form>";
    }

  8. Welll forgetting about the class, this will get the info  you want. Your not getting multiple items per page so you wont need preg_match_all()

     

    $u = 'http://whitepages.anywho.com/results.php?ReportType=34&qi=0&qk=10&qn=A&qs=AK';
    
    $g = @file_get_contents($u); //remove @ to show errors
    
    $a = explode('<span class="singleName">',$g);
    $a = explode('</div></div>',$a[1]);
    $a= $a[0];
    
    echo $a;
    echo '<hr>Done!';

     

    Just str_replace() the divs so you can put it into the database

  9. You have to check if headers have been sent yet:

     

    function redirect( $url ){
        if (! headers_sent( ) ){
        
            header( "Location: ".$url );
            exit( 0 );
        }
        echo "<script language=Javascript>document.location.href='".$url."';</script>";
        exit( 0 );
    }
    
    redirect('any url here you want');
    

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