php

How To solve dis synchronize of form Validation?

I am wondering if anyone out there can help with my form Validation Please? I am having a few problems trying to synchronized out how certain bits of the actual structure of the script works together. <?php $flag="OK"; // This is the flag and we set it to OK $msg=""; // Initializing the message to hold the error messages if...

How should I handle website config files when importing a site into a SVN repository?

I'm starting to use SVN repositories for all of our websites and wanted to know what the best practise was regarding website config files. Should they be stored in the repository? The problem is the configuration of the websites need to be different for the working copies than that of the live sites. If I edit the config file for a work...

How to reencode url parameters with Zend Framework

I use the following code with my Zend Framework application: controller: $paramsOtherAction = $this->getRequest()->getParams(); $paramsOtherAction['action'] = 'otheraction' $this->view->paramsOtherAction = $paramsOtherAction; view: <a href="<?php echo $this->url($this->paramsOtherAction)?>"> Do other action with same params </a> T...

Should a website's images folder and images be stored in SVN repository?

I'm currently importing all of our PHP websites into SVN repositories. Each site has a images folder which contains all the sites images. The images are updated quite frequently as most of them are offer graphics. Should the images (binaries) be stored in the repository? The other issue is that they are updated all the time. How would...

PHP image crop error

Hello again! I have a small custom drupal module which crops user profile images: $folder = 'sites/default/files/profile_pictures/'.$uid.'/'; $filename = $_POST['filename']; $orig_w = 480; $orig_h = $_POST['height']; $targ_w = 150; $targ_h = 92; $ratio = $targ_w / $targ_h; if(isset($_POST['form_sent'])) { $src = imagecreat...

mysql_connect() is not getting to the correct server.

Hello, I have a system with a globally open mysql connection to the local server. In one of my files I am opening an additional connection to a remote machine. Wieldly instead of trying to connect to that machine, I get an access denied message from my ISP (it seems to be trying to connect to the database on that machine). I am trying...

Will XPath 2.0 and/or XSLT 2.0 be implemented in PHP?

The question was asked but deleted by the asker before it received an answer. Because I believe the question is sound and legitimate and serves a purpose, I'm asking it again and provide the answer I already wrote for the original q. Will XPath 2.0 and/or XSLT 2.0 be implemented in PHP some day or are there any plans? ...

HTML snippet within Zend_Form

I'm using Zend_Form as part of a simple signup process. In part 1 of 2 the user is able to upload a number of images. In part 2 - for each one of these images - I ask the user to add further details - an additional 4 text fields grouped together using addDisplayGroup. Within each display group I want to display a thumbnail of the uploade...

extra objects in soap results and responses

I try to implement simple SOAP server on ASP.NET and simple client on php and get the problem with response and request format. My server is very simple, take one string and return another: [WebMethod] public string HelloWorld(string Additional) { return "Hello " + Additional; } I expect, that php client is such simple: $client =...

How to search for record in mysql using php?

Thanks for all your help, I now have add, update, and delete functions on my database manipulation program. But I'm having difficulty on searching for records in mysql database. Please help me in correcting my codes, and if you know a site that I can use as my reference please do tell. Thanks, here is my search code: <?php ...

JQuery call to .php file and passing three arguments

I want to call a .php file and pass three arguments so that the .php files GETS from the query string. I am new to JQuery. Can someone illustrate how to call the .php file using JQuery? ...

Review my Paypal IPN Handler Please

Hey guys! I wrote an automated donations system for someone, so that people who play on his game servers can enter their information, donate, and automatically be added to a database. Its working great, but im not very php saavy, so I am hoping you guys can take a look and tell me what else I should add. I need to remove them when the s...

How to create PDFs using zend framework ?

I have some data in a text area and there is a link 'create PDF'. When a user click 'create PDF' link, the data should be printed on an PDF and download window of browser should appear to download that PDF. Any Idea ? Thanks ...

PHP - HTML form two possible actions?

Hi, I'm creating a registration page and I would like to give the user the opportunity to review their information and go back and edit it before clicking a confirm button which inserts it into the database. Is there a way to include two submit buttons which point to different scripts or would I have to duplicate the entire form but use...

PHP code called via JQuery stopped working.

Initially, I used a .js file that contains AJAX functions to call a .php file. The .php file contains code to dynamically populate a DropDown based on certain parameters passed via QueryString. Everything works fine with the above method. But now I want to populate the DropDowns on page load and so want to use JQuery instead of my old m...

Joining tables in MySQL question (php)

Hi, Situation: In my database I have a table called 'artists' and 'tags'. Each artist has a set of tags, saved in a linking table 'artisttags'. Each unique tag is saved in a table called 'tags'. Problem I would like to show all artists that have one (or more) tags in common with a given artist. function getSimilarArtists($artist_...

Save Email Password? - Is this secure?

Hello guys, today there was a big problem i got wile programming on my newest project. I have to save the Users Email-passwords in my system ( php + mysql ). I do it now this way: Is this secure? And when not what is a better way to do it? greetz from white Vienna Dom ...

List records in mysql using php

This is the last thing I'm gonna do, after I can make this work, I can produce to designing which might be a lot easier. Thanks for all your help. I want to list a record from mysql using php by typing a query in the text box. Then the program will list all the records that has that element, for example address. Here is my code: ...

insert am pm from front side and store in time field of mysql

I m entering date in front side as 10:00 AM 12:00 PM etc...( means AM/PM format). now i want to save that value in databse in time datatype field, how do i save that am pm value into time datatype in mysql and again want to show as am pm on front side?? ...

PHP XML Object To HTML Friendly Text String?

Hi Guys. I'm using PHP5 and it's inbuilt SOAP functionality. I'm catching the SOAP Fault errors, and email myself when one is triggered. What I really need to do is include the __getLastRequest() and __getLastResponse(), however as these are XML objects, when I try to include them by echoing them into the body of my HTML email, for ob...