I've posted this in the CodeIgniter forum and exhausted the forum search engine as well, so apologies if cross-posting is frowned upon.
Essentially, I've got a single input, set up as <input type="text" name="goal">. At a user's request, they may add another goal, which throws a duplicate to the DOM. What I need to do is grab these valu...
Hello,
I am trying to update my twitter status with php and outh using the Epitwitter scripts.
The following is the textarea of the web form I created to allow me to update twitter.
<textarea name="updatestatus" cols="50" rows="4" id="updatestatus">
</textarea>
Do I change this line in my confirm.php script from $status = 'Testing ...
I'm using PHP and the YouTube API to get videos from YouTube to feed to my web app, but I don't know how to get the totalResults entry
Here is my code:
$yt = new Zend_Gdata_YouTube();
$query = $yt->newVideoQuery();
$query->setQuery($searchTerm);
$query->setStartIndex($startIndex);
$query->setMaxResults($maxResults);
$feed = $yt->getVid...
Hi all
I have two tables and want to make a query.
I tried to get team AA and team BB's image base on table A.
I used:
SELECT tableA.team1, tableA.team2, tableB.team, tableB.image,
FROM tableA
LEFT JOIN tableB ON tableA.team1=tableB.team
The result only display imageA on the column. Are there any ways to select imageA and i...
Based on this documentation, I've implemented a catch all route which routes to an error page.
Here is the last route in my bootstrap.php
Route::set('default', '<path>', array('path' => '.+'))
->defaults(array(
'controller' => 'errors',
'action' => '404',
));
However I keep getting this exception thrown wh...
The full question should be "Is this correct or is it some bug I can't count on?"
WHY is this correct behavior?
I've been working with PDO more and in particular playing with fetching data directly into objects. While doing so I discovered this:
If I fetch data directly into an object like this:
$STH = $DBH->prepare('SELECT first...
i'm developing couple of websites using php (directory script, etc.) and wordpress as cms. i need to improve its performance, by using cdn for static files (css, js, images). the problem is, css and javascript files are generated on the fly. i did that due to yahoo and some expert advice to combine the files into one file. also changing ...
I'm trying to reutilize code that generates FILE fields for use when something is to be added to the database, and grayed out (and disabled) with data already in the database when the item in question is being edited or viewed in detail. However, I can't seem to get the text to fill the field. I'm using this:
echo '<input type="file" na...
So I have two classes like this:
class foo {
/* code here */
}
$foo = new foo();
class bar {
global $foo;
public function bar () {
echo $foo->something();
}
}
I want to access the methods of foo inside all methods bar, without declaring it in each method inside bar, like this:
class bar {
public function b...
Thanks in advance for you help > Ive been doing this as a lovejob for friends and now im getting quotes of several hundred dollars for minor homepage variation and I'm not sure if its valid. I'm not a programmer myself, just trying hard :)
Via the CafePress press75 theme, I'm trying to go from 1 / 2 / 3 column home layout, to 1-2 merge...
does any one know how to create a mouse over popup like addthis.com and sharethis.com?? it should popup exactly on a button. and moreover it does not have anything inserted into Head tag.can be attached javascript with that link between body tag but not in head.
any Ideas, Sample code??
...
I am using php and mysql. If I want to do a sharing photos website, whats the best database design for upload and display photos. This is what I have in mind:
domain:
|_> photos
|_> user
Logged in user will upload photo in
[http://www.domain.com/user/upload.php]
The photos are stored in filesystems, and the path-to-photos st...
Forgive me if this is a particularly stupid question!
mysql_query($query)
returns a boolean, but you can also assign it to a variable
$results = mysql_query($query)
and then use the other mysql_ functions to extract data.
Out of curiosity, how does mysq_query($query) act as both a boolean and a data container at the same time? Wha...
Updates : Please see below
i have table: data
+-----------------------+--------------+-----------+
| State | d_country | d_postcode|
+-----------------------+--------------+-----------+
| State1 | Country1 | 1111 |
| State2 | Country2 | 2222 |
| State3 ...
Do you have a php script that use the API from bit.ly ?
...
I'm not sure about my platform,
can I diagnose it programatically?
...
Hey,
What SQL query would I have to use if I want to get the results from a table 'messages' but exclude rows that have the value in 'messages_view' where field messages.message=messages_view.id AND messages.deleted=1 AND messages_view.user=$somephpvariable
In more laymen terms, I have a messages table with each message denoted by an '...
Hi everyone!
i have this code.
{if $loginUrl}
{literal}
<script type="text/javascript">
var newwindow;
var intId;
function login() {
var screenX = typeof window.screenX != 'undefined' ? window.screenX : window.screenLeft,
screenY = typeof window.screenY != 'undefined' ? window.screenY : window.sc...
Good day,
I have a local csv file with values that change daily called DailyValues.csv
I need to extract the value field of category2 and category4.
Then combine, sort and remove duplicates (if any) from the extracted values.
Then save it to a new local file NewValues.txt.
Here is an example of the DailyValues.csv file:
category,dat...
Hi,
I trying to create some dirs like this:
@mkdir("photos/$cat/$sku", 0777, true)
it creates the first directory with 0777 permissions, but when it creates the second is uses 000 as it's perms, so it fails to create the third.
A workaround this please?
Thanks,
Richard.
...