Jump to content

priti

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by priti

  1. so you can access the values from match array as $match[0][0].
  2. do echo '<pre>.'; print_r($match); and print the output here.
  3. Jquery will help you more here: 1. download jquery 2. add the <script> tags 3. $(document).ready(function() { if (!FlashDetect.versionAtLeast() { // Dont have flash 8 or later $('#main').html("don't have flash 8"); } else { $('#main').html("you have flash 8"); } }); and you are done!!
  4. 01125336538 | 01125336538 Can you remove those leading zero and try... It may be possible that these number are internally taken as octal... so either you can cast your these two number in int and then compare.. or just give a try removing those leading zeros.
  5. Referring $list = $match[0]; mysql_query("INSERT INTO links (url) VALUES('$match') ") or die(mysql_error()); modify it as mysql_query("INSERT INTO links (url) VALUES('$list') ") or die(mysql_error()); as $list contains the value.
  6. you are printing echo $current_number . " | " . $row_tps['numbers'] . "<br/>"; try echo $current_number . " | " . $tps_num . "<br/>";
  7. priti

    PHPUnit

    Thorpe please let me know if you have any idea of below error "Argument #1 of PHPUnit_Util_Fileloader:checkAndLoad() is no existing file" This error comes when i run : phpunit testclass.php command on CLI.
  8. priti

    PHPUnit

    Hi, Anyone installed PHPUNIT over xamp 1.7.3 ? Or,PHPUNIT user? thanks
  9. Try ($this->num_errors > 0 && ($field != "curpass" || $field != "newpass")) OR $arrValidField=array("curpass","newpass") ($this->num_errors > 0 && !in_array($field,$arrValidField))
  10. you can pass the date in querystring (www.data.com/page.asp?date=26-nov-2009) can necessary changes to throw output for the provided date !!.
  11. How about using cookies for this?
  12. I received good response on those slides - content wise and many beginners find it easy to run the examples and understand the concept behind it. which mainly serves the purpose of it. But you guy have different view and I think I must consider the look and feel as well as media option also while creating presentation for beginners. Thanks buddies.
  13. Hi, I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert. Thanks.
  14. As this is related to file upload ,we have just solved here :http://www.phpfreaks.com/forums/index.php/topic,274757.0.html Hope this help in understanding of file uploads.
  15. in addition - To Calculate average $totalGrades=count($_POST['grades']); foreach($_POST['grades'] as $grade){ $total += $grade; } $avg=$total/$totalGrades; echo 'Class Average: '.$avg;
  16. yes this is doable and for checked checkbox you simple needs to write something extra as follow if(userregion == fromdbregion) { <INPUT TYPE=CHECKBOX NAME="region" checked >regionname<BR> } else { <INPUT TYPE=CHECKBOX NAME="region">regionname<BR> } modify this as per you requirement. Regards
  17. Via firebug (FF Add-on) debug you dynamic form fields. You have to check if they are formed correctly.
  18. okie good going let us know if you get stuck :-)
  19. Hey this work fine at my end testme.php <form enctype="multipart/form-data" action="upload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form> upload.php <?php $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {echo "File has been uploaded";} else {echo "The upload did not work.";} ?> /uploads exists in the same dir where these scripts are placed and it's 777. It works smoothly @ my end I received no error.
  20. Hello Members, Review required for following presentation. Let me know if i can add more content to it for beginners or your review how i can make it more useful for beginners. Thanks.
  21. do username "stuff, stuffradio, stuf" shares same password ????? if so then it is the reason you might be getting all users . Secondly you must be fetching only first row and it might be of stuffradio you need to print and see query results.
  22. Kindly let me know whether you undrestand following? $str="robert|true|true|false#arun|true|false|true#anu|true|true|false|"; why I suggested you the change. ??
  23. robert|true|true|false|arun|true|false|true|anu|true|true|false| I will suggest a small change first you change the delimiter to identify which is new record i.e $str="robert|true|true|false#arun|true|false|true#anu|true|true|false|"; now $dataArr=explode("#",$str); $tokenitemArr=explode("|",$dataArr[0]); //you can loop over $dataArr print_r($tokenitemArr) for you query and insert it.
  24. <script type="text/javascript"> min=2; max=7; var roll1=Math.floor(Math.random()*(max-min))+min; var roll2=Math.floor(Math.random()*(max-min))+min; var roll3 = roll1+roll2; var roll1 = roll1+<?php print $acv1 ?>; var roll2 = roll1+<?php print $acv1 ?>; //this will be enemy's acv if(document.getElementById('roll3').value <= document.getElementById('acv1').value) alert("Miss"); else alert("hit"); </script> remember ACV: <?php print $acv1; ?> put a hidden textbox <input type="hidden" value="<?php print $acv1; ?>" id="acv1"/> hope this help.
  25. This you can achieve in PHP using AJAX
×
×
  • 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.