php

How can I make the text adjacent to my checkbox clickable in php

how can I make users check on textclick? My script is: <?php foreach($getcountry_name as $key => $value) { ?> <tr> <td width="25" valign="top"> <input name="country_name[]" type="checkbo...

How to predict/calculate field length of numeric values (INT) in MySQL?

In phpmyadmin there is a field length which you may specify, usually set to 11 on INT if nothing is specified. Field Name: ID Field Type: INT(11) // This is what I need to figure out! How can I calculate the length, and what does the length actually stand for? Does it mean how many digits? Bytes? And what is Unsigned and Signed g...

Ajax is "Getting" not "Posting"

I am trying to use the Post Method in my jquery code but it using the Get method for some reason. I am working under the Wordpress Framework which have renamed the "$" function to jquery, which I then renamed to $j. Can anyone help me with this simple function? $j.ajax({ method: "POST", url: "extension/marker.php", data: "series=test"...

How do you proxy though a server using ssh (socks…) using php’s CURL?

I want to use ssh, something like this: ssh -D 9999 username@ip-address-of-ssh-server But within php CURL, but I don't really see how this could be done? I noticed “CURLPROXY_SOCKS5” as a type in the php site, but guess that wouldn’t work since it isn’t really socks, it’s ssh… I’m currently using this code: curl_setopt($ch, CURLOPT...

Adding items to a Zend_Paginator already created?

Hello, in my controller I have created a paginator instance like this: // On crée un objet paginator pour afficher un tableau de résultat. $paginator = Zend_Paginator::factory($versions->getVersions($projectId)); $paginator->setCurrentPageNumber($this->_getParam('page')); $paginator->setItemCountPerPage(15); Then I iterate over in my ...

how to edit data the data stored in database and which form it should be retrived back...

HI everyone I have a html application form which have username,password,age etc .NOw i am able to store these values into database without any problem.Now i want to add a edit button if user want to edit his profile.. 1.First tell me where i should put this Edit Button.I think i should place it into user'home page where he is redirecte...

Learning PHP Class

I have some serious issues understanding PHP class from a book. It seems so difficult. I guess I am more of a visual learner. Can anyone recommend me a great resource to help me learn this better? ...

Getting number of online users from vBulletin

I'm redesigning the template for a Wordpress based site which is bridged with a vBulletin forum. How can I can I get the number of online users as they are shown on the forum's pages so that I can insert them in another page? Is there some sort of API to interact with? ...

Securing php application

Hi , I have built a cms from scratch in PHP and I need a little help with getting it more secure. Basically I have arranged all my important files as followed: /var/www/TESTUSERNAME/includes/val.php Is this a secure way to stop people from getting hold of my values ? Would it be a better to store these values in a database then ru...

How can I use friendly/rewritten urls in php?

I have problem to encrypt the url. example existing url= www.domainname/search.php?key=books&type=title&Submit=search i want to encrypt this url. encrypt url= www.domainname/keword-keyword-keyword.html in this form... can any one solve my problem.. i will be greatfull to him or her ...

Php loop need help?

This is sql table id id_user id_userfor description date 1 231 119 a to b 2010-02-05 17:42:47 2 231 231 myself 2010-02-05 17:36:28 3 231 119 from x to b 2010-02-05 17:36:29 I could not find the w...

How to safely encode PHP string into alphanumeric only?

How to safely encode PHP string into alphanumeric only string? E.g. "Hey123 & 5" could become "ed9e0333" or may be something better looking It's not about stripping characters, its about encoding. The goal is to make any string after this encoding suitable for css id string (alnum), but later I will need to decode it back and get the or...

php preg_replace question

I have this code: $text = '[iframe=200x200]http://stackoverflow.com[iframe] '; $text = preg_replace( '/\[iframe=(.*?)x(.*?)\](.*?)\[\/iframe\]/ms', '<iframe style="border: 1px solid rgb(204, 204, 204); width: \1px; height: \2px;" src="\3"></iframe>', $text ); echo $text; Why is it not working? ...

plugin on squirrelmail

Hello, To add a textfield on squirrelmail using plugin i created a folder(for a new plugin) and some files in it like setup.php ,function.php ,config.php,templates.tpl. Now i need to know how to add/link all the files with the main so that i can see my plugin on squirrel mail GUI after the login password field. ...

Struts vs Zend ? Java vs PHP ?

I know it's a hot question that need anwsers ^^ From my viewpoint, using Java vs PHP, is nowadays a problem of system resources (Hardware, Software, etc.). For Java, you have to deploy J2EE Stack (JDK, AppServer, etc.) (~200M) on your server, for PHP you need to deploy a LAMP system (~100M). Using Java was in my opinion due to object o...

Get image mimetype from resource in PHP/GD?

I'm trying to find the mime type of an image. PHP has the function getimagesize but that only takes a filename, whereas I have an image "resource" instead - i.e. an image created from imagecreatefromstring. I found the functions imagesx and imagesy which return the width/height from a resource but I can't find any function that tell me ...

Not getting the Tag's nodeValue using DOMDocument class in PHP?

i am using DOMDocument class, to parse HTML document in PHP. the code of table i am using... <table> <tr> <td> 123 employees </td> </tr> <tr> <td> $50,000 </td> </tr> </table> i am not able to fetch nodeValue of the tag, which are like in the above format, i.e ($50,000, 123 employees ). ...

Replace Multiple "-" PHP

Possible Duplicate: PHP Preg-Replace more than one underscore Hi, I'm just wondering how I can replace 2 or more - signs in a string with just one in PHP. So like 1-2---3--4 would go to 1-2-3-4 Thanks :) ...

To get Numeric value from a alphanumeric String in PHP?

i want a function or a code to get numeric value from the string whose value is "2008 Revenue $5,700,390,000". the output that i want is $5,700,390,000. ...

How to hide links on browser's statusbar when you mouseover on links on webpage?

I am using Zend, PHP, AJAX, JQuery in my projects. Question is that how can I force to not display a link on browser's statusbar when I mouseover on a link on my webpage. Best example is on this site, when you mouseover the up-vote link on this site, it does not show the link and after click the votes increased without refreshing the pa...