Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: [Solved] Automatically replace the first & with a ? question mark.
Post: RE: automatically replace the first & with a ?...

Thanks to all who helped working solution PHP Code: -- $find = '&'; $replace = '?'; $result = preg_replace("/$find/", $replace, $url, 1); echo $result; -- Full PHP Code: -- $url = ''; ...
1,613 Views
2 Replies
04-05-2018, 11:54 PM
wolfgang1983
    Thread: [Solved] Automatically replace the first & with a ? question mark.
Post: [Solved] Automatically replace the first & with a ...

I have this code below which generates a query string for my url. But I would like to know is there away that it could automatically replace the first & with a ? question mark. PHP Code: -- $...
1,613 Views
2 Replies
04-05-2018, 11:22 PM
wolfgang1983
    Thread: Solved: symbol validation check question
Post: RE: Solved: symbol validation check question

jreklund Wrote: (04-05-2018, 11:17 AM) -- Personally I would match characters I want instead of those I don't want. Right now you can use chines letters in your folder name, are you allowed to do so?...
2,776 Views
4 Replies
04-05-2018, 03:45 PM
wolfgang1983
    Thread: Solved: symbol validation check question
Post: RE: symbol validation check question

Found solution did like PHP Code: -- $is_correct_foldername = strpbrk($this->input->post('folder'), "\\/?%*:@#$|\"" . "{}" . " "); --
2,776 Views
4 Replies
04-05-2018, 02:00 AM
wolfgang1983
    Thread: Solved: symbol validation check question
Post: Solved: symbol validation check question

Hi, I have this code below which lets me validate folder names. PHP Code: -- $is_correct_foldername = strpbrk($this->input->post('folder'), "\\/?%*:@#${}|\""); -- How can I make sure folder n...
2,776 Views
4 Replies
04-05-2018, 01:28 AM
wolfgang1983
    Thread: Order By Time Not Working
Post: RE: Order By Time Not Working

InsiteFX Wrote: (02-13-2018, 08:15 AM) -- You should use DATETIME DATE and TIME fields for storing date and time. -- What do you think the career should be for the database column? I changed the ti...
8,246 Views
7 Replies
02-13-2018, 03:15 PM
wolfgang1983
    Thread: Order By Time Not Working
Post: RE: Order By Time Not Working

InsiteFX Wrote: (02-13-2018, 04:26 AM) -- Look at this maybe it will help you. MySQL EXTRACT() Function (https://www.w3schools.com/sql/func_mysql_extract.asp) You can use this with order by als...
8,246 Views
7 Replies
02-13-2018, 04:34 AM
wolfgang1983
    Thread: Order By Time Not Working
Post: Order By Time Not Working

Hi, I am working on my project but for some reason my order_by('time', 'asc') is not sorting out my list correct As you can see number 4 and 8 should be closer together but is not I am not sure if ...
8,246 Views
7 Replies
02-13-2018, 04:18 AM
wolfgang1983
    Thread: Number Sorting
Post: Number Sorting

I have a some code that lets me sort my list of array in to different combinations how ever.  Instead of refreshing page each time Is there away to just get a printed list of all the different c...
2,497 Views
3 Replies
02-11-2018, 07:45 PM
wolfgang1983
    Thread: Convert numbers question
Post: RE: Convert numbers question

PaulD Wrote: (12-23-2017, 03:54 PM) -- 471858 bytes is 0.0004 GB. So the function is returning the correct figure to 2 decimal places. -- OK so will have to change a couple of things cool bit more ...
3,878 Views
5 Replies
12-23-2017, 04:04 PM
wolfgang1983
    Thread: Convert numbers question
Post: RE: Convert numbers question

Wouter60 Wrote: (12-23-2017, 06:27 AM) -- Maybe this will help: PHP Code: -- function byte_convert($size,$unit='MB',$decimals=2) { switch (strtolower($unit)) { case 'kb' : $u = 1024...
3,878 Views
5 Replies
12-23-2017, 01:27 PM
wolfgang1983
    Thread: Convert numbers question
Post: Convert numbers question

Hi, I want to be able to convert my KB numbers. For example the out put I am after lets say if my string is 471858 KB/MB then I would like it to change be able to echo to 0.04 GB I can't seem...
3,878 Views
5 Replies
12-23-2017, 05:01 AM
wolfgang1983
    Thread: Session express when I use ajax imap
Post: Session express when I use ajax imap

Hello, I use ajax to call some imap functions how ever the session tends to expire before the sess_expiration 7200 limit. I am not sure if it is some thing to do with session_time_to_update? ...
2,153 Views
2 Replies
12-20-2017, 06:21 PM
wolfgang1983
    Thread: Codeigniter & Imap Library
Post: Codeigniter & Imap Library

Hi, I would like to know if any one has any links for a current plugin for imap so get emails to my codeigniter project. I found this one but a couple years old https://github.com/natanfelles/co...
1,601 Views
0 Replies
12-17-2017, 03:18 AM
wolfgang1983
    Thread: [Solved] Expire Session Question
Post: RE: Expire Session Question

I think I have solved it now PHP Code: -- $this->session->set_tempdata(array('login_token' => $token), NULL, 300); -- PWD Function  PHP Code: -- if (!$this->session->userdata('login_token'...
2,198 Views
2 Replies
12-15-2017, 01:53 AM
wolfgang1983
    Thread: [Solved] Expire Session Question
Post: [Solved] Expire Session Question

When the user first login email or user name correct I set a custom session token I when I set the token I would only like that token to last for 5 min then unset it self How can I make sure tha...
2,198 Views
2 Replies
12-15-2017, 12:47 AM
wolfgang1983
    Thread: Only display the month once
Post: RE: Only display the month once

ivantcholakov Wrote: (12-12-2017, 10:03 PM) -- Code: -- $last_month = '*'; foreach ($results as $result) {    $date = strtotime($result['event_date']);    $month = date('M', $date);    ...
2,486 Views
3 Replies
12-13-2017, 01:04 AM
wolfgang1983
    Thread: Only display the month once
Post: Only display the month once

Hi, In my list below as you can see it has printed the word "Nov" & "Jan" multiple times I use codeigniter with phpword to get the database results https://ibin.co/3kV2uW1VzyU0.png I woul...
2,486 Views
3 Replies
12-12-2017, 07:47 PM
wolfgang1983
    Thread: [Solved] Codeigniter sessions Question
Post: RE: Codeigniter sessions Question

I think I found the solution need to put cookie domain PHP Code: -- $config['cookie_prefix'] = ''; $config['cookie_domain'] = '.example.co.nz'; $config['cookie_path'] = '/'; $config['cookie_s...
1,567 Views
1 Replies
10-30-2017, 10:49 PM
wolfgang1983
    Thread: [Solved] Codeigniter sessions Question
Post: [Solved] Codeigniter sessions Question

Hi, on my live domain for some reason my codeigniter session creates one for www.example.co.nz and one for example.co.nz Why is that it should only create one lot of sessions. Not sure what caus...
1,567 Views
1 Replies
10-30-2017, 10:41 PM
wolfgang1983

Theme © iAndrew 2016 - Forum software by © MyBB