Jump to content

n3r0x

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by n3r0x

  1. is_uploaded_file checks it the specified file is uploaded on the local server. To check for success you would need to enterremote server and check if the file exists there..
  2. <?php if (($row_Recordset4['multidirection']=="yes") && ($_POST["widthcheck"] < $row_Recordset4['drop'])) echo $row_Recordset4['width']; else echo $row_Recordset4['drop']; // <== Was missing an ; here ?> not sure what the problem is, do you get a different result than you wanted or?
  3. simplest way would be using regexp and preg_replace adding the regexp into 1 array and replace with in another.. then just loop through it..
  4. would do something like this. $storage_array = array(); // Split it into rows $parts = explode("\n",$file); $x=0; // For each row foreach ($parts AS $v) { // This one depends on the format of your file if they use tab it should have \t and so on // Split into elements $storage_array[$x] = explode("\t",$v); ++$x; }
  5. looking at it.. nothing wrong with what you sent, except that we would have to see the whole loop procedure to help you only thing i can see that might complicate it for you is if you don´t have $count =0; somewhere above this.
  6. instead of OR you could use REGEX in an sql query too. Yes but if im not misstaking regexp search slower, but then again would be a lot of ORs so might be faster with regexp search... Anyway he should test what works best and run with that..=)
  7. Might be possible by shortening down the term they where searching for multiple ways and then search with an extensive "OR" list in either keyword table or directly in the text, not that this would probably strain your mysql database a lot (even with great indexing).
  8. Something like cliftonbazaar said works i would however make a table for tracking online users, since it would be faster and more searching a smaller table for users online in the last 5 or 10min. Basicly a 2 or 3 field table with userid or IP (userid if you only plan to track logged in users, IP if you plan to track both logged in and visitors) and last_access A third column could be tiny int to is_logged_in either 1 or 0 Then again i like having separate tables for stuff like this.
  9. my multiligual website uses 1, a) with small mod (using single quotes instead of double) echo ' <body> <div> <p>'.$LANG['welcome'].'</p> </div> '; as for javascript... I use a php file as javascript file.. that way I can alter it using PHP variables <script src="javascript.js.php" type="text/javascript" /> and <?php header("Content-type: text/javascript"); ?> // Javascript down here but that´s just me..
  10. Sounds like they have something that blocks fsockopen on the hosting.. would suggest you ask the company if their PHP config, firewall allows it to other IPs than localhost..
  11. I always use -R for empty dirs.. files in them are created with the same owner by apache..
  12. try chown -R kevin:apache games for more information abut chown http://nersp.nerdc.ufl.edu/~dicke3/nerspcs/chown.html
  13. personally i never use header("Location:$url"); I Use header('refresh:'.$timeoutperiod.';url='.$url); that way i can set a timeout before the redirect should occur. (never had a problem in IE ever)
  14. Not sure if i get you right.. but wouldn´t it be possible to return the postid using jquery/ajax from submitting first form add it into a hidden input in the attachment form the submitting those? [*]User press submit [*]form 1 sends all information [*]On success jquery receives postid and updates the hidden value On Fail halt and display error(s) [*]form 2 with attachments are sent [*]User gets redirected to post
  15. i would either use a function for initiating xmlhttp function initiate_ajax() { if(window.XMLHttpRequest) { var xmlhttp=new XMLHttpRequest(); } else { var xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } return xmlhttp; } function first() { var xmlhttp = initiate_ajax(); ...... } function second() { var xmlhttp = initiate_ajax(); ......... } or make it global var xmlhttp; if(window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } function first() { ...... } function second() { ......... }
  16. I see one problem <script type="text/javascript" src="menu.js"></script> <body onload='show_menu();'> Body onload are not triggered until the whole page is loaded.. and would be printed out on the bottom of the page. below the <body></html> and the site wouldn´t be to w3c standards. I would use <script type="text/javascript" src="menu.js"></script> <script type="text/javascript">show_menu();</script> As for security no real validation security should be done in javascript since anyone with a bit of time and a few plugins could bypass it. But here this code is harmless unless you include your admin menu in the "menu.js" file aswell. The less the hacker knows, the harder it is for him to hack it.
  17. would have done something like this aswell, but would have done it in C and made it multithreaded like this: not too resource friendly, might need an extra server for this.
  18. An activation code is a 3step thing, 1, Generate an unique id and store it in a database table 2, Send the user the activation link 3, Activate the users account when he/she access the activation page with the right id My guess is that you either need to code this on your own or hire someone to do it, or you might be lucky and find one using Google.
  19. You´re using mysql_error which isn´t available in mysqli you should use $mysql->error check http://www.php.net/manual/en/mysqli.error.php for more information
  20. It seems to be a javascript object, Initiated like this Drag.init(o, name, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper); no idea what the variables mean since there are no comments in the code.. but i bet you can figure it out, or if you give us more information we might be able to help you.
  21. Maybe you should clarify what it should be, then someone might even have a better idea on how to help you make the best out of it.
  22. echo "<td><tr><a href='submitanswer.php?correct?=yes&correctid=$correctid>I got this correct!</a></tr></td></table>"; should be echo "<td><tr><a href='submitanswer.php?correct?=yes&correctid=$correctid'>I got this correct!</a></tr></td></table>"; you are missing a ' after $correctid Edit: apparently i was to slow typing.. hehe
  23. You have 2 problems, 1. var outp = 0 should be var outp = '' or your script will return the string reversed and a extra 0 in the end 2. document.reals.outpt.value = outp should be document.rev.outpt.value = outp since there are no form with the name "reals"
  24. Have a look at timers/settimeout on http://www.w3schools.com/js/js_timing.asp
  25. echo "143191220"echo $contentecho " [...]"strlen; shoulw be echo "143191220"; echo $contentecho " [...]"strlen;
×
×
  • 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.