I have a MySQL database of newspaper articles. There's a volume table, an issue table, and an article table. I have a PHP file that generates a property list that is then pulled in and read by an iPhone app. The plist holds each article as a dictionary inside each issue, and each issue as a dictionary inside each volume. The plist doesn'...
I have a form with a drop down menu and I want to do a javascript action whenever the user changes the selection. I imagine it is possible find the input later, using javascript, and attach an event to to it; but it seems like it would be easier if there was some sort of attribute or option that could be defined in form->configure(): e....
Short descriptio:
Need hashing algorithm solution in php for large number of text values.
Long description.
PRODUCT_OWNER_TABLE
serial_number (auto_inc), product_name, owner_id
OWNER_TABLE
owner_id (auto_inc), owener_name
I need to maintain a database of 200000 unique products and their owners (AND all subsequent changes to owner...
Hi Everyone, when my site loads, it stops half way because of specific php code. When I try commenting out the php code, the whole page loads properly (input boxes, buttons etc.)
This is the code that causes the issue
<?php
//if the add location button is clicked, the add location, the whole form will not be submitted
...
Here is my exact code.
<?php
echo "<! <";
?>
And this is the returned string.
<! >
Why is the last character changing?
...
Hello guys,
I am new here and got a question that is tricking me all day long.
I've made a PHP script, that reads a website source code through cURL, then works with DOMDocument class in order to generate a sitemap file.
It is working like a charm in almost every aspect. The problem is with special characters.
For compatibility reaso...
I am using PHP to iterate over the following result set, the aim is to build a hyperlink for each result using a foreach loop. I have stored the XML result in $images, and have constructed this loop:
foreach ($images as $image) {
//Build link to each photo returned
//base URL
$flickrPhotoUrl = 'http://www.flickr.com/photos/';
...
I would like to create an upload script that doesn't fall under the php upload limit.
There might be an occasion where I need to upload a 2GB, or larger file and I don't want to have to change the whole server execution to above 32MB.
Is there a way to write direct to disk from php?
What method might you propose someone would use to...
i want to replace ALL comma , into ,<space> in all address table in my mysql table.
For example,
+----------------+----------------+
| Name | Address |
+----------------+----------------+
| Someone name | A1,Street Name |
+----------------+----------------+
Into
+----------------+----------------+
| Name ...
I want to creat a web which has google search,
but I do not know how to make the "Google suggest",
Who can give me a "Google suggest" php code?
Thx!
...
Hi there,
I am trying to install lighttpd and php separately on Windows XP.
I successfully get the server to run.
However, I failed to get the OCI to run in my server.
Error message saying that failed to load the PDO Driver for OCI.
When I check on phpinfo(), no OCI/PDO OCI driver is loaded.
I got the correct dll file and php.ini corr...
I'm running a stock copy of tim thumb on a clients website. Works great but does not support external hosts for the pictures. My clients uses an amazon CDN / Flickr for all of their websites pictures which doesnt allow me to resize on the fly.
Has anyone found a work around for this?
http://code.google.com/p/timthumb/
...
My webpage is putting out a 500 Internal Server Error. I've turned on E_ALL for error reporting in the php.ini, and restarted the httpd. I've even used error_reporting(E_ALL) and error_reporting(-1) but still no luck. Any suggestions?
OS: CentOS5.5
PHP: 5.2.6
HTTPD: Apache/2.2.3
...
$db = mysql_connect("", "", "") or die("Could not connect.");
mysql_select_db("",$db)or die(mysql_error());
$sql = "SELECT * FROM table where 1";
$pager = new pager($sql,'page',6);
while($row = mysql_fetch_array($pager->result))
{
echo $row['persons']."<br>";
}
mysql_close($db);
above code output :
Mathew
Thomas
John
Stewart...
Hi,
I want to disable the cache in the template system Dwoo.
Just for my dev mode.
But then I tried to invoke setcache () or modify Dwoo classes and nothing works.
Someone has an idea?
Thank you
...
I'm getting a redirect loop when using Login Toboggan. It doesn't happen all of the time and I think I've narrowed it down to something with the session, specifically the active-tabs[last-active-href] value.
Since it's intermittent, I was able to print out a session of a working copy and a non-working copy. Here are both:
WORKS -- Arr...
Given the following tables:
Table1
[class] [child]
math boy1
math boy2
math boy3
art boy1
Table2
[child] [glasses]
boy1 yes
boy2 yes
boy3 no
If I want to query for number of children per class, I'd do this:
SELECT class, COUNT(child) FROM Table1 GROUP BY class
and if I wanted to qu...
Anyone have a good solution for scraping the HTML source of a page with content (in this case, HTML tables) generated with Javascript?
An embarrassingly simple, though workable solution using Crowbar:
<?php
function get_html($url) // $url must be urlencode(d)
{
$context = stream_context_create(array(
'http' => array('timeout' => 12...
How to get started with Paypal integration with php codeigniter? Where should i start? Any suggestion?
...
I'm trying to redirect to
http://localhost/site/public/admin/login
from
http://localhost/site/public
but for some reason, it keeps redirecting to
http://localhost/admin/login
The code I am using is:
$this->_response->setRedirect('/admin/login')->sendResponse();
This is really frustrating me, and any help would be grealy appr...