php

Disable one option value inside select tag not working in IE6Ha

I have a select box with 4 values (a,b,c,d). I just want to disable 'c' inside the dropdown. I used disabled property, it is working in all browsers but not in IE6. I want to make it work on IE6. Could you give me some fix for this issue. thanks ...

live/quick mysql query builder/viewer

Is there such a thing that will allow you to create a mysql query and view its results live? Almost like an ajax sort of live search results kind of thing, so each character i type in will affect my result? ...

Is it possible to use JSP and PHP at the same time?

1 function is written in Java while the API of another function is written in PHP. So, is it possible to use JSP and PHP at the same time? ...

Joomla DB Write

Does a Joomla site write anything (session etc.) to the Db upon browsing (no logins just plain browsing)? I would like to make my DB read-only for maintenance purposes. ...

Decrypting string using ASP.Net encrypted by Php

I am encrypting My data in PHP like this : $encrypted_string = mcrypt_encrypt(MCRYPT_DES, 'abcdefgh' , $input, MCRYPT_MODE_CBC, 'qwerasdf' ); $encrypted_string = base64_encode($encrypted_string); return $encrypted_string; And Decrypting the Same in C# like this : public string Decrypt(string input) { input = Server.UrlDecode(inp...

IP and Subnet to Start IP End IP

So I have an IP with a Subnet like: 8.8.8.0/24 How can I convert this to 8.8.8.0 and 8.8.8.255 (actually their ip2long resultants) In PHP and JavaScript ...

Help Hacking Gruber's Liberal URL Regex

I've taken the Liberal URL Regex from Daring Fireball, merged it with some of Alan Storm improvements and hacked my way into fixing some bugs like support for IDN chars inside parentheses. This is what I've: /(?:[\w-]+:\/\/?|www[.])[^\s()<>]+(?:(?:\([^\s()<>]*\)[^\s()<>]*)+|[^[:punct:]\s]|\/)/ However I've encountered a bug that I'm n...

Retreiving data from an array PHP

Hi Guys, Im trying to get a value from an array used in the Joomla Plugin Hot Propertys. The array is stored in $this->properties inside that is group of arrays (sorted by number) and inside each one of them is a key called typeid. Basically i just need to get the typeid from one of those arrays (for example array 0) Ive tried $this-...

question about php mail function.

what is smtp,smtp_port?and how can it get? ...

Unit testing and encapsulation

I'm trying to get into unit testing, but there's one thing bothering me. I have a php class which I want to unit test. It takes some parameters, and then spits out HTML. The problem is that the main functionality is calculating some values and conditions, and these I want to test. But I have put this in a private method, because normall...

PHP - Check to see if an image has a drop shadow added?

Hello, I'm wondering if there's a decent way or any of some sort to check an image to see if there is a drop shadow added. Doing this with php, if possible. Just curious if there's any clever way of going about this, possibly. Thanks, Shawn ...

how can i send message?

I have programmed for mailing in php.but how can i send mail through local server? ...

How to code jquery in codeigniter.

I have the following controller and view. I am trying to learn jquery in codeigniter. The code does not work. So I am hoping someone spot out what I am doing wrong and correct me. Thanks in advance. class PhpJqueryBook extends Controller { function __construct() { parent::Controller(); } public function index() { ... } funct...

Problems adding time

I've run into a strange timewarp while doing some math with time, and it has left me stumped. Or, well, I've found the reason (or atleast a plausible one), but don't quite know what to do about it, or if there is indeed anything that can be done. The issue in plain words is, that when adding time in larger units than 1 week (it's multip...

Access to elements of a multidimensional array, with a function

Hi, I need a function with variable number of arguments, to access to the elements of a multidimensional array. I have done in this way ($this->_config is the array)... function item() { if(func_num_args() != 0){ $config = $this->_config; $args = func_get_args(); foreach($args as $item){ $config =...

Dealing with register_globals

I am not sure whether this would be good to be marked as community wiki, but anyway: Is there an easy way to kill the register_globals? I'm working on a PHP Framework and right now, I just set the script to terminate if register_globals is On. Although I prefer to force people to disable it, there are servers that still have that on. I...

PHP unexpected T_VARIABLE error

I am getting this error PHP Parse error: syntax error, unexpected T_VARIABLE, expecting ')' in /Applications/MAMP/htdocs/widget_corp/includes/functions.php from the following code function get_all_subjects($public = true) { global $connection; $query = "SELECT * FROM subjects ORDER BY posi...

php & ruby scripts accessing the same db and table can cause corruption ?

i have a php file which regularly writes and reads tables from mysql DB. i have another ruby file that runs at the same time which reads and write to the same tables in mysql DB. can there be potential issues with this set up ? ...

AJAX page + SQL query behaving vaguely ?!

I'll try my level best to describe the problem in words here since it's quite confusing. An 'sql' query gives no output, Through ajax page, when variables are passed in the query. Even the count of number of rows gives 0. So, I 'echoed' the same query which has the passed variables now having the values. When 'copy'-'pasted' the same (re...

how to biuld a subdoamin from script

In my project i have to make a subdomain, i.e if the user name is XXX when he register, a sub domain will be created like XXX.example.com how to do it? I will use php for scripting. regards tarique ...