68 Discussion / Question Topics

Remove Filter
Member Avatar for mmcdonald

Hey all, I am currently using the following to echo the 1st Current_month: echo "1st '.date('F').'."; So that would say, for example, 1st October. What would I need to do to echo the next month? In this case 'November'? Thanks for any help!

Member Avatar for mmcdonald
0
114
Member Avatar for mmcdonald

Whats the best way to collect all the users where `server_id = X` Table: id server_id user 1 2761 adam 2 2567 tom 3 2761 luke 4 2761 mike 5 2346 lucy So what should I do to echo all users where `server_id = 2761`? What output should look like... …

Member Avatar for diafol
0
147
Member Avatar for mmcdonald

This could be a PHP issue or a linux issue. My form uses the following code to allow users to upload their banner and worked fine on my old server: if ($_FILES["banner"]["name"]!="") { $folder_path = "images/server_banners/"; $myfileext=substr($_FILES["banner"]["name"], - 4,4); $banner_file_path=$username."-".$server_id.$myfileext; $file_path = $folder_path.$banner_file_path; if (file_exists($file_path)) { unlink($file_path); move_uploaded_file($_FILES["banner"]["tmp_name"],$file_path); } else …

Member Avatar for radow
0
188
Member Avatar for mmcdonald

Not sure if this is the right place, so forgive me if it isn't. There's a few of us building a huge online portal that contains IT training courses in Cisco, CompTIA, Microsoft and ITIL certifications. We're offering it at the small cost of £5.00/month full access to IT professionals …

Member Avatar for mmcdonald
0
231
Member Avatar for mmcdonald

Hi all, I'm trying to use add-on icons for my form filds (see very bottom: http://twitter.github.com/bootstrap/base-css.html#icons) The thing is, add-on works great on my page but won't work in my nav. Any ideas? My code: <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container" style="width: auto"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span …

Member Avatar for james chaco
0
271
Member Avatar for mmcdonald

I have three scripts running under crontab and theyre executing perfectly (see the log below): Oct 9 10:40:01 servercharlie CRON[29850]: (root) CMD (php -q /var/www/folder/script-3.php) Oct 9 10:41:01 servercharlie CRON[29861]: (root) CMD (php -q /var/www/tasks/script-1.php) Oct 9 10:42:01 servercharlie CRON[29867]: (root) CMD (php -q /var/www/tasks/script-1.php) Oct 9 10:43:01 servercharlie CRON[29873]: …

Member Avatar for pritaeas
0
235
Member Avatar for mmcdonald

Hey all. All I need is to collect every `id` from `servers` where `active ='1'` and then cycle the results in a loop right until the end for each individual id. (I've written this on daniweb, might be typo's or errors. I'm not interested in code errors it's the process …

Member Avatar for cereal
0
216
Member Avatar for mmcdonald

Hi all, I have a menu on the left side of my design. When the user scrolls and the object hits the top of the screen I want it to float there. I have the float working fine now, but how can I say "Only float when you meet the …

Member Avatar for mmcdonald
0
221
Member Avatar for mmcdonald

I cant use a cron for this task as the script should always be running. I have a loop that does the following: 1) Gets a SQL row 2) Runs the values through some functions 3) stores new values 4) gets the next row and repeats This script has to …

Member Avatar for mmcdonald
0
423
Member Avatar for mmcdonald

Hey all, I have a folder called 'templates' in my root dir (../templates/). When a PHP form is submitted I want to copy a folder out of 'templates' called 'template1' (../templates/template1) and paste it into the root directory but with the new name of 'username123'. How can I copy, rename …

Member Avatar for mmcdonald
0
416
Member Avatar for mmcdonald

I'm hoping not to post much code (to do this myself) but I'm having issues in figuring out why a mysql_query isn't be executed. This is the mysql_query: mysql_query("UPDATE `servers` SET `status` = 'online.png', `cur_players` = '".$online_count."', `max_players` = '".$max_slots."', `software` = '".$software."', `plugins` = '".$plugins2."', `players` = '".$players2."', `version` …

Member Avatar for mmcdonald
0
276
Member Avatar for mmcdonald

In a SQL field I have this: GroupManager 2.0 (2.9.3) (Phoenix)<br/>MultiInv 3.1.3<br/>Ptweaks 4.2<br/>WorldEdit 1232-0bc9369 Which spits out this: GroupManager 2.0 (2.9.3) (Phoenix) MultiInv 3.1.3 Ptweaks 4.2 WorldEdit 1232-0bc9369 Multiverse-NetherPortals 2.4-b530 How can I make it so it's two text columns like this when I echo it onto a page: GroupManager …

Member Avatar for LastMitch
0
118
Member Avatar for mmcdonald

$plugins = $Server->Get('plugins'); echo "<br /><br /><b>Plugins</b><br> "; foreach($plugins as $plugin) { echo $plugin."<br>"; } That snippet above spits out a long list of plugins from a server. How can I store each plugin listed into SQL so that its stored as '$plugin[0]<br/>$plugin[1]<br/>$plugin[2]<br/>' and so on so that when I …

Member Avatar for mmcdonald
0
145
Member Avatar for mmcdonald

Sorry people but I'm really struggling with this and I don't know why... but still. I have a stored unix timestamp. [a] I have the current timestamp not in unix format (YYYY-MM-DD HH:MM:SS) [b] I need to: 1) convert the current timestamp [b] into a unix timestamp 2) I need …

Member Avatar for leviathan185
0
275
Member Avatar for mmcdonald

Hi all, I have two dates: 1 = $last_check = YYYY-MM-DD HH:MM:SS (A SQL value) 2 = $datetime = YYYY-MM-DD HH:MM:SS (Called using PHP) How can I take away 1 from 2 and convert the minutes and seconds left over into seconds? Basically I'm running an uptime counter script that …

Member Avatar for diafol
0
271
Member Avatar for mmcdonald

Okay so here it is. The code below is my player counter for a game called Minecraft. It connects to a server and brings back 2 values. 1) The number of current online players and 2) the maximum number of player slots. Then it stores these two variables in to …

Member Avatar for pritaeas
0
195
Member Avatar for mmcdonald

Hi all, I have an issue with a loop as it contains communication between my server and a remote one. If the remote server has an issue then it takes forever to complete the loop and the execution times out. What it currently is: $servers = mysql_query("SELECT * FROM server_tab;e …

Member Avatar for brandonrunyon
0
218
Member Avatar for mmcdonald

Hey all, This website is a directory and the problem is authenticating users to edit a server, even after they've logged in. The idea is to stop any SQL mix-ups due to my weak code (I'm learning PHP). When they click 'Edit' next to the server after logging in they …

Member Avatar for mmcdonald
0
203

The End.