202 Posted Topics

Member Avatar for mmcdonald

Hi all, My local development project has been working perfectly for...6 days now? I haven't even touched the login/register page for 2 days+ yet all of a sudden all JavaScript has seized up! I've been using the page to login all day and only now has it stopped working. I'm …

Member Avatar for mmcdonald
0
183
Member Avatar for old_apache

I'm not too sure here. Could this be down to deprecation causing a stray curly brace? It would be really helpful to see the code.

Member Avatar for old_apache
0
245
Member Avatar for keishawndavid

First of all read the rules. Nothing is urgent. Secondly, what do you wish to validate? That surname is just characters, age is just digits, that all fields have more than 2 characters? Need more information.

Member Avatar for Zagga
-3
205
Member Avatar for mmcdonald

Hey all, I'm trying to make a link outside of the nav-tabs class, specifically in a paragraph, that changes to another tab on the same page. Granted that I know this requires JS and that I know nothing of JS (Another book i ordered this morning :) ) here is …

Member Avatar for mmcdonald
0
230
Member Avatar for cguan_77

First Google search returned [this](http://www.javascripter.net/faq/searchin.htm). It has the source and a working example. Let me know if it doesn't suit your needs.

Member Avatar for crescendo
0
191
Member Avatar for mmcdonald

Good'ay all, I'm looking for a method of saving a users session (I.e. automatically logging them back into the same page they logged out from). But I have a few things to consider: 1) Will they logout or will they just close the browser? This means I can't add the …

Member Avatar for mmcdonald
0
178
Member Avatar for ealwaqfi

I don't know why you need to know this, but if it's for network engineering/administration then STOP. Don't touch a network if you don't know anything about network hehe If it's for training then I'd recommend the foundation certification CompTIA Network+ If it's for a one off thing and you …

Member Avatar for ealwaqfi
0
231
Member Avatar for Hal5000

See if [this](http://unattended.sourceforge.net/installers.php) helps you. It's a good guide.

Member Avatar for Hal5000
0
123
Member Avatar for mmcdonald

There has got to be a better way of doing this. First of all pay no attention to the lack of validation and error checking. I just want the core of the script to work first. Also, Block 1 and Block 2 execute, Block 3 does not. Whats the best …

Member Avatar for mmcdonald
0
1K
Member Avatar for mmcdonald

Now this one always bugs me! I'm dealing with a lot of checks that result in redirection dependant on certain results. **Example:** 1) If session exists and users lands on login.php they are pointed to index.php. 2) When landing on any page after loggining in, if their account isn't complete …

Member Avatar for Atli
0
478
Member Avatar for joshl_1995

If this was my project I would store their username and a unix time stamp in a `queries` table. I would then execute a cronjob every few minutes to count the number of times the users username appears in the `queries` table. If the cronjob count exceeded 100 I would …

Member Avatar for joshl_1995
0
395
Member Avatar for ruby_ms

Welcome Ruby. This is the most valuable resource I've ever found online and I've learnt a lot; I'm sure you will too :)

Member Avatar for JorgeM
0
50
Member Avatar for qstar2010

I would see if each field has content and if they do I would store it as a variable and call on that variable within a standard MySQLi `UPDATE` query. Probably not the best method but it would work and it's dead simple? I have of course just assumed that …

Member Avatar for Zagga
0
123
Member Avatar for ms1655516
Member Avatar for nelson mark

Okay first of all you need a foundation certification - stick to vendor certifications (Those provided by vendors in the IT industry such as Cisco and Microsoft. **Get these first (only if you don't have foundation knowledge):** - CompTIA A+ - CompTIA Network+ - ITIL Foundation (Information Technology Infrastructure Library) …

Member Avatar for mmcdonald
0
144
Member Avatar for mmcdonald

Kill me now! I have two tables in my DB. One has a list of certifications and one has a list of exam boards. I need to list the exam boards in a foreach loop giving each one an accordion. The certifications must be listed under their correct exam board. …

Member Avatar for mmcdonald
0
847
Member Avatar for mmcdonald

Hi all, I've been playing around with this for 30 odd minutes now and basically been making a right fool of myself... I want to make a function called `userInfo()` that uses the users email address, stored in `$_SESSION['auth'];`, to get any information required from sql. I'm using **MySQLi** and …

Member Avatar for mmcdonald
0
290
Member Avatar for mmcdonald

Hi all, I'm using crontab on Ubuntu 10.04 and I have had 7 tasks running smoothly for about 6 months. I've now created a new script but for some frustrating reason it will be execute. It's a small task that needs to run every two minutes. The issue doesn't reside …

Member Avatar for CimmerianX
0
239
Member Avatar for mmcdonald

My form won't submit... nothing happens when clicking the submit button. Any ideas? N.B. I am knackered, I've been up 26 hours :/ Thanks in advance for any suggestions! <form action="contact_me.php" method="post" class="contact-form" id="contactForm"> <div class="controls controls-row"> <div class="control-group span6"> <input class="span12" name="name" placeholder="your name" type="text" /> </div> <div class="control-group …

Member Avatar for mmcdonald
0
260
Member Avatar for mmcdonald

Hi all, I have a website that allows users to vote once every hour and I've run into a weird issue. When a user votes for a listing their IP is collected and stored along with the time of the vote. An hour later they are able to vote again. …

Member Avatar for Atli
0
153
Member Avatar for svkkotla
Re: PHP

If you're on about generating a random number then you probably want `rand()` Example: <?php print rand() . "<br>"; //generates and prints a random number print rand(10, 30); //generates and prints a random number between 10 and 30 (10 and 30 ARE included) print rand(1, 1000000); //generates and prints a …

Member Avatar for AARTI SHRIVAS
-1
82
Member Avatar for mmcdonald

Hey all, cant get this very very simple query to work but I have been going 26 hours and my thoughts are numb. Please assist? I have error reporting on and request mysql errors but I'm getting nothing. Contents of config.php $db_host = 'localhost'; //IP of database server (most likely …

Member Avatar for JorgeM
0
141
Member Avatar for mmcdonald

Hi all, I've setup a simple cart where users choose how much they would like to deposit as virtual currency using the PayPal sandbox - I've tested it and it works great. So far I've got to successful money transfers between accounts and notifications. However what I can't figure out …

Member Avatar for diafol
0
296
Member Avatar for mmcdonald

Hi all, I have a very nasty issue here where SQL values are changing but I haven't been hacked because the changes are just too abnormal. People vote for their servers and every so often the top few servers values roll back. For example at 03:00 a server has 66 …

Member Avatar for diafol
0
179
Member Avatar for mmcdonald

Would you say its time to increase the RAM on this lil machine or is it okay? Could you please explain this output? free -m -s 5 total used free shared buffers cached Mem: 496 439 57 0 20 250 -/+ buffers/cache: 167 328 Swap: 511 5 506 Thanks, M

Member Avatar for mmcdonald
0
164
Member Avatar for shirani21

On submission just see if the checkbox isset and if so execute a standard SQL query? Also this: ***ny changes asap*** is really rude and arrogant. people help eachother here in their own free will - you're just registering for free help with takes the piss out of this awesome …

Member Avatar for ratanji
0
923
Member Avatar for pavitrakannan

Have you changed user privileges? If not your username should be 'root' an not'local host'. If you are using 'local host' for whatever reason that maybe you shouldnt have that space i.e. 'localhost' rather than 'local host'. Local development privileges by default are 'root' as your username and '' as …

Member Avatar for Smeagel13
0
258
Member Avatar for harsha.netpem

You can do this just using PHP and SQL but no one will just give you the code. I can recommend this link: http://www.htmlgoodies.com/beyond/php/article.php/3855686/PHP-Mailer-Script-Step-by-Step.htm It takes you through creating a mailer script step by step explaining every step of the way. You need to connect to your SMTP server and …

Member Avatar for pritaeas
0
163
Member Avatar for <M/>

I don't suppose your mail server has changed or has an error? I know you put gmail above but that might just be to hide your domain :) Also `if (isset($_REQUEST['email']))` should not be used now as it has compatability issues with IE and possibly other browsers. Instead use `if …

Member Avatar for mmcdonald
0
374
Member Avatar for scholarwithfire

You'reDon't you think you're better off storing the values from form one and when it's submitted reloading the page with form 2? Perhaps by setting a session or rewriting the URL to `domain.com/page.php?form=2` What you have right now will not work as your isset is within another isset at Minitauros …

Member Avatar for mmcdonald
0
288
Member Avatar for MWEB

I use this code to search my DB. When the search field is submitted you are directed to mydomain.com/search.php?search=search_term. I then get the search term using `$_GET['search']` and query my SQL database using: id like '%".$txtsearch."%' OR server_name like '%".$txtsearch."%' OR ip like '%".$txtsearch."%' or administrator like '%".$txtsearch."%' OR url …

Member Avatar for MWEB
0
218
Member Avatar for mmcdonald

My crontab states: PATH=/var/www 00 00 * * * php -q /tasks/script1.php */5 * * * * php -q /cycle/script2.php */1 * * * * php -q /tasks/script3.php script 1 doesnt run, but I need to to run every midnight script 2 doesnt run but works fine when executed manually. …

Member Avatar for ammonsutherland
0
208
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
217
Member Avatar for yeeitsneo

instead of value=<?php echo $name;?>> use: value=&quot;<?php echo $name;?>&quot; as `&quote` allows you to use two quotation marks in the diffent languages HTML and PHP. Also you have mots of typos like here: ` value=<?php echo $name;?>>` toy have two `>` at the end. Didnt manage to geta good looka …

Member Avatar for mmcdonald
0
301
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 momonq1990

Are you using a stylesheet too? If so check you haven't got it set in your stylesheet. If that still doesn't work see if you have any other classes set that could have a border? Try refreshing your cache? Is the website hosted on a CDN? That will have a …

Member Avatar for mmcdonald
0
182
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

The End.