- Strength to Increase Rep
- +10
- Strength to Decrease Rep
- -2
- Upvotes Received
- 146
- Posts with Upvotes
- 131
- Upvoting Members
- 79
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 3
452 Posted Topics
Re: I think therefore I am not. Only when the mind is silent, I am. - Unknown | |
Re: Where do you set $id? Just print your query (echo $query;) and check if all data is in there. | |
Re: So is this an informative article or a question? :) If it's the first, thanks! And if it's the second, what's the question? ;) | |
Re: You are only passing 3 arguments to your `Get_All_Orderlines_Range()` function, while it needs 4. | |
Re: For example if you have two computers (that are on the same local area network!), the computer with the name "ComputerA" is running XAMPP, and you want to access this XAMPP server from the computer with the name "ComputerB", then here's what you do: On ComputerB, start up your web … | |
Re: This should work: <script> function randomStringToInput(clicked_element) { var self = $(clicked_element); var random_string = generateRandomString(10); $('input[name=emp]').val(random_string); self.remove(); } function generateRandomString(string_length) { var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var string = ''; for(var i = 0; i <= string_length; i++) { var rand = Math.round(Math.random() * (characters.length - 1)); var character = characters.substr(rand, … | |
Hello there. I'm at a point where I have to set up a continuous integration environment. I have contributed to projects using CI before, but I have never set it up. I roughly know what it is supposed to do, but I could definitely use some help. In my head … | |
Re: Can you please wrap your code in [ code ] tags for our convenience? ;) As for your question: If you store a password encrypted in your database, you will also have to retrieve it encrypted. So for example if you do this: [CODE]mysql_query('INSERT INTO table (username, password) VALUES ("' … | |
Re: Is it an idea to auto expire a session after x minutes? So for example when a user leaves your website and remains inactive for 10 minutes, after which he returns, your system detects he has been away too long and unsets the session? | |
Re: If you're paying for hosting and if you don't have access to your own MySQL config files, I think you should contact your hosting company and ask them for help. Most solutions that I find on Google (just copy/paste your error into the Google search bar and you'll find plenty) … | |
Re: For starters, I don't see any code where you are actually displaying something that you fetched from your database. | |
Re: It's also the amount of resources that need to be loaded and the complexity of the display. The larger the view that needs to be displayed, the slower it gets. The more content that needs to be downloaded, the slower it gets. At least, for as far as my knowledge … | |
Re: Something like this should be working: <?php $interests = array(); if (!empty($_POST['interests'])) { $interests = $_POST['interests']; } if ($interests) { echo 'Interests:<br>'; foreach ($interests as $i => $interest) { echo 'Interest: ' . $interest . '<br>'; } } else { echo 'No interests submitted.<br>'; } ?> <!DOCTYPE HTML> <html> <head> … | |
Re: On the first line of your file with the error, type `'use strict'` followed by a newline. That should fix it. Some stuff in Javascript is only supported if you use [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). | |
Re: You want to know the value of the `style` attributes? Or? You'd have to write a regex PHP parser for that, or maybe you can do some nice stuff parsing it using Javascript? ![]() | |
Re: You could place your functions inside an anonymous functions like so: (function($) { $('#fancy_jquery_element').doFancyStuff(); })(jQuery); | |
It's cool that you are constantly developing Daniweb, but I feel that it's time to mention some things that I feel are missing since the last overhaul: 1. Can't easily jump to subforums (like "PHP") any more. This isn't really a problem, because I used to just open the "Web … | |
Re: Why don't you use a `JOIN`? :) | |
Re: Depends on what you want to achieve. You don't need to reinvent the wheel but building something yourself from scratch gives you important insights, insights that you will probably need if you want to be a web developer. As soon as you find out how you can make a wheel … ![]() | |
Re: I've cleared up some code for you as it seems to be in random order. Try this out and let us know what the debug messages say, as your code does not appear to be wrong at first glance. <input type="file" name="ft_img" style="margin: 0 !important;"><input type="file" name="download" style="margin: 0 !important;"> … | |
Re: > "Have you tried turning it off and on again?" Kidding, but seriously, if this is a new installation, just reinstall and it will probably fix your problems. | |
Re: Nice one! I think I've learned pretty much all I know about HTML and CSS using that website. | |
Re: Could you formulate that as a full-scentence question? Maybe some context? | |
Re: If you mean the *name* attribute of a meta tag: that's to indicate what the meta tag is indicating ;). | |
Re: Your code with comment: $myarray = array(); $myarray['numbers']=$_POST['numbers']; foreach($myarray as $num){ $numbers=$num; // You aren't creating an array here. You are giving $numbers the value of the CURRENT number in the loop. PLUS your numbers are stored in $myarray['numbers'], not in $myarray ;). } $unique = array_unique($numbers); $output=implode("<br />",$unique); What … | |
Re: Well first thing that comes to mind: did you check if `src/autoload.php` points at something that exists from the directory you're in? :p And do you have permission to read it? | |
Re: What exactly is not working? Are you getting an error? What are you trying to achieve? | |
Re: > nor that every non OOP PHP project isn't great (wow, I hope that triple negative phrase makes sense) +1 ![]() | |
Re: You mean a thesis about the web? Or a thesis built with the web? In either case, I think you will need to come up with at least SOME kind of idea about which you could ask us feedback and/or questions to elaborate on, because we cannot invent the wheel … | |
Re: Are you sure nothing else is running on those ports? I usually get this kind of problems when I'm running Skype or League of Legends (which uses Punkbuster, which operates on the same port) while starting Apache. (Looks like a port problem, check this line: **5:18:22 PM [Apache] Port 443 … | |
Re: Nope. One request will be handled with each call. You will only run into problems if for example request A changes a session var that request B needs as well. | |
Re: I think something like this should work: document.getElementById('submit').click(); But why the hell are you creating a countdown redirect if nothing actually happens during the countdown? :p | |
Re: So if there is more than one occurence of the same product with the same percentage, you don't want it listed? | |
Re: Well, a quick search on Google seems to result in an answer to your question. See http://stackoverflow.com/questions/3366895/group-by-month-and-year-in-mysql ![]() | |
Re: Well, if you submit a form, the data doesn't just become available in regular variables (like `$id`), it becomes available in a special var. Depending on your form's *method* (get or post), it becomes available in `$_GET` or `$_POST`. Seeing that your form's method is *post*, your data would be … ![]() | |
Re: What error does the browser say is occuring? | |
![]() | Re: > You can't specify target table 'telefonisti_podaci' for update in FROM claus This looks like a non-default MySQL error. Maybe it's a custom error triggered by your CustomQuery function? If so, then you could check that function to see when and thus why it is thrown/given. ![]() |
Re: Well, you can't "just" pass it to PHP. You will need to work with it in Javascript. If you need it in PHP, maybe you shouldn't be handling this stuff with AJAX at all? ![]() | |
Re: If you know how to do one AJAX request, what is it that prevents you from doing two? :) Any code that you have written that we can check for errors or give suggestions on? | |
Re: Are you sure you are asking about PHP? Because *creating* a dropdown menu is usually done using CSS. *Filling* it is what you can use PHP for. So which are you asking about? :) | |
Re: I don't think there is a way for us to know what the author of that script meant with `$base_path`. I think you should look into the rest of the script, see where it is used and try to determine in that way what its value should be. | |
Re: Well, there isn't any code in there to display data, so what did you expect? ;) Did you post all of your code though? Seems like some is missing. | |
Re: It is a **notice**. This is not a serious warning. It just tells you that you are using a variable that has not been defined yet. Two possible fixes: 1. Turn off the reporting of notices (e.g. `error_reporting(E_ALL & ~E_NOTICE);` on the first line of your first script). 2. Instead … | |
Re: Have you checked and validated the values of your `$start` and `$per_page` variables? **On a side note** Also, your query isn't secure. You should escape user input in queries using [mysql_real_escape_string()](http://php.net/manual/en/function.mysql-real-escape-string.php). Better yet, you should use [mysqli](http://php.net/manual/en/book.mysqli.php), because the "regular" mysql functions are deprecated. | |
Re: You have to be more specific. What values do you want to hide? Have you written any code yet? | |
Re: You can check whether the correct file (the one that defines the function) has been included by executing `print_r(get_included_files()); exit();` the line before the error. | |
Re: Well, usually an update query takes longer than a select query because an update query locks the database where a select query does not. Therefore, if you can avoid an update query by running a select query, it might do good to your app's performance. You will need to have … | |
Re: Change your HTML: <div class="form-group"> <label class="col-xs-3 control-label">What is your full legal name?</label> <div class="col-xs-5"> <p id="user_name_container">Hello <span id="user_name"></span>, nice to meet you!</p> <input type="text" class="form-control" name="name" /> </div> </div> Then your Javascript (using jQuery): $('input[name=name]').keyup(function() { if ($(this).val()) { $('p#user_name_container').show(); $('span#user_name').html($(this).val()); } else { $('p#user_name_container').hide(); } }); | |
Re: The PDOStatement object does not have an `exec()` method; that is PDO's own method (http://php.net/manual/en/pdo.exec.php). To execute a PDO statement, you need to use `execute()` instead of `exec()` (http://php.net/manual/en/pdostatement.execute.php). I understand the confusion :). |
The End.