hi all..
Consider two php scripts(o.php & t.php)
o.php contains both html and php. html here gets user input for eg:user name and password this information is passed to php using php-self.
I want the user input of o.php passed to t.php without any modification in o.php.
I ve used include and require in the t.php but the problem is it...
I just installed Apache 2.2.15/PHP 5.3.2/MySQL 5.1.44 on Windows Vista. Apache is working fine, PHP is functional, and MySQL works on the CLI. However, when I try to access MySQL via PHP, I get an error (Fatal error: Call to undefined function mysql_connect()). extension=php_mysql.dll and extension=php_mbstring.dll are uncommented in the...
I want to create a section in my site, where a user has a few simple update buttons.
Each of these update buttons will be going to the server, and will do a long crunching behind the scene.
While the server crunches data, I want the user to have a some kind of progress indicator, like progress bar or textual percentage.
I'm using jQue...
PLEASE CHECK ANSWERS by VolkerK too, he provided another solution, but I can't mark two posts as answer. :(
Good day!
I know that C# allows multiple iterators using yield, like described here:
http://stackoverflow.com/questions/1754041/is-multiple-iterators-is-possible-in-c
In PHP there is and Iterator interface. Is it possible to i...
I want to resize a image with DPI 300 or greater..
I want it's DPI to remain intact...
I have used GD library function to resize image cropped but it brings down DPI to 90!
please give a solution as my requirement involves no downsizing of DPI
...
I'm looking at a way to create a summary of transactions within a certain month based on the contents of a PHP array.
Intended outcome (excusing layout):
-------------------------------------------
| December 2009 | 12 |
| January 2010 | 02 |
| February 2010 | 47 |
| Mar...
Hi guys, I'm modifying our collaboration system so it can be listed on google applications. A small issue I'm facing is the registering of user details. By default whenever someone logs into their google Apps account they pretty much are logged into the application.
For every action taken by a registered login in user I store the user ...
Hello,
although I read through the manual here:
http://www.doctrine-project.org/documentation/manual/1_2/hu/hierarchical-data
I couldn't find a way to move a node from a Leaf to become a Root node. Any clues?
The question is trivial for inserting a new node...but what about updating a node?
...
I find myself struggling to do simple things that would normally take me about 5 minutes to do in PHP. At the moment, I'm trying to create a basic form which will print the details on another page when you click submit.
Looking at the documentation, I find examples but none explaining why it works in such a way.
...
I use htmlspecialchars function in my string. But, I don't want to clean them;
<b>, <br>, <p> <ul>,<li> bla bla...
Example: Mystring = "<script>.....</script><br><b>test</b><p>aaaa</p>";
I want to; =
.....
...
Possible Duplicate:
php multi-dimensional array remove duplicate
I have an array like this:
$a = array (
0 => array ( 'value' => 'America', ),
1 => array ( 'value' => 'England', ),
2 => array ( 'value' => 'Australia', ),
3 => array ( 'value' => 'America', ),
4 => array ( 'value' => 'England', ),
...
Hi, I'm a little confused as to how i can delete a parent node of something which i can find via an xpath search:
$xml = simplexml_load_file($filename);
$data = $xml->xpath('//items/info[item_id="' . $item_id . '"]');
$parent = $data[0]->xpath("parent::*");
unset($parent);
So, it finds the item id, no problems there - but the unset is...
I have different php output in jQuery-based tabs. This output is formed from database and it consists of several <div>'s. Every time I click any tab it sends AJAX request to the php script which performs "SELECT" request and gives result back as response to AJAX request from the tab.
$(document).ready(function() {
$('ul.tabs li')....
hi i tried 2 things what should be the same however it my testing says different does anyone know why the only thing i do is put it in a variable...
if ($_SESSION[$something] === null)
echo("this is null");
$_SESSION[$something] does not exists so it indeed says: "this is null".
now look at this
$theSession = $_SESSION[$s...
how we do basic debugging in PHP ?
Can anybody share true horror story on debugging PHP application (or (even better) on PHP framework such Codeigniter and Wordpress) ?
i love to hear real experience in case i have to encounter similar situation on my journey to learn PHP.
...
Considering this PHP example:
class A
{
public function getB( )
{
return new B();
}
}
class B
{
public function test( )
{
echo "Hello";
}
}
I could use this:
$a = new A( );
$b = $a->getB( );
$b->test( ); // Hello
Or this:
$a = new A();
$a->getB( )->test( ); // Hello
Taking a closer look at the second example...
Hi, I'm using ereg in the followin way to validate a field which can contain only numbers from 0 to 9:
if(eregi("^([0-9])*$", $mynumber)) return true;
However the string must have between 8 and 10 characeters. Is it possible to improve the same ereg usage to check for a valid string length as well?
Thanks in advance.. all ereg tutori...
I'm trying to make an url that adds a / to all hrefs and srcs in a string.
It should only add a / to urls that don't have a http:// at their beginning and that don't have / yet also.
If we have this:
<a href="ABC">...
<img src="DEFG">...
<a href="/HIJ">...
<a href="http://KLMN">...
The results should be something like this:
<a hr...
I keep getting an "Notice: Undefined index: did" error with this query, and I'm not understanding why... I'm much more used to mysql, so, maybe the syntax is wrong?
This is the php query code:
function get_demos() {
global $session;
$demo = array();
$result = pg_query("SELECT DISTINCT(did,vid,iid,value) FROM dv...
hi everybody
Is there any possible code for getting output in php(all possible word from word dictionary)
for example....for word "werflo"
flower
fowler
reflow
wolfer
...