I can't seem to figure out this problem for some reason my piece of code (no votes cast) will be displayed if there are no votes casted in Firefox but not in Internet Explorer I was wondering if some can show me how to fix this problem so the code is displayed in both browsers?
I'm using JQuery and PHP.
Here is the PHP code.
// functi...
Just wondering if you anybody has had much luck getting XDebug working for Drupal 6.14 on Snow Leopard?
I noticed that Snow Leopard seems to come with php 5.3 which some people say should work with Drupal 6.14, though I haven't had any luck.
After that failed, I tried installing php 5.2 using macports (checking out from CVS at a previo...
Here's the one I'm using:
<?php
final class Database {
private static $oDb;
public static function init() {
if(self::$oDb == NULL)
{
self::$oDb = mysql_connect('localhost', 'mysql_user', 'mysql_password') or die(mysql_error());
mysql_select_db('mysql_db_name', self::$oDb) or die (mysql_err...
I'm looking for a function to dump variables and objects, with human readable explanations of their data types. For instance, in php var_dump does this.
$foo = array();
$foo[] = 1;
$foo['moo'] = 2;
var_dump($foo);
Yields:
array(2) {
[0]=>
int(1)
["moo"]=>
int(2)
}
...
I am pretty new to using object/classes in PHP and I am curious about EXCEPTIONS, TRY, and CATCH
In the example below I have all 3 shown in use. Obviously an exception is some sort of way of triggering an error but I do not understand why? In the code below I could easily show some sort of error or something without the exception pa...
Now if there is no vote casted yet my rating script will not work in Internet Explorer I would not be able to click the star and have its value entered into the database and displayed on the browser.
But if there is one vote already casted the script will work in Internet Explorer perfectly.
How can I fix this problem so that if there ...
Hi all,
PLATFORM:
PHP, mySQL & jQuery
WHAT I HAVE:
I have a Database table. Within my application, I am able to fetch all the rows. When I am querying the database, I have set the records fetch limit as 30, but that can be changed via a dropdown list. So consider that I am fetching upto 30 rows of data in a single query and displayin...
I want a PHP code to send a mail using dreamhost.com what will be the code........
I know that SMTP must be use to send the mail.
So please anyone who have code please give it.......
...
i want to apply gzip compression on my site , all my site is in html and
i have following limitations
hosting server is windows 2003 server.
i can upload files, but i can't modify IIS (as most if users just having hosting account)
i can't modify the .html files to .php as i have too many pages in html, changing file extension is big...
Why have 2 functions that does the same thing? They both add a linebreak.
Any diffrence between them?
...
Hi,
If I have a URL (eg. http://www.foo.com/alink.pl?page=2), I want to determine if I am being redirected to another link. I'd also like to know the final URL (eg. http://www.foo.com/other_link.pl).
I want to know how to do that in PHP
Thank you all for your help :)
(more information:
I want to have a function that is called doesI...
From my basic understanding in Object Oriented coding, PHP in my case, you want to make all your classes pretty much independent of one another. I have just started my object oriented application so it is a great time for me to make changes in it's early stages.
Here is my situation where I break this rule or whatever you want to call ...
Hi
I have a php script, which downloads, rescales and stores an image using the following command:
exec('convert -sample 100x100 http://someurl.com/pic.jpg images/somename.jpg');
It all worked fine until I put it on a different server (this one's gentoo, if that makes any difference. Apparently convert won't grab remote images, and i...
Hello,
Im looking for a PHP library similar to the PHP GD library though having simplified classes.
Any suggestions?
...
Hi I am new to Php.. i want to know how mailto script works in php .. and can any one pls provide a script for that..
...
How can I find the POST URL for a form that's being posted using ajax (action handlers are in PHP, but I doubt that matters too much in this case)?
Problem is I need to find out using an alternate method as I don't have access to the source.
...
I am trying to get the Paypal issue resolved whereby the users are made to make payments using the Do Direct method of Paypal... please suggest me some sort of tutorial for this implementation..
...
Hi,
On the php manual page for mail function, there was a user comment saying "take care to prevent header injection".
In my application, I use the mail function, and the only user input I use as a parameter to the function is the email address.
I do a preliminary check of the email address using the regex ^[_a-z0-9-]+(\.[_a-z0-9-]+)*...
Hi,
Is there any way to convert rtf format to pdf using PHP?
Thanks
...
I'm trying to create "related articles" for our news, based on tags (single word tags). If a story is tagged with 3 tags, I'd like to be able to pull up the most recent entries for each tag, order them by date, and display only the most recent 5.
Here's what I'm trying, that obviously doesn't work, because it overwrites the array varia...