Jump to content

dsp77

Members
  • Posts

    143
  • Joined

  • Last visited

Everything posted by dsp77

  1. thanks man
  2. it works and is fast to:) foreach(array_slice(explode("/", $a['url']), -2, 1) as $link){ $dlink = 'http://example.com/cat/'.$link.'/full_screen/'.$a['id']; }
  3. Hello, i have this type of link: http://www.example.com/cat/name-of-article/5054673 and i want to transform it into: http://www.example.com/cat/name-of-article/full_screen/5054673 i think it can be done with explode or str_replace but i had no luck. Any advise? Thank you
  4. i have this list of arrays Array ( [0] => LeanBiz ) Array ( [0] => Boutique ) Array ( [0] => Feather ) Array ( [0] => Aggregate ) i want to create one single array containing the values from x arrays.
  5. Sorry DavidAM but i forgot to add userid UNIQUE index thank you anyway
  6. thank you, the unset was missing
  7. lest say this table CREATE TABLE IF NOT EXISTS `fishing` ( `userid` int(11) NOT NULL, `fav_fish` varchar(255) DEFAULT NULL, `fav_lake` varchar(255) DEFAULT NULL, KEY `userid` (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; a user fills information in more tables with exactly the same structure (different names), some will be left null and at the end i want to find how many nulls are in x tables. I tried some query's with no success:(
  8. Hello, i have an array like: Array ( [0] => http://www.google.com/asdasfsdafas [1] => http://www.google.com/join.html [2] => http://www.google.com/dfsgjkd [3] => http://www.google.com/join.html [4] => http://www.google.com/ddfgyyhujh [5] => http://www.google.com/join.html [6] => http://www.google.com/ghklkl ) I'm trying to transform it like: Array ( [0] => http://www.google.com/asdasfsdafas [1] => http://www.google.com/dfsgjkd [2] => http://www.google.com/ddfgyyhujh [3] => http://www.google.com/ghklkl ) I used array_fliter but with no success any advise? Thanks
  9. they all are related by userid(int)
  10. hello, i have the piece of code that works but i'm wandering if there is a shorter way. Thanks foreach ($decode as $value) { if($value == 'A1') $tpl->setVariable('checked0','checked="checked"'); if($value == 'A') $tpl->setVariable('checked1','checked="checked"'); if($value == 'B') $tpl->setVariable('checked2','checked="checked"'); if($value == 'B1') $tpl->setVariable('checked3','checked="checked"'); if($value == 'BE') $tpl->setVariable('checked4','checked="checked"'); if($value == 'C') $tpl->setVariable('checked5','checked="checked"'); if($value == 'C1') $tpl->setVariable('checked6','checked="checked"'); if($value == 'CE') $tpl->setVariable('checked7','checked="checked"'); if($value == 'C1E') $tpl->setVariable('checked8','checked="checked"'); if($value == 'D') $tpl->setVariable('checked9','checked="checked"'); if($value == 'D1') $tpl->setVariable('checked10','checked="checked"'); if($value == 'DE') $tpl->setVariable('checked11','checked="checked"'); if($value == 'D1E') $tpl->setVariable('checked12','checked="checked"'); }
  11. Hello, i have 3 different tables with all rows that can be null. The question is how to count the nulls from all tables or if there is at least one null?
  12. It works. Thanks
  13. Hello, I have the following htaccess file Options +FollowSymLinks RewriteEngine On RewriteRule ^([^/]*)\.html$ index.php?page=$1 [L] RewriteRule (.*)-(.*)\.html$ /index.php?page=$1&session=$2 the problem is that the second rule does not work with .html , if i change the extension to .htm it works and i have no ideea why. EDIT: a moderator please move topic i didnt saw the mod_rewrite section.
  14. Hello, I work for a institution that needs to send around 300k emails per month, the problem i'm facing now is that many of the emails are getting in junk or rejected even if i get a low score and use max 2 links in the email, all mails are personalized Dear first name last name sent every 10 sec or more etc. I want to make a virtual server linux (a mailer daemon) or windows (exchange) that will strictly be for sending emails for all our portals but i don't know how to make it work something like the email marketing websites do without getting the emails rejected. We have the hardware and software resources necessary we can get a .gov domain if necessary. Any of you had any experience with something similar and maybe can give me some advise? Thank you I'm sorry if i posted in the wrong section or a moderator can move it to a proper section.
  15. [users]---------------[a2crit1]-----------------[a2crit2]------------------[domains] -id- -id_user- -id_user- -id- -name- -id_domain- -id_domain- -domain_name- -a21Val1...n- -a22Val1...n- the result i want to export should have the name fields like: [name] [domain_name] [a21Val1]....[a21Valn] [a22Val1]....[a22Valn] hope this helps
  16. i have the following query: SELECT d.domainName, a21.*, a22.* FROM users AS u LEFT JOIN a2crit1 AS a21 ON u.id=a21.id_inst LEFT JOIN a2crit2 AS a22 ON u.id=a22.id_inst LEFT JOIN domenii AS d ON d.id=a21.id_domeniu WHERE u.id=20 MySQL client version: 5.0.90 It should result 19 rows but the result is 361 witch is 19x19. Any advice how to repair this? thanks
  17. Hello, i have a form with 60 check boxes (different id/name)and i don't know how can i validate (with js) to be check at least one. any advise ?
  18. oh yes, that is so obvious hehe didn't cross my mind, thank you.
  19. Hello, i have the code below and i need to have all results in a variable as a string, inside the loop they are displayed how i want but outside will echo the last result. Thank You. foreach($_POST as $key=>$value){ if (is_numeric($value)) { $valoare = "$value,"; } } echo $valoare;
  20. i'm using PEAR SIGMA template where the pages are generated like: www.site.com/index.php?page=contact my htaccess file is: Options +FollowSymLinks RewriteEngine On RewriteRule ^([^/]*)\.html$ index.php?page=$1 [L] It works if i access the page directly by www.site.com/contact.html but the links in the site are not changed, the rewrite shouldn't change those links automatically?
  21. hello there, i have the following code to validate if empty input but i want to validate and the input for numeric or decimal, valid entries: 0.23, 1.22, 3, 0, 7 etc. thank you <script type = "text/javascript"> function validateForm(form) { for(var i = 0; i < form.elements.length; i++){ if(form.elements[i].value.length == 0){ document.getElementById(form.elements[i].name).setAttribute("class", "error"); alert('You have an empty field: '+form.elements[i].name+'.'); form.elements[i].focus(); return false; } } return true; } </script>
  22. the problem is fixed by adding break ,i was dazed by the 200 echos .
  23. Hello, i need to validate 200 input fields if they are not empty, i have the following code where i'm stuck and i'm missing something any help is appreciated if($_SERVER['REQUEST_METHOD'] == 'POST') { //print_r($_POST); foreach ($_POST as $value) { if (empty($value)){ echo 'empty'; } else { echo 'notempty'; } } }
  24. Hello, i'm trying to create a table with questions and input answers. The problem i'm facing is how can i generate dynamically the input name and value unique because some questions have other dates or criteria. I was thinking of adding in the db a field with the type of the question or a new table with question types then using foreach and if to generate, i don't have much time to test and i'm asking for your help/advise. Hope i was clear enough . PS: I'm using PEAR SIGMA as template. <table class="tablesorter" border="0" cellspacing="1" cellpadding="0"> <thead> <tr> <th align="center"><span> </span></th> <th align="center"><span>2005 - 2006</span></th> <th align="center"><span>2006 - 2007</span></th> <th align="center"><span>2007 - 2008</span></th> <th align="center"><span>2008 - 2009</span></th> <th align="center"><span>2009 - 2010</span></th> </tr> </thead> <tbody> <tr> <td align="center"><span>preparator</span></td> <td align="center"><input type="text" name="pi11_preparator_0506" value="{pi11_preparator_0506}" /></td> <td align="center"><input type="text" name="pi11_preparator_0607" value="{pi11_preparator_0607}" /></td> <td align="center"><input type="text" name="pi11_preparator_0708" value="{pi11_preparator_0708}" /></td> <td align="center"><input type="text" name="pi11_preparator_0809" value="{pi11_preparator_0809}" /></td> <td align="center"><input type="text" name="pi11_preparator_0910" value="{pi11_preparator_0910}" /></td> </tr> <tr> <td align="center"><span>asistent</span></td> <td align="center"><input type="text" name="pi11_asistent_0506" value="{pi11_asistent_0506}" /></td> <td align="center"><input type="text" name="pi11_asistent_0607" value="{pi11_asistent_0607}" /></td> <td align="center"><input type="text" name="pi11_asistent_0708" value="{pi11_asistent_0708}" /></td> <td align="center"><input type="text" name="pi11_asistent_0809" value="{pi11_asistent_0809}" /></td> <td align="center"><input type="text" name="pi11_asistent_0910" value="{pi11_asistent_0910}" /></td> </tr> <tr> <td align="center"><span>lector/șef de lucrări</span></td> <td align="center"><input type="text" name="pi11_lector_0506" value="{pi11_lector_0506}" /></td> <td align="center"><input type="text" name="pi11_lector_0607" value="{pi11_lector_0607}" /></td> <td align="center"><input type="text" name="pi11_lector_0708" value="{pi11_lector_0708}" /></td> <td align="center"><input type="text" name="pi11_lector_0809" value="{pi11_lector_0809}" /></td> <td align="center"><input type="text" name="pi11_lector_0910" value="{pi11_lector_0910}" /></td> </tr> <tr> <td align="center"><span>conferențiar</span></td> <td align="center"><input type="text" name="pi11_conferentiar_0506" value="{pi11_conferentiar_0506}" /></td> <td align="center"><input type="text" name="pi11_conferentiar_0607" value="{pi11_conferentiar_0607}" /></td> <td align="center"><input type="text" name="pi11_conferentiar_0708" value="{pi11_conferentiar_0708}" /></td> <td align="center"><input type="text" name="pi11_conferentiar_0809" value="{pi11_conferentiar_0809}" /></td> <td align="center"><input type="text" name="pi11_conferentiar_0910" value="{pi11_conferentiar_0910}" /></td> </tr> <tr> <td align="center"><span>profesor</span></td> <td align="center"><input type="text" name="pi11_profesor_0506" value="{pi11_profesor_0506}" /></td> <td align="center"><input type="text" name="pi11_profesor_0607" value="{pi11_profesor_0607}" /></td> <td align="center"><input type="text" name="pi11_profesor_0708" value="{pi11_profesor_0708}" /></td> <td align="center"><input type="text" name="pi11_profesor_0909" value="{pi11_profesor_0909}" /></td> <td align="center"><input type="text" name="pi11_profesor_0910" value="{pi11_profesor_0910}" /></td> </tr> </tbody> </table>
  25. Thank you, i was using the overflow on the img. p.s i know about the external css etc i just posted fast:) thank you again
×
×
  • 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.