RussellReal
Members-
Posts
1,773 -
Joined
-
Last visited
Everything posted by RussellReal
-
maybe use \r\n because \r is simply a carriage return which is mostly depreciated.. and also instead of ['radio'] for POST maybe use ['chi'] lol
-
you could just do.. $timeLeft = (strtotime($subEnd) - time()); $mins = floor($timeLeft / 60); $secs = $timeLeft - ($mins * 60); $hours = floor($mins / 60); $mins = $mins - ($hours * 60); $days = floor($hours / 24); $hours = $hours - ($days * 24); echo "You have {$days} days, {$hours} hours, {$mins} minutes and {$secs} seconds remaining of your subscription";
-
I'm sorry to sound condescending.. but there should be absolutely NO reason to have 7000 lines of code in 1 file... also.. what you'd want to do is create a div somewhere in the body.. set it to display: none; in the css.. and make it position: absolute; and then set up mouse over events and use the target element's (the link's) offsetX and offsetY and width attributes to judge where to place the floating div.. and in the function set the floating div to display: block; set the top and left attributes to the correct pixel coordinates, and then make sure u set the width and the height coz position: absolute will rip it off the page and remove its width and height (last time I checked anyway) good luck .. its fairly easy actually, you should be able to manage it
-
its merely a notice.. do this: if (@$_POST[$i]) { }
-
str_replace doesn't replace strings in the variables that you pass thru to it.. meaning if you pass in $time as the time variable.. inside the if statement or anywhere else after the call to str_replace, it will still be the same, just str_replace replaces the string after the replacements.. and I did the replace because what if you don't have a time on it what if it just shows 0000-00-00 then you're testing for 0000-00-00 00:00 and it will be false for 0000-00-00 without the 00:00
-
Need help with contact form/e-mailing
RussellReal replied to groogruxking40's topic in PHP Coding Help
oh.. sorry.. in my example I forgot trhe subject arguement -
Need help with contact form/e-mailing
RussellReal replied to groogruxking40's topic in PHP Coding Help
mail('YourEmail@whatever.com',print_r($_REQUEST,true),'From: Site Site Stuff <whatever@w.com>'); -
because as soon as javascript encounters an error.. it will try and stop javascript from running properly for whatever reason.. in whatever your onMouseOver function is put try { // all your code here from the function } catch (e) { } and when it hits an error, it will go to the catch and not throw an error.. coz when theres no subcategories it hits an error somewhere, so putting it in a try catch statement should solve ur problems
-
the font parameter needs to be a .ttf file or relative path to it.. you can't specify 'Arial'
-
it will execute the file.. uhm.. it won't load GUI or interface.. not API sorry that was the wrong acronym
-
com objects, or exec.. but exec won't actually load up any api it will start the program and see wat happens lol
-
[SOLVED] Removing a forward-slash from the tail-end of an URL
RussellReal replied to ArizonaJohn's topic in PHP Coding Help
$remove_array = array('http://www.', 'http://', 'https://', 'https://www.', 'www.'); $site = str_replace($remove_array, "", $_POST['site']); $site = preg_replace('/\/$/','',$site); -
I tried reading this 3 times fast and its like a brain twister.. lol
-
shared hosting actually doesn't usually ALLOW php.ini modification
-
I'm teaching myself PHP. Where to start...
RussellReal replied to MietzeCat's topic in Miscellaneous
lol! DUH! coz then you could mess up their try it! server -
you can echo a true or false value.. to javascript.. like this echo "<script type='text/javascript'> awaitingPayment = {$awaitingPayment}; </script>"; and in the enter button put onClick="checkForPayment()" and then.. function checkForPayment() { if (awaitingPayment) { // open window here } // do whatever your old onClick function did.. }
-
I find it also important to note, if you use exec in a php script which is executed thru the command line, you'll recieve the output in the cmd window, but if you want to use exec anywhere like on ur web server, you'd want to use backticks or like thorpe said, specify the output variable. backticks r ` ` which is shorthand for exec and returns the value $ping = `ping phpfreaks.com`;
-
I'm not quite sure how you'd do this in perl.. but.. echo some javascript which will open up the pop up window
-
damn I want that domain name
-
don't send the price in the request.. send the item id number.. then you pull that id from the database, and get the price from teh database, if you've secured your sql theres no way he/she can alter those values, so you can definately rely on them..
-
I'm sure you include a 'config.php' or something.. well.. inside the config.php put a title array $titles = array(); $titles['map'] = array( 'local' => 'Your local bla bla search!', 'blar' => 'blar blar blar' ); $titles['index'] = array( ); this way for map.php you can echo for whatever flags are passed, (you handle that with your php code) and pull the correct title.. dw if two array elements conflict with one another, you can just let them overwrite eachother, you'll still get a title.
-
Parsing a document into a particular format.
RussellReal replied to mattal999's topic in PHP Coding Help
Thats my helper attitude, atleast I'm here helping and not talking about other people..