- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 6
- Posts with Upvotes
- 6
- Upvoting Members
- 6
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
32 Posted Topics
Re: Hmm... It's weird how you've managed to arrange the code... First of all you have a function in a function. Second, I don't remember using the switch statement that way... The variables namings are all wrong (for example.... getNum() is not returning you a number but a string). I don't … | |
Re: First of all, I don't think you can use `$this->load->model()` having an array as parameter. You can't do a `$this->load->model(array('Mediatutorialaccount'));` Secondly, you have `$data['sub_data']` which is an array, but you want to echo it. You must use `print_r()`, or iterate the array. | |
Re: Just wanted to say... wow... Kudos for the title of your problem. | |
Re: Well... it has to change everything, because you can't call jquery.dataTables.min.js before calling jquery.js. If you have Developer Tools installed on your browser look at the Console tab and view if any errors appear. | |
Re: Your query is all wrong: you are asking the database to update, not a table but a row. The update query should be something like: 'UPDATE atable SET atable.acolumn = avalue..... | |
Re: instead of `$("#send").click(function(e) {` you should write something like: `$('form').on('submit', function() {` and just after you close that function's last if statement, do an `else return true`; | |
Re: Why not do something like this? <input type="button" value="Click me" id="clickme"> <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script> $(document).ready(function() { var element = '<input type="text" id="textbox">'; var count = 0; $("#clickme").on("click", function(event) { event.preventDefault(); count++; $(element).insertAfter('#clickme'); }); }); </script> If you need explanation on what is wrong with your code: - you did a … | |
Re: Some code hints would be nice: like, where do you get the data from, in what form? Considering that the users can only be male or female, you need radio buttons (only use checkboxes for design reasons). Theoretically you can do something like this: echo '<input type="radio" name="sex"'.($sex=='male') ? ' … ![]() | |
Re: What are you talking about? Tabs, as I understand them, can only be worked upon by javascript (with AJAX maybe). I think that you have some design which only emulates "tabs" (and every link finishes by a page request to the server). You can talk about performance issues only if … | |
Re: On index.php, at line 9 the if statement... `if(isset($userl))` | |
Re: On line 11 is user a constant? Put it between quotes if not. Also, on line 18 put a space between asterisk and from. | |
Re: What 'group_id' are you talking about in the where clause (at line 7)? The one in 'group' table or the one in 'invoice' table? Put the name of the table just before group_id. For example: group.group_id or invoice.group_id. | |
Re: Be more explicit. Would be nice if you give an example. ![]() | |
Re: `check_time` is a datetime, time, or a varchar (with timestamp) field in the database? I am asking this because in your question you seem to check from a time field but in your response you check for a date-time field. Also, in your response your $checkTime will always be 1 … | |
Re: At line 67: `<input type="file" name="userfile" style="width: 222px;" multiple />`. After that you will have to find out how many files were updated: `$number_files = sizeof($_POST['userfile']['name']);`. After you've found out how many files were uploaded you can process them in a for() loop. | |
Re: ok... so... This code: location / { try_files $uri $uri/ /index.php; } ...says that if nginx can't find a file or a folder ($uri), it should redirect to index.php. You should try this: location / { try_files $uri $uri/ @rewrites; } location @rewrites { if (!-e $request_filename) { rewrite ^/(.*)$ … | |
Re: When working with sessions, you always have to put the `session_start()` before any output to the browser. Unfortunately, in this case, you've put `session_start()` after you called header.php, which does output to the browser... | |
Re: First of all when working with sessions in php, make sure that session_start() is first (not after `include('connect.php);` line, but before.). And, what is `$SESSION[...]`? Are you sure is not `$_SESSION[...]`? | |
Re: show me how you retrieve the data from database | |
Re: The maximum value of a 32-bit integer is 2,147,483,647. 2,147,483,647 seconds from 01-01-1970 00:00:00 is January 19, 2038. If you add one more second, you get a date somewhere in 1902... so, your answer would by what @diafol said | |
Re: It seems to do some kind of ***lazy loading*** (that is the term if you want to google it...). As you can see, when you scroll down the scroll bar changes position everytime you get to a certain position. That means that it loads new results with ajax when you … | |
Re: It seems to me that you put a wrong value to $start_from variable. Because you ask for 30 rows, it should be: `$start_from = ($page-1) * 30;` Also, on line 102 you should write: `$total_pages = ceil($total_records / 30);` | |
Re: Could you do a var_dump on $_SESSION['id']? My guess is that it is an array. | |
![]() | |
![]() | Re: As an alternative, I would advise you to try Phil Sturgeon's caching library (https://github.com/philsturgeon/codeigniter-cache). It allows you to cache anything: from database results to blocks of content. |
Re: Speed wise, any application written directly in PHP, if written right, is faster than an application written using a framework. If by "stronger" you mean "without bugs", there is a chance that a framework, whatever its name is, could be stronger... ![]() | |
Re: Javascript is not my strong point, but: I think that your script doesn't find the form because you didn't select it corectly from your DOM tree. Try it like this: <!DOCTYPE HTML PUBLIC "-//SQ//DTD HTML 2.0 HoTMetaL + extensions//EN"> <HTML> <HEAD> <TITLE>Courses Radio Button Project</TITLE> <SCRIPT Language="JavaScript"> <!-- function choiceChecker(){ … | |
Re: @Veedeoo, I would like to start by thanking you for this great script. But, I also would like to corect you on some points you made in your comentary. Talking about composer, Laravel, and the autoloading, I must say that the autoload in Laravel and composer is actually happening at … | |
Re: From what I see, you are concatenating `$errors`, but you didn't define the variable as string. Somewhere between lines 3 and 4 I would have made a `$errors = ''`; I also see that you ask again if the form was submited in line 14 after you asked in line … ![]() | |
Re: Before redirecting, try `$this->load->helper('url');`. Also, try to do a redirect like so `redirect('login','refresh');` |
The End.