I've been using PHP's strtotime() method to accept a date field on a form. I love how powerful it is, in how it will accept "Tomorrow", "Next Thursday", or (supposedly) any date representation and convert it to the Unix timestamp.
It's been working great -- until yesterday. Someone entered "2-4-10" and instead of logging Feb 4th, 2010, ...
I am very new to mysql and databases, so I need help here...
How should I use JOIN to fetch a record from the tables below, when the only given variable is the ad_id?
category and category options are filled in manually i.e. the users may not alter them. So they are only reference tables, but I am not sure this is how I should do it......
Say you have the following array:
$nodes = array(
"parent node",
"parent node",
array(
"child node",
"child node",
array(
"grand child node",
"grand child node")));
How would you go about transforming it to an XML string so that it looks like:
<node>
<node>parent node</n...
Hi all...
I have a javascript array say jsArr[]. I want this array to be passed to a php page through the get method. Something like "nextPage.php?arr=jsArr[]".
There i should be able to access the array like "$arr[] = $_GET[arr]" and perform operations like foreach($arr as $key => $val).
Is it possible...?
Thanks a lot in advance.....
We have an issue where we have an XML feed leaving our system and a client needs to be able to import this feed into their system but they require the XML file to be in a different format. For a number of reasons its not possible for either of us to alter our format. I was thinking then that it would make sense for us to build some kind ...
I'm trying to read a comment that is stored in a mysql table. For some reason I always get a parse error on the last line of the file even if the last line is blank. I'm not sure if it's relevant but the connect.php works for putting the comment into the database. I'm using wampserver to host it and coding it by hand.
I think that's it'...
I have a GD image resource created from imagecreatefromstring. After some image operations, I want to convert it back to binary data. How would I do this? Can't see any functions in the manual...
...
I have a system with a download.php page. The page takes and id and loads a file based on from the DB Record and then serves it up. I've noticed a couple instances where files are requested multiple times in short time spans (20ms). Times that are too quick for human input. There are plenty of instances where the downloader functions fin...
Greetings everyone
Using the request object, I can't get a sole value as in this URI:
http://mydomain.com/controller/action/value1
Using $request->getParams() is not returning the value1.
Output:
array([controller] => 'controller', [action] => 'action')
The key is missing.
The issue itself is quite simple and I could parse the U...
Hello,
I have two (example) tables here A) data_table:
+----------+-------+
| location | value |
+----------+-------+
| 43 | 38 |
| 44 | 31 |
| 3 | 31 |
| 11 | 38 |
| 47 | 35 |
| 49 | 31 |
| 50 | 31 |
| 55 | 16 |
| 56 | 16 |
| 59 | 35 | ...
I got from a json feed this :
<img src = "http://produits-lemieux.com/produits/bainmoussant_hg.jpg" ></img>
i need to inject alt="" into the string
Best method to do that in php ?
...
Using PHP how can I accurately test that a remote website supports the "If-Modified-Since" HTTP header.
From what I have read, if the remote file you GET has been modified since the date specified in the header request - it should return a 200 OK status. If it hasn't been modified, it should return a 304 Not Modified.
Therefore my q...
I'm using URI re-routing in CI to make better URLS. An example here would be:
$route['users/(:any)'] = "users/index/$1";
The aim here is to get rid of the index from URL. This works well. However it stops me from being able to access any functions in the users controller, for example
mywebsite.com/users/messages
Just redirects to t...
Hi, this is probably quite simple but I could do with some help.
I am trying to create a small PHP function that will display a single value form a multidimensional array when the user used two dropdown boxes to select the row and column of the array.
So, the user will make a selection from the first dropdown box, which will contain th...
Hi,
I would like to know if there is any library around I could use to generate forms and maintain them without too much pain. I'm working on an app with hundreds of form, and we have been re-inventing the wheel for all of them so far. It's not really DRY and I have to test them all.
I know that some framework can manage forms quite we...
When using popen or proc_open to run the following command to list the contents of a windows share:
smbclient -N -U 'username%password' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -d 0 '//server/sharename' -c 'dir "dirpath\*"' 2>/...
(Very useful when querying DB).
If I have a multy dim array
[['id'=>1],['id'=>2],['id'=>34],['id'=>67]]
and what I want is [1,2,34,67]
I know how to do it in code, just asking if there is a built in way in PHP (or may be in PDO) to do this.
...
what is the best way to build an upload widget that can handle large files
is there a great jquery plugin for this?
I'd really love to have a progress bar without having to depend on flash
would need to use php for the backend
...
The LogMeIn API's "getSession" call is driving me a bit crazy. According to their documentation, you should be able to input an iNodeID either from the getHierarchy call or just the tech's ID# from the LogMeIn admin page and it will report their open session information, but no matter what I use, I get an error "stdClass Object ( [getSes...
this script have to update things on every refresh but not working. lend me a hand
$yp = mysql_query("select id from yyy where twitterid = '$tid'");
$qq = "update yyy set twitterid = '$tid',
twitterkullanici = '$twk',
tweetsayisi = '$tws',
takipettigi = '$tkpettigi',
takipeden = '$tkpeden',
nerden = '$nerden',
bio = '" . mysql_re...