php

In onclick event i want the pass the variable to div(i'm using single div)

in onclick event how to pass the variable to div, using that variable i want display the values in the div. ...

select option clears when page loads in php

Hey guys, the scenario is this: see select below <form name="limit"> <select name="limiter" onChange="limit(this.value)"> <option selected="selected">&nbsp;</option> <option value="5">5</option> <option value="10">10</option> <option value="15">15</option> </select> </form> I want whenever any ...

Where do you keep your web development environment, in your workstation or on a server?

In several years I am using my workstation as development environment. I think that most of web developers use their workstation for running their servers, Apache, Tomcat, Mongrel etc. I have been working in a company that have a Unix development server in another city, with the document root folder share with samba. I am still developin...

J-query J-player is not auto playing

I have used jPlayer in my music site .The actual songs data in dynamic.It is been adding on user checks from 10 listed songs on every page.jPlayer is getting added with the playlist but not autoplaying.when i'm clicking manually only it is getting palyed. I tried with playItem= 0,playItem= 1,playItem= 2...etc., Can any body suggest be ab...

PHP Combining Two Negative OR Conditions

I'm writing a PHP site, and am using google analytics to track site activity. I've written a function that's going to echo the tracking code, that can be included in the common site footer. The thing is, I don't want it to track hits from our office (I've had mixed results with Google Analytics' IP filter before so have chosen to hard ...

PHP + PayPal - how to integrate/merge both?

hi all, i have an idea about how pay-pal works but not an expert. I'm asked to implement online banking (using PHP) through PAY-PAL in my page. I've no idea where to begin. No introductory sites where found by 'googling'. Is web-service needed for this implementation? Any site for beginners will do. Thanx all. ...

Best way to open,crop,rotate and convert a windowsbitmap (bmp)

I like to open a Windows bitmap file within php. I found some piece of code (imagecreatefrombmp), that converts a bmp to png. But that code is in plain php and to slow. My images have a size around 1000x2000 pixels. gdlib doesn't open bmp files. IMagick to complicated to compile and i don't find windows binaries that work with my php...

SQL required to showthe highlights of a database on a website homepage

Hi, Wikipedia http://en.wikipedia.org/wiki/Main_Page , has sections like: Todays featured article, From the news, Did you know etc. Say in my page, I want to get the main highlights from the database table(s) (multiple databases possible), what is the best possible way to query? I mean create separate connections and then quer...

calling one php function from other?

hello i want to know how to call a function defined in one php file from some other function defined in some other php page. ...

Count html links in a string and add a list

Hi. I store the content of a website in a string $html. I want to count all html links that link to a file in the .otf format, add a list of these links to the end of $html and remove the original links. An example: <?php $html_input = ' <p> Lorem <a href="font-1.otf">ipsum</a> dolor sit amet, consectetur <a href="http://ww...

Inconsistent get_class_methods vs method_exists when using UTF8 characters in PHP code

I have this class in a UTF-8 encoded file called EnUTF8.Class.php: class EnUTF8 { public function ñññ() { return 'ñññ()'; } } and in another UTF-8 encoded file: require_once('EnUTF8.Class.php'); require_once('OneBuggy.Class.php'); $utf8 = new EnUTF8(); //$buggy = new OneBuggy(); echo (method_exists($utf8, 'ñññ'))...

php & mySQL: Selecting Multiple Books and showing their info in next screen

Hi all, Let me illustrate this with an example. Consider there are 10 books (there may be more, even 100+ on a single screen). A customer can order any number of books. In the fontend, each book is represented in a row and the book details are arranged column wise. Now the 10 books (along with their details) are shown in 10 rows. BOO...

Problem with imagecreatefrompng (PHP)

Hey guys, in one of my PHP projects, imagecreatefrompng complains, that the image "is not a valid PNG file". Warning: imagecreatefrompng() [function.imagecreatefrompng]: '/.../...png' is not a valid PNG file in /.../...php on line ... I'm pretty sure, the file is valid, because I can open it in any program. So I was wondering what e...

Python's equivalent to PHP's strip_tags?

Python's equivalent to PHP's strip_tags? http://php.net/manual/en/function.strip-tags.php ...

PHP open_basedir restriction creates puzzling error messages

In the perpetual pursuit of security, I've been applying an open_basedir restriction to my Debian hosting with PHP 5.2.6. I'm sometimes getting errors like: File(/var/www/remos/access-logs) is not within the allowed path(s): (/var/www) Or if the open_basedir is changed to have a slash on the end: File(/var/www/remos/access-logs) is not...

PHP deprecated code?

HI all Running PHP Version 5.2.11 and we've been given a site which we're told was running on an earlier version (4 possibly). We've an odd problem where several pages which have a bunch of forms which update the MySql are not working. The problem is where the variables used in the update script are not being defined anywhere in the ph...

Using PHP and google Maps Api to work out distance between 2 post codes (UK)

Hay, I wondering how to work out distance between 2 post codes using PHP and Google Maps Api. Any one got any idea or links to examples. ...

How to get a variable from another function

Hello, I am new to PHP and I am trying to create a web mashup with amazon and ebay. My problem is that I have a function called "printCategoryItems()" which sets a variable called $keyword. I want to use this variable elsewhere in the code but I can't get it to work. For Example, <?php function printCategoryItems(){ if(isset($_GE...

loading default values of combobox?

i am trying to develop a website in php and i am dynamically loading a page in using its id with the help of js and that loaded page has a combo box and i want as the page load in the first option of combo box should be displayed in text box on same page. i tried onload option but it is not working as page is not dynamically loading in...

How to set php web compatibility with different browser?

How to set php web compatibility with different browser? ...