i've a search form wherein the database query has been coded in php and the html file calls this php file via ajax to display the results in the search form. the problem is, i would like the result to be displayed in the same form as search.html; yet while the ajax works, it goes to search.php to display the results.
search.html:
<!DOC...
I am new to PHP-Ext library. What I want to do is using a PhpExt_Grid_GridPanel to list all the data available and do something further when users click on a certain cell of the grid. I can create the grid easily but have trouble to get a cell value in the calling page. How can I make the grid component communicate with the calling page?...
I'm basically a front end designer and new to PHP and MySQL but I want a user to be able to store multiple names and there meanings in a MySQL database table named names using PHP I will dynamically create form fields with JQuery every time a user clicks on a link so a user can enter 1 to 1,000,000 different names and there meanings whic...
hey can i clean up a preg_match in php from this:
preg_match_all("/(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?(".$this->reg['wat'].")?/",$value,$match);
to look like this:
preg_match_all("/
(".$this->reg['wat'].")?
(".$this->reg...
I am building a captcha class. I need to store the generated code in a PHP session. This is my code so far:
<?php
class captcha
{
private $rndStr;
private $length;
function generateCode($length = 5)
{
$this->length = $length;
$this->rndStr = md5(time() . rand(1, 1000));
$this->rndStr = substr($r...
I am using SimpleTest version 1.0.1 for a unit test.
I create a new mock object within a test method and on it i do:
$MockDbAdaptor->setReturnValue('query',1);
Now, when i run this in a standalone unit test my tested object is happy to see 1 returned when query() is called on the mock db adaptor.
However, when this exact same test ...
I have a Wordpress website that needs to display a 3rd party newsletter signup form. This sign-up form has lots of fields and takes up its own full page.
I want to display a simple "enter email address, hit submit" form at the top of every page. When the user hits submit, it should take them to the full form, where their email address...
Sample code:
$html = file_get_contents('http://www.google.com');
echo $html;
It works on localhost. But after uploading to the webserver, it gives me a warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution. If I replace the domain name with google's IP address, it gives a warn...
I'm trying to find a simple wiki like script to setup a personal directory, browser favorites simply doesn't do anymore and i have lots of small files on my flash drive
Desired features
file upload
not bloated
works on a common webhost (aka php)
Thanks in advance
...
Hey, I want to add a button(link), that when clicked will filter the pagination results.
I'm new to php (and programming in general) and would like to add a button like 'Automotive' and when clicked it updates the 2 mysql queries in my pagination script, seen here:
As you can see, the category automotive is hardcoded in, I want it to b...
I have two .php files which show all contacts in a database, then allows the user to choose a contact to be edited.
The first script is called pick_modcontact.php where I choose a contact, then posts to the script show_modcontact.php When I click the post button on the form on pick.modcontact.php the browser returns to that file due to ...
I get the following error when i am logged into the backend in magento
Fatal error: Interface 'Zend_Http_Client_Adapter_Interface' not found in /homepages/45/d210005774/htdocs/websitename/lib/Varien/Http/Adapter/Curl.php on line 176
Also i got this error previously in my index management section in magento
Fatal error: Call to undefin...
Hi, I am creating and testing a mysql join query but each time so far it causes the database tables to lockup and the site hangs. I have to then call the host and they kill the locked queries.
Is this something I can do from phpmyadmin so not to bother them while I tweak the script to work? Thanks for any reply.
...
EDIT: Paul Witschger (doctrine-user group) suggested I change the default primary key (system/application/plugins/doctrine_pi.php) back to 'id' and change any primary keys in my MySQL tables that differ from this. It worked. Thanks
Hi,
Should I change all of my uniquely-named MySQL database primary keys (for all tables that use Doctrin...
I'm trying to learn good relational database design (using mysql and php if that makes any difference). I've already done some database work, so I'm not totally clueless, but I suspect that my solutions may not have adhered to best practices for efficient searching, optimization, etc.
Can someone suggest a good set of videos on the top...
I am trying to show a custom css depending on user permissions with a function like :
<?php
if ( !current_user_can( 'install_themes' ) ) { ?>
<link media="all" type="text/css" href="<?php bloginfo( 'template_directory' ); ?>/library/styles/customAdmin.css" rel="stylesheet">
<?php }
Perhaps I am being dense about this but I want to do...
I would like to do a simple sum per salesid in php - mysql after cross calculation between date (2 tables) to get the real time commission, all the value already come out correctly but I have a problem with the final sum per sales id.
Every time there is a change in the input commission form, the new value is inserted:
salesid commis...
I have two strings:
$first = '/this/is/a/string';
$second = '/this/:param1/a/:param2';
And I'm trying to get this:
$params = array('param1' => 'is', 'param2' => 'string');
But getting from point a to b is proving more than my tired brain can handle at the moment.
Anything starting with a ':' in the second string defines a variab...
I am looking to open up a file, grab the last line in the file where the line = "?>", which is the closing tag for a php document. Than I am wanting to append data into it and add back in the "?>" to the very last line.
I've been trying a few approaches, but I'm not having any luck.
Here's what I got so far, as I am reading from a zip...
Hello all,
actually i downloaded code for scroll from.......
http://sorgalla.com/jcarousel/
but when i added it in my page and add using code ...
function addElement(url,imagePath){
alert(url);
alert(imagePath);
var container = document.getElementById('sncs');
items = container.getElementsByTagName("li");
//alert(items.length);
var n...