39,326 Topics

Member Avatar for
Member Avatar for James_43

Always get really confused when dealing with timezones... I have a string `8/11/2013`, which I apply the following code: $firstDate = new DateTime($rawData[$backdate][0]); $firstDate = $firstDate->format('d/m/Y'); The issue is that PHP seems to think that the '11' is the day, when it's actually the month (I'm in NZ). When I …

Member Avatar for James_43
0
197
Member Avatar for AntonyRayan

I know how to find number of working days for an academic year. But I want to know working days of each and every month from june to april of next year,seperately. How to do?

Member Avatar for Taywin
0
99
Member Avatar for gogs85

Hi I have problem to get data when insert with ajax. I have ajax.js file and here is this code: $('#text-content').keypress(function(e){ if(e.which == 13) { if($('input#enter-click').prop('checked', true)) { $('#live-send').click(); e.preventDefault(); } } }); $('#live-send').click(function(){ var message = $.trim( $('#text-content').val() ); if($('#text-content').val()!="") { $.ajax({ type: 'POST', dataType: "json", url: './includes/conversation.php', data: …

Member Avatar for pritaeas
0
295
Member Avatar for AntonyRayan

HI, I want to calculate number of working days for the academic year between two dates like(01-06-2015 to 31-10-2015). I saw all codes that are doing only for curtrent year. If I want to do future years , how to do automatically, Here is my code what I tried , …

Member Avatar for diafol
0
234
Member Avatar for UK-1991

Hello, I tried to integrate api of aylien which is used for article extraction I installed the sk succesffuly but when I tried to run my code it gives me an error Trying to get property of non-object in C:\wamp\www\aylien\index.php on line 15 Notice: Trying to get property of non-object …

Member Avatar for UK-1991
0
253
Member Avatar for James_43

Hi all, quite a strange problem here. I have a csv file with rows: 20/12/2011 4.75 4.75 4.53 4.55 94.74 432.98 4.57 21/12/2011 4.38 4.38 4.38 4.38 20.9 91.54 4.38 22/12/2011 4.19 4.19 4.17 4.17 8.54 35.71 4.18 23/12/2011 3.86 4.35 3.84 4.22 149.49 625.81 4.19 24/12/2011 4.33 4.33 4.33 …

Member Avatar for James_43
0
274
Member Avatar for CathrynMwai

How do one enable a search button in PHP to function in terms of when I do a search on the website, my search goes through and I get the feedback of what I was looking for.

Member Avatar for seoaceindia
0
96
Member Avatar for amith_ami

Hi all, I am trying to insert 1000 above data into a table but after inserting 500 something data its showing an "Internal Server Error". I tried after changing max_execution_time in php.ini and some other methods but no use. But this works fine in localhost. Given below is my code. …

Member Avatar for diafol
0
241
Member Avatar for James_43

Hi all, I'm working with a function that only accepts values between 0 and 1, so I need to scale my data first. The first part involved in this is calculating the high/low values of my inputs. I pass this into a function that churns out X and Y values …

Member Avatar for James_43
0
113
Member Avatar for James_43

Hi all, I have an array $pTimeseries with 365 items inside it. I use a simple for statement, as below: //Add TimeStamp to Historic Data for($i = 0; $i < (count($pTimeseries)); $i++) { $pTimeseries[$i][1] = $rawData[$i + $backdate][0]; } In my Apache error logs I get "Undefined offset: 366" all …

Member Avatar for James_43
0
125
Member Avatar for bimaljr

Hi I have a running website which is based on ASP.NET Now I want to convert the full webiste in PHP. The current website is based on DotNetNuke and also modified some modules. Please provide your help to how to do this ? Thank you.

Member Avatar for Neo_1
0
4K
Member Avatar for gogs85

Hi I have problem to get data when insert with ajax. I have ajax.js file and here is this code: $('#text-content').keypress(function(e){ if(e.which == 13) { if($('input#enter-click').prop('checked', true)) { $('#live-send').click(); e.preventDefault(); } } }); $('#live-send').click(function(){ var message = $.trim( $('#text-content').val() ); if($('#text-content').val()!="") { $.ajax({ type: 'POST', dataType: "json", url: './includes/conversation.php', data: …

Member Avatar for diafol
0
438
Member Avatar for prafful_panwar

I want to use the instance of ckeditor. when user click on add more button it will create the instance of ckeditor, but that instance of ckeditor is not editable. I mean user is not able to enter anything there. Need help...Thanks in advance :) fiddle : http://jsfiddle.net/pkz7auLy/

Member Avatar for diafol
0
1K
Member Avatar for Stefce

Hello im using bootstrap and want to make the menu to be sticky i have uploaded the code so you can see it [www.upster.webuda.com](http://www.upster.webuda.com) i want to be like in the login screen at the begining im using the same code for other files but it doesn't work properly someone …

Member Avatar for Stefce
0
229
Member Avatar for shany0786

here is my code for simple validation but i can't able to why this happening but validation always fails no matter what i input? <div class="signup-form"><!--sign up form--> <h2>New User Signup!</h2> <?php echo form_open('login/register');?> <input type="text" name="name" placeholder="Name"/> <input type="email" name="email" placeholder="Email Address"/> <input type="password" name="password" placeholder="Password"/> <button type="submit" class="btn …

Member Avatar for cereal
0
176
Member Avatar for slyme

Two files to edit/maintain a data array. data.php looks something like this: <?php $data_array[0]['key1'] = 'value'; $data_array[0]['key2'] = 'value'; $data_array[1]['key1'] = 'value'; $data_array[1]['key2'] = 'value'; $data_array[2]['key1'] = 'value'; $data_array[2]['key2'] = 'value'; ?> admin.php works something like this: function get_data() { include 'data.php'; // do a load of stuff with $data_array …

Member Avatar for slyme
0
531
Member Avatar for Eirik

Can anyone help me with how I can retrive the data of this XML with PHP i need to echo the <dc> data ex. <dc:title> and so on. XML file: http://askbib.asker.folkebibl.no/cgi-bin/sru?operation=searchRetrieve&version=1.2&query=rec.identifier=%22261118%22&recordSchema=dc&startRecord=1&maximumRecords=10

Member Avatar for Eirik
0
342
Member Avatar for SimonIoa

Hello i want to calculate three parameters. one X two X three = Y The one is the value of a <input type="number"> the second is default the value '1' and the third is the count of this $sql = "SELECT uid, username, name, profile_pic FROM users"; $result = mysqli_query($db,$sql) …

Member Avatar for SimonIoa
0
717
Member Avatar for shashigowda

if once i click on the Accept button it should change its state to Accepted and that button should be disabled for the future.it should stay in disabled state even after refreshing a page,help me as soon as possible...Urgent

Member Avatar for Taywin
0
121
Member Avatar for Riteman

I have to create a unique code to every user registering. The thing is that the unique code needs to be generated based on which city the user is from. So the tables I have are: CREATE TABLE `microreg`.`users` ( `user_id` INT NOT NULL AUTO_INCREMENT , `user_code` CHAR(10) NOT NULL …

Member Avatar for Taywin
0
205
Member Avatar for Jiby_1

hai friends...i have a doubt in php..I am using Tiny MCE editor..i want to know how to get style for the content i have entered in editor but not print the html tags in my website..how it is poosible????\

Member Avatar for diafol
0
116
Member Avatar for shashigowda

Hii..this is mysql query $querry="SELECT CONCAT(`insert_id`, `type`) AS 'order_id' FROM orders WHERE email='$email'"; $order_id=mysql_query($querry); echo $order_id; i need to convert this into ** mysqli**. Any Help??

Member Avatar for shashigowda
0
374
Member Avatar for UK-1991

Hello, I have created a form using ajax and php but when I click on submit the values in the textarea remains as it not disappears so I found a way to make form reset once I click on submit here is my code and please let me know how …

Member Avatar for UK-1991
0
248
Member Avatar for shany0786

I am always short of logic when every things works fine then i come up with new problem? **PROBLEM** There are generally 6 user type accounts.Everyone has their own "edit profile page".Now i want to know how can i handle this.user login then directed to home page then in navbar …

Member Avatar for shany0786
0
281
Member Avatar for spluskhan

What im missing, LIMIT & Next page are not working. it showing nothing. <?php include ('ini.php'); $query = $_GET['query']; $min_length = 3; $max_length = 15; if(strlen($query) >= $min_length) { $query = htmlspecialchars($query); $query = mysql_real_escape_string($query); echo "<table border='0' width='' align='left' cellpadding='1' cellspacing='1'>"; echo "<tr><h3>You have searched for $query... Please find …

Member Avatar for diafol
0
212
Member Avatar for Kevin_22

i know this has been posted many many times but ive been searching everything and looking over old posts but i still cannot figure this out and why it keeps reading it as non object heres my code <?php require 'dbconfig.php'; class USER { private $db; function __construct($DB_con) { $this->db …

Member Avatar for Kevin_22
0
428
Member Avatar for biddut.hossain.75

i want to import my backup database(.sql file) into mysql using php script. i have given the following code where **case 1** section works. but i need to execute **case 0** section. what the problem in my code please help me anyone. <?php //ENTER THE RELEVANT INFO BELOW $mysqlDatabaseName ='online_admission_form'; …

Member Avatar for diafol
0
4K
Member Avatar for Yves11
Member Avatar for diafol
0
265
Member Avatar for Sophia_1

Hi everyone, am trying to display current date/today's date in php but the output is as below. Please advise. Thanks. <?php $Currentdate2 = date('d-m-y'); echo $Currentdate2; ?> Output: Current date: 2027-10-15

Member Avatar for diafol
0
369
Member Avatar for SirMahlon

i have been able to pass value from form to ajax and to php to insert into my database. Now there is a value which determines whether to redirect to page 1 or page 2 after inserting. As well i alert that the form was successful. So i wanna know …

Member Avatar for diafol
0
322

The End.