n3r0x
Members-
Posts
33 -
Joined
-
Last visited
Everything posted by n3r0x
-
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..
-
<?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?
-
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..
-
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; }
-
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.
-
How to get a PHP Search form to suggest alternatives in MySQL database?
n3r0x replied to mattc_uk's topic in Javascript Help
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..=) -
How to get a PHP Search form to suggest alternatives in MySQL database?
n3r0x replied to mattc_uk's topic in Javascript Help
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). -
Would anyone be able to help me make a 'User's online counter'.
n3r0x replied to FredFrothen's topic in PHP Coding Help
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. -
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..
-
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..
-
I always use -R for empty dirs.. files in them are created with the same owner by apache..
-
try chown -R kevin:apache games for more information abut chown http://nersp.nerdc.ufl.edu/~dicke3/nerspcs/chown.html
-
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)
-
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
-
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() { ......... }
-
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.
-
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.
-
how to send an activation email to a new registered person
n3r0x replied to bindiya's topic in PHP Coding Help
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. -
I am getting a blank page but expecting a success message
n3r0x replied to CyberShot's topic in PHP Coding Help
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 -
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.
-
making this figure reload without whole page refresh?
n3r0x replied to sphinx's topic in Javascript Help
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. -
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
-
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"
-
Have a look at timers/settimeout on http://www.w3schools.com/js/js_timing.asp
-
unexpected T_ECHO, expecting ',' or ';' Error help
n3r0x replied to slayer__'s topic in PHP Coding Help
echo "143191220"echo $contentecho " [...]"strlen; shoulw be echo "143191220"; echo $contentecho " [...]"strlen;