php

PHP general form generator/builder

I'm looking for an open source php form builder or form generator to add/edit/delete/search records? I have to create a simple manager for some records, it's a common application that should be found easily, but I can't find any good code/class/application/etc :( Any help is appreciated. ...

How to simplify my country select menu PHP/mysql

I have a select menu that displays countries. It looks at the DB and judging by the value in the db shows the option as selected. Is there a simpler way off doing this than: if ($country == 'AG') {echo '<option value="AG" selected="selected">Antigua</option>';} else {echo '<option value="AG">Antigua</option>';}; if ($country == 'AR') ...

Ajax & PEAR\HTML_TreeMenu @ Joomla module

Hi. I'm working on a Tree Menu that gets it's parents and childs from a web service via soap. I have used PEAR\HTML_TreeMenu and i have my tree up and running.. So now i have to do 2 more things: Ajax it so parents and child are loaded async and when need it. Get all that in a joomla module... My problem for starters is that HTML_T...

is cURL part of the original PHP installation?

When I first installed PHP did it include the libraries for cURL? ...

Web based concurrency solution required for database editor in php

Hi, I want to have a record editor in PHP and I want to be able to detect if it's been updated already during the commit. I've already read some solutions, and they suggest a timestamp column, or rowversion. Does anyone have any other general solutions that do not involve modifying the database structure? I was going to hash the reco...

&#353; and other char not visible

Hi All, I'm be wild about some CZECH char. On DB I've saved strings with č (and similar chars) and I'm able to show this only if I set my page charset to ISO-8859-1. It could be ok, but I've an UTF-8 XML file and when I try to get some string from this xml I've some problem. Basically the string from XML will not be shown correctly if...

Create database programatically from PHP on WHM/cPanel server

Hi everyone, I was wondering whether it is possible to create a new database and user, from PHP, on an WHM/cPanel server. Thanks in advance for your answers, Constantin TOVISI ...

Why NOT use POST method here?

I have a classifieds website. In the main page (index) I have several form fields which the user may or may not fill in, in order to specify a detailed search of classifieds. Ex: Category: Cars Price from: 3000 Price to: 10000 Color: Red Area: California The forms' action is set to a php page: <form action='quer...

Codeigniter: validation problem

For some reason a user can login with any password, first I thought I forgot to check for the password but I didn't... and I just cant find the problem here is the model: /*#######################################################*/ function validate() /*#######################################################*/ { $this->d...

PHP Object Access Syntax Question with the $

I've been having trouble searching for this answer because I am not quite sure how to phrase it. I am new to PHP and still getting my feet on the ground. I was writing a page with a class in it that had the property name. When I originally wrote the page there was no class so I just had a variable called $name. When I went to encapsu...

curl run out very slowly.

here is my code bellow: $url = "http://localhost/Test/post_output.php"; $post_data = array ( "foo" => "bar", "query" => "Nettuts", "action" => "Submit" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // we are doing a POST request curl_setopt($ch, CURLOPT_POST, 1);...

How to pass arguments to access rules expressions in yii framework controlers

ow to pass arguments to accessRules experessions The code below doesn't work becouse $owner_id is not defined in class where expression is evaluated. Any ideas how to fix it? public function accessRules(){ $owner_id = $this->loadModel()->owner_id; return array( ... array('allow', 'actions'=>array('update'), ...

Facebook+php: upload photo to your friends' specific album

I would like my application to upload photo to a specific album of my friend. photos.upload(); can take albumid and userid as parameters, but it says "invalid albumId" whenever I try to upload it into my friends' albums, where as it successfully gives out the pictureId if it were to upload in my own Albums. ...

put one image on the other one

Possible Duplicates: PHP: How to draw an image over another image? How to include an image inside another image in PHP? Hello How can I put one image on the other one with php? Thank`s for help ...

I want to select a particular list of words containing certain characters using php

Hello, I want to select a particular list of words in a paragraph containing certain characters $query_search_text= "SELECT * FROM para where para_main='%text_words'"; I tried using the % sign, but it does not work. It works if I give in the full text. Thanks Jean ...

Convert a Javascript Date format to desired PHP format

How can we convert Wed Jun 09 2010 which is returns from a javascript function and get in a php script.I need to convert this date format to 2010-06-09.Thanks ...

Header redirect not working in PHP

This line isn't working for me: header("location:landing.php?id=md5($_REQUEST['user'])"); I need to pass the id variable. How do I do this? ...

A short "RewriteRule" regexp question

I have a very very long querystring which ALWAYS starts like this: mydomain.com/bincgi/sql_query.php?alot alot alot of variables passed along What is the regular expression to make a rewriteRule if I want to pass along all the variables but via this link: mydomain.com/search/all variables here instead..... So the last one is wh...

Give border to image created in PHP

How do I give a border to an image created using PHP? ...

Unicode symbols coming wrong

Obviously, there must be something stupid i'm doing. The unicode chart for subscripts and superscripts says #00B2 is superscript 2, but i get scrambled output. 0078 is x, but I get N, and 0120 is x. Am i reading wrong manual? EDIT $x = '&#0078;'; print html_entity_decode($x, ENT_NOQUOTES, 'UTF-8') . "\n"; ...