- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 115
- Posts with Upvotes
- 109
- Upvoting Members
- 78
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Re: Refer to get_result(): http://php.net/manual/en/mysqli-stmt.get-result.php // this is where the data will be stored/buffered $data = Array(); $stmt = $dbconn->prepare("SELECT * FROM `members` WHERE username=? AND password=?"); $stmt->bind_param("ss", $username, $password); $stmt->execute(); $result = $stmt->get_result(); //iterate over the result retrieving one row at a time while ($row = $result->fetch_array(MYSQLI_NUM)) { //buffer the … | |
Re: If you do not want any redirection to take place when viewing the page via ajax, what you can do is to send a parameter that identifies the request as being ajax. In your php code, immediately before the redirect code see if you detect that parameter and if you … | |
Re: try: [CODE] $result_1= mysqli_query($link, "SELECT $criteria FROM table ORDER BY $crieria ASC") or die( mysqli_error($link) ); [/CODE] | |
Re: [QUOTE]making the question I shall ask a fair question.[/QUOTE] So what's your question. You never actually asked a question. On another note, when posting "blocks" of code, wrap them in [ CODE ] and [/ CODE ] (without the spaces around the word "CODE" - I used spaces so you … | |
Re: Read [URL]http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc[/URL] if that directive is enabled on your server and you typed/submitted the following: O'Brian/O'Malley then the server will auto-convert it to: O'Brian\/O'Malley then if you call stripslashes() it will change it back to what you originally typed: O'Brian/O'Malley notice that it removes only BACK slashes, not forward slashes. … | |
Re: What is your PHP INSERT query? Are you by any chance casting the value of `type` to an integer? Also, where is the javscript code that is actually sending the data to the server? The `updateNewsFeed(...)` doesn't seem to be doing anything with the `encodedata` and `url` variables. | |
Re: Try appending the data as a querystring -ex: jq("#myid").load(location.href + " #myid?firstName=John&lastName=Smith"); | |
Re: From what I see, the `input` and the corresponding `select` can be "tied/related" to each other by inspecting their `id` attributes. By removing the non-numeric portion of the `id`, whatever is left helps you the determine the `id` of the corresponding element. Since `id`s must be unique, the previous method … | |
Re: Are you referring to the `document.write` predefined method? If so, just assign a reference to if for your own `write` property -ex. var subject = new Object(); subject.write = document.write; subject.write("hi");//works as if you had called document.write("...") | |
Re: > And in terms of Finder menu options ... Not sure why they're missing for you FYI - They are not missing for me. However the list of items under my "Favorite Forums" is not the same as what I had prior to the "upgrade." I wonder if I am … | |
Re: You need to fix your `<form>` tag to include `enctype="multipart/form-data"` otherwise the `$_FILES` array will remain empty. Also, you forgot to use `echo` for the `action` attribute. Try: <form name="form1" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post" enctype="multipart/form-data">...</form> | |
Re: Try saving the following as test.php and give it a try: <?php if( array_key_exists('Submit',$_POST) ) { if(!empty($_FILES)) { // these are your "settings" $myFiles=Array( 'pri' => Array('required'=>true, 'destination'=>'/path/to/save/directory/', 'allowed'=>'pdf;doc;docx', 'label'=>'Pri') ,'oresult' => Array('required'=>true, 'destination'=>'/path/to/save/directory/', 'allowed'=>'pdf;doc;docx', 'label'=>'OResult') ,'oresult2' => Array('required'=>true, 'destination'=>'/path/to/save/directory/', 'allowed'=>'pdf;doc;docx', 'label'=>'OResult2') ,'dob' => Array('required'=>true, 'destination'=>'/path/to/save/directory/', 'allowed'=>'pdf;doc;docx', 'label'=>'DOB') ,'photo' => … | |
Re: You need `... LIMIT offset, rowCount` -- ex: SELECT blabla FROM a INNER JOIN b ON a.a = b.b ORDER BY a.id DESC LIMIT 50, 10 will give you at most 10 rows, starting with row 50. | |
Re: Try: <select name="cmbclient"> <option value=""></option> <?php /* select only the fields you need. Doing SELECT * gets you all the fields on the table, even the one you don't need! */ $dataSql = 'SELECT reff_number, name FROM pelanggan ORDER BY name'; $dataQry = mysql_query($dataSql, $koneksidb) or die ("Gagal Query".mysql_error()); while … | |
Re: Read through the comments of the script below. Notice that the underlying html markup has changed. <!DOCTYPE html> <?php require 'connect2.inc.php'; $errors=Array(); // Now there is student_id hidden field in the first column. It should correspond to the unique id // record on your table. if( array_key_exists('student_id',$_POST) ) { // … | |
Re: > I can get in, but when I go to log in after, it won't let me log in What you posted doesn't help. You need to post what you are doing before it gets to that point. > and I can re-create the same member multiple times. If you … | |
Re: Try: function getWorkingDays($startDate, $endDate, $holidayList) { $working_days = 0; $begin = strtotime($startDate); $end = strtotime($endDate); if($begin > $end) { echo "startdate is in the future! <br />"; } else { foreach($holidayList as $k=>$v) { $holidayList[$k] = strtotime($v); } $no_days = 0; $weekends = 0; $holidays = 0; while($begin <= $end) … | |
Re: The second parameter of `function createChatBox(chatboxtitle,minimizeChatBox)` should be `chatName` (not `minimizeChatBox`) since you are using `chatName` on line 19. | |
| Re: > How can i simply review Q/A on forum databases See if you find it under `Finder > My Favorite Forums > Databases`. I too was gone for a long time, and now that I am back, the Databases shows up there (along with other ones). If you were actively … |
Re: It is not clear how you are initializing `A[]` but on line 6, if the value of `A[j]` is more than 166, then on line 15, the numeric index for `SUM` would be out of bounds. | |
Re: When `obj.Set_draw ("Rectangle");` is executed, line 90 allocates memory for a Rectangle and `obj` points to it: obj ---> +---+ Rectangle | | +---+ You then execute: `obj.Set_draw ("Circle");`, resulting in: +---+ Rectangle | | +---+ obj ---> +---+ Circle | | +---+ Notice that what your line 90 did … | |
Re: > I have declared the variables in the register_new.php script as $username=$_POST['username']; > $passwd=$_POST['passwd']; The problem is not `$username`. The problem is `$_POST['username']`. If your page is hosted at `yoursite.com/member.php`, when you type that url directly onto the browser's address bar you are submitting a `GET` request (or if you … | |
Re: > However, i would also like to get the roleid returned That implies that you don't know the initial roleid. So your function should not be accepting `$roleid` and shouldn't be part of the `WHERE` clause since you don't know what it is. Try: function getUserRole($username) { $roleid = false; … | |
Re: try: `SELECT * FROM forums AS F INNER JOIN users AS U ON F.lastAuthorID = U.id` To help you understand `... forums AS F` simply makes `F` an alias for `forums`. Similarly, `... users as U` makes `U` an alias for `users`. The `AS` keyword is optional, so it could … | |
Re: Based on what you posted, theTicket# column on the light-blue table (to the right of the red table) has unique values. If this is true, then merge Ticket# with the red table and on the purple table instead of Ticket#, use TicketID. TicketCheckList =============== +->* TicketID FK | CheckListID FK … | |
Re: >Therefore, to allow for both, i would need a way for the PHP code to detect whether a request was an AJAX request or not. I don't know how you are submitting the ajax requests, but if you are using jQuery, it already contains a header named `X-Requested-With` which is … | |
Re: > By selecting organization, it will calculate how many customers are there to send SMS, It will display the SMS Count along with all managers names using JQUERY AJAX. > For counting this value,it takes so much time in online, >How to solve that?. Is the customer list on a … | |
Re: If you are going to use `header('Location: ...')`, you cannot use `echo`. So your else clause should be: ... else { $_SESSION['id'] = $row['id']; $_SESSION['user'] = $myusername; $_SESSION["startTime"] = date("r"); //you call header AFTER you have set your session variables. header("Location: index.php"); exit; } | |
Re: On line 11, where are you initializing `$row_injection_text`? I am wondering if you meant to write `$row_pages`? | |
Re: In HTML, an elements id attribute must be unique. Since you have `<button id='button'>Update</button>` within the `while` construct, all the buttons are getting the same id value. By contrast, your `$('#button')` works only on the first button because it was expecting to find only one to begin with! What you … |