jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
Hey guys, I wrote a script that send emails to our subscribers from church about 920. I also want this emails to be send by packages, where every 10 sec to be send 10 emails, for this issue I'm using sleep php function.. and cron job from the server. Where is the problem? When I ran the script from my local machine I've got 90 packages, if I run the script from the remote server (we're using godaddy shared server), I've got only 61 packages. There are the links to the scripts... cron. php -> http://pastebin.com/wXRs1Adt array's mails -> http://pastebin.com/vDdPd5mN Any help would be appreciated!
-
Jquery Toggle Divs Hide Option And Keep It Selected?
jazzman1 replied to lovephp's topic in Javascript Help
Sorry about that The code above works just fine, but to this topic -> http://forums.phpfreaks.com/topic/269366-switch-content-not-working-please-help-fix/ About the real one you could use "this" javascript object and css property to hide this button. Try, <script> $(document).ready(function(){ $(".buttons").click(function () { $(this).css("display", "none"); var divname= this.value; $("#"+divname).show("slow").siblings().hide("slow"); }); }); </script> -
Jquery Toggle Divs Hide Option And Keep It Selected?
jazzman1 replied to lovephp's topic in Javascript Help
Christian, it's not my code. I posted it into a wrong section! This answer belongs to here -> http://forums.phpfre...lease-help-fix/ @lovephp I thought you 're double posting, ignore my answer for that, please. Thank you j. -
Don't make double posts, please.
-
What result do you get? <script type="text/javascript"> function checkForm(frm) { alert (frm); return false; .......... </script>
-
Jquery Toggle Divs Hide Option And Keep It Selected?
jazzman1 replied to lovephp's topic in Javascript Help
I've got a correct result. index.php <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.js"></script> <script language="Javascript" type="text/javascript"> <!-- function swapContent(cv) { //$("#myDiv").html('<img src="loader.gif"/>').show(); var url = "test.php"; $.post(url, {contentVar: cv} ,function(data) { console.log(data); //$("#myDiv").html(data).show(); }); } //--> </script> <style type="text/css"> #myDiv{ width:200px; height:150px; padding:12px; border:#666 1px solid; background-color:#FAEEC5; font-size:18px; } </style> </head> <body> <a href="#" onclick="return false" onmousedown="javascript:swapContent('con1');">Content1</a> <a href="#" onclick="return false" onmousedown="javascript:swapContent('con2');">Content2</a> <a href="#" onclick="return false" onmousedown="javascript:swapContent('con3');">Content3</a> <div id="myDiv">My default content for this page element when the page initially loads</div> </body> </html> test.php <?php if (isset($_POST['contentVar'])) if($_POST['contentVar'] == 'con1') echo 'Con1 is here'; elseif($_POST['contentVar'] == 'con2') echo 'Con2 is here'; elseif($_POST['contentVar'] == 'con3') echo 'Con3 is here'; else echo 'Something else'; ?> -
Well, what about with differen charset and collation like UTF ?
-
Delete Multiple *selected* Fields/columns/rows
jazzman1 replied to White_Lily's topic in PHP Coding Help
Well, in reality you can use either method and I've seen scripts using the GET method to delete database information and POST method just to retrieve information from the server. I think (and not only me) that the GET method is suited to request that don't affect the state of database or files on the server. In other words use it when you want to get information. The POST is suited for sending data that will change information on the server. That's why I said, he/she to use POST data method. -
A little correction if (!preg_match("/^[a-zA-Z0-9]+$/" )) to if (!preg_match("/^[a-zA-Z0-9]+$/", $uname ))
-
Delete Multiple *selected* Fields/columns/rows
jazzman1 replied to White_Lily's topic in PHP Coding Help
@White_Lily, don't forget to use post method, when you are trying to delete or update some data in your DB. -
Have you ever checked this value ? You will see the real value - is undefind <script type="text/javascript"> function doValidate() { console.log(document.registerform.textbox1.value); } </script>
-
Do you want to sniff the LAN or you are an admin and have full access to the router ?
-
Example, $arrInfo = array( 'www.bind.com' => array( 0 =>array( 'url' => 'http://www.bing.com/kee', 'parse' => array( 'schame' => 'http', 'host' => 'www.bing.com', 'path' => '/kee_' ), 'md5' => 'e69d3a5bb987448e30ec8559c3634caf' ) ) ); echo $arrInfo['www.bind.com'][0]['parse']['host'].'<br />'; // www.bing.com echo $arrInfo['www.bind.com'][0]['md5']; // e69d3a5bb987448e30ec8559c3634caf
-
Try, $host = ['www.bing.com'][0]['parse']['host']; $md5 = ['www.bing.com'][0]['md5'];
-
If your problem is <some text></some text> tags, just find and replace them in the string with <li> or [li]....
- 17 replies
-
- preg_match
- html
-
(and 1 more)
Tagged with:
-
One more solution, I used the pattern of the link posted by @Zane... SELECT c.playerID, AVG(c.final_score) as average FROM sleuth_game c INNER JOIN ( SELECT a.puzzleID FROM sleuth_game a INNER JOIN sleuth_game b ON (a.playerID = b.playerID) AND (a.final_score <= b.final_score) GROUP BY a.puzzleID HAVING COUNT(*) <= 3) AS x ON (c.puzzleID = x.puzzleID) GROUP BY c.playerID HAVING COUNT(*) > 2 Result: +-----------+------------+ | playerID | average | +-----------+------------+ | 101 | 50.0000 | | 103 | 45.0000 | +----------+-------------+
-
I tested it. It works, but him mysql structure is not very well at all.. Result is: +----------+------------------+ | playerID | AVG(final_score) | +----------+------------------+ | 101 | 43.7500 | | 103 | 45.0000 | +----------+------------------+ P.S Hm....now I saw that he wants to count only first three results from playerID = 101, but I count all of them. That's why my average is 43.7500.
-
I'm not sure for others browsers, you could check -> https://developer.mozilla.org/en-US/docs/DOM/FileReader
-
I'm not sure that you know differences between encryption and hashing.
-
Ah, my apology. You want to match new lines $pattern = '/^[\n\r]?[a-z0-9_\/a\-\<li\>(.*?)<\/li\>\ ]+/i'; if(preg_match($pattern, $va1)){ echo 'true'; } else { echo 'false'; } @Christian, you pattern won't work, why are you using [\\n\\r] ?
- 17 replies
-
- preg_match
- html
-
(and 1 more)
Tagged with:
-
Try, preg_match('/^[a-z0-9_\/a\-\<li\>(.*?)<\/li\>\ ]+[^\n]?$/i',$va1)
- 17 replies
-
- preg_match
- html
-
(and 1 more)
Tagged with:
-
Could you show us the text that you'd like to validate, also your RegEx string, and finally var_dump($va1).
- 17 replies
-
- preg_match
- html
-
(and 1 more)
Tagged with:
-
Tree Menu From Database - 3 Levels (2 Records On First Level)
jazzman1 replied to wasssu's topic in PHP Coding Help
Check this out -> http://www.sitepoint.com/hierarchical-data-database/