Jump to content

ayok

Members
  • Posts

    340
  • Joined

  • Last visited

    Never

Everything posted by ayok

  1. Hi, I've got a problem with php mail function. It works actually fine with normal e-mails, but it's not sent when the e-mail address is an alias. This is what i mean. The client has for example www.client.com and the e-mail address should be like info@client.com. HOwever he created this e-mail address at gmail. I don't really understand how, but these alias (like admin@client.com, info@client.com, etc) were made with gmail account. So anything which is sent to info@client.com will be redirected to his gmail account. But then, the php mail() cannot send to these addresses. Has anyone had this experience? What is the solution? Thanks in advanced, ayok
  2. I have a problem with one of my client about the url. I've tried to implement clean URL for the site. The old URL was like index.php?id=12&item=22&page=about_us. So far I've changed it to site.com/12-22-about_us.html. However, it still looks messy with all the number and he's still unhappy with it. How can I get rid of those numbers without messing with the query? Thank you, ayok
  3. Hi, I have a question, just to satisfy my curiosity. How do people hide their copyright text or links? For example there are a lot of free source like joomla extension with their signature on the bottom. I wanted once to remove a text of copyright from a php script, but i couldn't find it. I even use kind of search word in files software. Ok.. I stopped looking for it, but I'm still curious. How do they do that? Do they include from outside the scirpt?
  4. Hi, I failed to merge arrays. This is the case. $arraylength= 2; for($i=0;$i<$arraylength;$i++){ $vars[] = array( $key1[$i] => $value1[$i], $key2[$i] => $avalue2[$i], $key3[$i] => $avalue3[$i]); } print_r($vars); I got then, for example, this output Array( [0] => Array ( [key0] => value1, [key0] => value1, [key2] => value2 ) [1] => Array ( [key10] => value10, [key11] => value11, [key12] => value12 ) ) Then I need to merge those two arrays. It should be like array_merge($vars[0],$vars[1]);, but how can i merge more arrays? Thank you in advanced, ayok
  5. Hi. I have 10 radiobuttons with a div under it. <input type='radio' name='test' value='first_value' />Radio1<br/><div id="first_div">test</div> This is what I'm trying to achieve: All div's are hidden (display:none) and if I check a radiobutton it show the div under it (display:block) and if I check other radiobutton, it will closed and open the div under the other radiobutton. My attempt: <script> function radiobuttons(disp) { for(i = 0; i < document.form1.test.length; i++){ if(document.form1.test[i].checked){ document.getElementById(disp).style.display = 'block'; }else{ document.getElementById(disp).style.display = 'none'; } } } </script> <input type='radio' name='test' onclick="radiobuttons(first_div)" />Radio 1<br/><div id="first_div">test</div> <input type='radio' name='test' onclick="radiobuttons(second_div)" />Radio 2<br/><div id="second_div">test2</div> <input type='radio' name='test' onclick="radiobuttons(third_div)" />Radio 3<br/><div id="third_div">test3</div> I've tried this code, but it doesnt work. It's displayed in the loop but then hide again immediately. I've tried to insert break; but it doesn't work right either. How can I get it right? Any help? Thank you in advanced. ayok
  6. Let me explain again. With this code: $( ".selector" ).slider({ step: 5 }), we will achieve a slider with increment values of 5. So if we slide, the slider will snap to values of 5, 10, 15, 20 etc (multipled by 5). Instead, I want the slider snap into discrete values like 1,3,6,14,17,29, 88, 100, etc.
  7. Sorry, for me it's a bit difficult to explain. I mean the values has different increment. Thus, 1, 2, 5, 10, 13, 56, etc.
  8. Hi, I'm new with jquery and still learning how jquery works. Now I'm busy with the slider. It works great. However, I'm stuck with something. I need some sliders and one of the slider has discrete values. By default the step is 1, and we can change the step. For example: $( ".selector" ).slider({ step: 5 }); So the slider will snap on values of 0, 5, 10, 15, etc. However, i need descrete value, so instead of 0, 5, 10, I need the slider snap to discrete values like 0, 1, 3, 9, 14, 49, 96 etc. I cannot get any answer about this on google nor in jquery site. Is there maybe anyone who has done this? Thank you in advanced. Regards, Ayok
  9. Hi, I have a site with this structure /root - public/ - includes/ - .htaccess So when a visitor type http://www.site.com/ it's redirect to public folder. And if it's site.com/page.htm or site.com/admin it's redirected to public/. However, the last 2 actions doesn't work when I try it on localhost. This is my .htaccess RewriteEngine On RewriteCond %{REQUEST_URI} !^/public/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /public/$1 RewriteRule ^(/)?$ public/ [L] RewriteRule ^(/)?$ public/admin/ [L] RewriteRule ^public/([a-zA-Z0-9_\-_]*?).htm$ public/index.php I've tried to add RewriteCond %{HTTP_HOST} ^localhost/site$, but it still doesn't work. I keep getting error 404. Would anyone point out where i do wrong? Thank you, ayok
  10. Thanks all. It's solved. I don't know how, maybe because the owner has reported to the hosting company. But I still don't understand how it happened.
  11. Sorry for my stupid question... but where can i find SSH?
  12. I can't connect to the site, cpanel, and even the ftp.
  13. Can't fix it. I still get this time-out error. Anyone?
  14. I'm in holland, so I don't know if there is such an internet filter.. I think it's not the browser, cos I've tested with all my browser. I was working on it and getting a javascript error. After that I cannot access the site. I'll check the anti virus.
  15. Hi, I have a strange experience. I'm working on a site, and one day I cannot access the site (www) and the ftp. The strange thing is, I can open it in other place and a friend can open it in other city. In conclusion, only the internet connection at my place cannot access de site! What's happened? How can I fix it? What should I do??? ayok
  16. Ok cags, I'll try it and get back if still have problem. Thank you very much!
  17. Thank you Zyx, No, i think i still don't understand the concept of character encodings. On the top of my index.php there is <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />, is that not enough? So what's should I better do? I use phpmyadmin, and I see the column "collation" if I make a new table. Should I set this to utf8_unicode_ci?
  18. Hi, I'm trying to insert european characters to mysql such as ë, é, etc. However I've got strange character in my database. How can I encode this chars into html like &euml, or &eacute? I used code like echo str_replace("ë","ë",$txt); But it's not working. Would anyone help? thank you, ayok
  19. it's ok.. it's solved.
  20. You need to specify the width (and height) of display:block. Try the same for .paging.
  21. Hi, I have problems with backgrounds. Please take a look this layout. I put the green background on <html> and the shadows on <body>. It looks fine, but if we scroll, you see the problem. This is the css file html{ background-image: url(images/bg.png); background-repeat: repeat-x; background-position: left top; height:100%; } body { background: url(images/bgwrapper.png) repeat-y top center; margin:0; padding:0; height:100%; } I've tried to set the background-attachment of the body to fixed, but it doesn't work. However, it works if I take off the html background. What could be the good trick for this problem? Thanks in advanced, ayok
  22. Hi, thanks. I am trying to make a csv importer. And the output "1,john,18,Cancer" is from the csv file. However, when I tried to insert the data into a table, i kept getting mysql error, and the way to fix it is to insert quotes on the data, like " '1','john','18','Cancer' ". Here is my php so far: $filecontents = file ("testable.csv"); for($i=1; $i<sizeof($filecontents); $i++) { $insertrecord = "INSERT INTO ".$tablename." (".$filecontents[0].") VALUES (". $filecontents[$i].")"; } If I echo the $insertrecord i got INSERT INTO testable (id,name,age,zodiac) VALUES (1,john,18,Cancer) which return mysql error. It works when I changed the values into '1','john','18','Cancer'.
×
×
  • 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.