- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 37
- Posts with Upvotes
- 30
- Upvoting Members
- 20
- Downvotes Received
- 15
- Posts with Downvotes
- 11
- Downvoting Members
- 11
My name is Samuel, I am a website developer and Linux systems administrator from the United Kingdom.
- Interests
- Website Development, Systems Administration
- PC Specs
- Macbook Air, 4GB RAM, 128GB SSD, 1.3GHz Intel i5 Processor
126 Posted Topics
Re: It's $con first. So where you have $sql, $con etc, change it to $con, $sql | |
Re: I would've thought Java since just about every OS out there can get Java. | |
Re: Have you rebooted? Do you backup via time machine? Have you tried force quitting "Dock" and "Finder" through terminal (`$ killall -9 Finder && killall -9 Dock`)? | |
![]() | Re: @Dani CodeIgniter booo!!!!! |
Re: Well, let's think of this in a literal manner. Let's say you have an active directory controller setup on your network (this is _very_ common in offices)... that would use quite a bit of bandwidth INTERNALLY for your router to manage. This could affect your outbound connections because your router … | |
![]() | Re: I prefer Mavericks and sadly can't go back. :( |
Re: Did you check to see if `<input type="xxx" name="SOMEKEY">` matches up with `$_POST['SOMEKEY']`? | |
Re: Well, you're clearly a noob to this, so I recommend [Ubuntu](http://ubuntu.com/). | |
Re: Markdown is usually a great option. Here's an example of how it could look on the frontend: [Frontend](http://dillinger.io/) | |
Re: Honestly, if you want it to be clean; add something like this: <!-- HTML --> <div class="wpb_wrapper"> <span id="login-text">Log In</span> <div class="login" id="theme-my-login1"> ... </div> </div> // JS $("#login-text").text("Something..."); // or $("#login-text").html("Something..."); // vanilla JS would be this // document.getElementById("login-text").innerHTML = "Something..."; This is just cleaner IMO, but whatever floats … | |
Re: <getting this removed, didn't realise you had the answer already> | |
Re: What @diafol said. Just note that we're here to help if you need support with jQuery/AJAX stuff. | |
Re: I sure hope to God that the code you pasted above isn't actually like that in your editor or even on your hard drive. Please tell me that you actually indent. | |
Re: It seems like @broj1 has got what you need, though I am not 100% sure on what it is you need done (I'm tired). If it's not what you want just reply and more examples and help will come. | |
![]() | Re: If you're not using a framework, then you should know exactly what `Registry` is. Search through your files for `class Registry`, this should help you find out what exactly `Registry` is. If you're using PHPStorm, you can option/alt+click on `Registry` to get straight into the code for the class. |
Re: @cereal — those are disabled in a lot of browsers for some reason. It's weird. ![]() | |
Hello. As you may know already, if you've visited the PHP section, certain users ask certain questions over and over; repeating themselves and not learning a single thing. I'd love it if DaniWeb could start silencing these users if they ask the same question more than once and don't listen. … ![]() | |
Re: If you're still learning PHP, look into [PDO](http://php.net/pdo). Here is the code, rewritten with PDO. <?php error_reporting(E_ALL); # DISABLE THIS WHEN IN PRODUCTION FOR THE LOVE OF GOD ini_set('display_errors', '1'); # DISABLE THIS WHEN IN PRODUCTION FOR THE LOVE OF GOD $db = new PDO('mysql:host=localhost;port=3306;dbname=roblox', 'user', 'pass'); $sql = "SELECT … | |
Re: The code is quite messy though I'd be interesting in seeing more. Could you share your database structure so we can see datatypes etc? | |
Re: I'm not going to help here (a crap load to read, keep reading), but for anyone that does want to help; here is the `./app/Mage.php` file: [clicky](http://freegento.com/doc/d8/de8/_mage_8php-source.html). | |
Re: Just a tip, you might want to lookup how to properly name variables. :P `$thevalue` would confuse a crapload of developers for a moment or two if they looked at your code. I'd try something like `$customer`. | |
Re: Honestly, it's pretty pointless. I'd say that it's best to just ban those that swear if it means that much. I personally don't filter any profanity on any of my websites because I believe in a free internet. I silence those that swear to offend. | |
Re: Try asking here: https://www.daniweb.com/web-development/web-design-html-and-css/15 This is the PHP section; as in, the backend. You're talking about frontend stuff — which belongs in the other section. ![]() | |
Re: You might want to start posting messages with proper English (even if it's not your first language). Saying "pls" and "tanx" does not usually suffice for many places. | |
Re: Well, you could probably learn Laravel from [Laracasts](https://6t9.me/laracasts) and then build upon it to get a full CMS running. | |
Re: `session_start();` should always be the first thing in your script. <?php session_start(); ?> <html> <head>...</head> <body>...</body> </html> Like that. Same for PHP-only files. ![]() | |
Re: Make a single control panel, and when they login, do some CRUD on their information. There are thousands of tutorials out there, so I'll leve that up to you. Topics you might need, some linking to documentation for a learning resource: * Authentication in PHP * PHP [Sessions](https://6t9.me/phpsessions) and [Cookies](https://6t9.me/phpcookies) … ![]() | |
Re: What software are you using? Is it a samba server? | |
Re: The way I do it is I do this: `<a href="#" data-id="SOME DATABASE ID" rel="delete_modal">Delete</a>` then I link that, using Javascript, to my [Bootstrap](https://6t9.me/bootstrap) modal which pops up with something like "Are you sure you want to delete this?" — which has two buttons (Yes, cancel). "Yes" would be a link … | |
![]() | Re: I've started to use it; it's a little bit weird to get started with (since, as stated above, it's just not as simple)... but I think it might be a little bit worth it. I am still using 4.2.x for my sites, since that is the version I am most … |
Re: As @JorgeM said; and also some servers have requests blocked if they don't contain a valid domain name in the headers etc. | |
Re: Could be that there is no `index.<xyz>` file or that you need to `chmod` your files. Here are some tutorials for those: https://6t9.me/r3hLgz https://6t9.me/acRfTO | |
Re: Use a `float` or `double`; changes are that it will store full values (3, 6, 9, 10, 11, 13) with a `.00` appended to it; but you should be able to just do a quick replacement in code for that. | |
Re: Just for debugging... try running a `die($_POST);` on page load so we can see what happens after form submission. Steps: 1: Load up the page 2: Add `die($_POST);` to the code 3: Submit the form (it should be open if you loaded the page earlier as instructed) 4: Post output … | |
Re: To add on to @diafol's comment: Might be a good idea to change the port if you use IIS. | |
Re: Seeing live results wouldn't be worth anything IMO. I'd rather just have the final results. | |
Re: I sure as hell won't read 1,500+ lines of messy code. Give us what is broken or don't get help. ![]() | |
Hello. I am getting into app development and started with a calculator. The input is not equal to the output in any size I set. Here are some screenshots: Input: [Screenshot](https://www.dropbox.com/s/otncvnpfotfgetu/Screenshot%202015-02-05%2014.44.43.png?dl=0) Output: [Screenshot](https://www.dropbox.com/s/360u5iastr69hgq/Screenshot%202015-02-05%2014.45.11.png?dl=0) And finally, here is the size thing: [Screenshot](https://www.dropbox.com/s/23aln2fzovpv72y/Screenshot%202015-02-05%2014.46.00.png?dl=0). | |
Hey guys. I've been putting some really good thought into this and I can't seem to figure out a good solution. What would be a logical way or sorting the following by their "number" value. $someArray = [ [ "country" => "US", "number" => 552 ], [ "country" => "GB", … | |
Re: You'd be better off storing it as a cookie, rather than tracking IP's for the reasons above ^^. Also, as @cereal said; recaptcha is nice... give NoCaptcha a try too. Or even, give my custom captcha script a try! https://github.com/matrixdevuk/SweatyCaptcha | |
Re: Jesus, you've been asking questions since 2011 and you still don't understand basics. *moderators, feel free to delete this reply if you want, but this just makes my stomach ache* | |
Re: To add to what JoyBh said, I'd like to share the correction. ;) explode('-', '2014-12-20'); // returns Array ( [0] => "2014", [1] => "12", [2] => "20" ) Syntax is explode(*[delimiter]*, [string]); | |
Re: If you want to develop without worries, I always recommend [Cloud9 IDE](https://c9.io/). It's all in the cloud and very easy to use. :) | |
Re: Hopefully this small example will help: $wantsCola = !empty($_POST['ColaCheckbox']); Basically, the variable $wantsCola is true if checked; false if not. Since `empty(mixed)` returns a boolean (true/false) — if we inverse it with the `!`, we'll get whether it is checked or not. Here is that, in a longer way: $wantsCola = … | |
So, I signed up to the mailing list. Worst idea ever. Just spent forever deleting emails. When DaniWeb says something will happen a lot; they're serious. 300+ emails from DaniWeb. The fun is real. ONE DAY. ONE FREAKING DAY. Still quite funny though. ;D |
The End.