php

captcha error Warning: session_start() [function.session-start]:Cannot send session cache limiter - headers already sent (output started at

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\program\sanweetha\quotation.php:280) in C:\xampp\htdocs\program\sanweetha\php\captcha demo\captcha_demo.php on line 1 ...

ms-access database to mysql database by php

How we can convert a ms-access database to mysql database by php… or How we can access a ms-access database by php.. ...

How to deal with Polish Characters while using regex ?

I have street name as KRZYWOŃ ANIELI and so what should be my regex to allow this kind of expression. Currently I have simple one which uses /^[a-zA-Z ]+$/ Kindly advise. ...

Web App fails when moved to production environment. Which server permissions do I need?

I have developed a small web app. This app allows users to upload images. It also produces text files with the names of those images (the names are stored and retrieved to/from an MySQL Database.) I have developed this app using MAMP. To create the uploaded image files I use the PHP function imagejpeg('my/path/name.jpg') and to de...

cakePHP to Code Igniter conversion

I want to convert an application from CakePHP to Code Igniter. Has anyone tried to do this? With my CakePHP application almost all the coding has been done in the controller layer, with the models pretty much exactly as they come out of baking. ...

How to generate a random but unique number and display that number within the source of my image tag

Hello guys, I have done some searching but really haven't found what I'm looking for. What I would like to do is generate a random BUT unique 5 digit number and push whatever number into an img tag on my page. For example when people come to my page this number would generate and get pushed into this image tag: <img src="http://www.sa...

Is Google the only OpenID provider that requires "identifier_select"?

I am developing an OpenID consumer in PHP and am using the fantastic LightOpenID library (http://gitorious.org/lightopenid). Basing my code off of that found in the example client script I have successfully created a consumer. However, I've run across a snag: Google requires the openid.identity and openid.claimed_id to be set to "http://...

Mysql:How to concatenate more than one row into single row with diffrent field name?

id Subject mark Year ------------------------- 1 Maths 32 2008 1 Science 40 2009 1 Science 45 2008 1 English 50 2009 1 English 60 2008 I am looking for a result like this: id Maths Science English ----------------------------- 1 32 40 & 45 50 & 60 Please advise. I am using...

Define 2D array with loops in php

I have an array $rows where each element is a row of 15 tab-delimited values. I want to explode $rows into a 2D array $rowData where each row is an array element and each tab-delimited value is assigned to a different array element. I've tried these two methods without success. I know the first one has a coding error but I do not know ho...

Create associative multi-dimensional array

Hi, I have 3 variables, each one holding a different information and send values from a text file dynamicaly. I want to put them in a Associative multi-dimensional array. let's say : $product sends car, truck, train, etc. $price sends 1000, 3000, 1500, etc. $year sends 1997, 1980, 2008, etc. How to create a function which generate...

Why does this regular expression fail?

I have a password validation script in PHP that checks a few different regular expressions, and throws a unique error message depending on which one fails. Here is an array of the regular expressions and the error messages that are thrown if the match fails: array( 'rule1' => array( '/^.*[\d].*$/i', 'Password must co...

PHP Linefeeds (\n) Not Working

For some reason I can't use \n to create a linefeed when outputting to a file with PHP. It just writes "\n" to the file. I've tried using "\\n" as well, where it just writes "\n" (as expected). But I can't for the life of me figure out why adding \n to my strings isn't creating new lines. I've also tried \r\n but it just appends "\r\...

Need help with jQuery/AJAX call in Safari/Mac

I've got something that works perfectly in FF and MSIE but it's not working properly in Safari. It's a form with selects that get updated via AJAX/jQuery from a MySQL DB. In Safari, when you select the first item, it correctly loads the options for the next select menu; however, when you choose one of those (which loads new options in a...

Get current ajax url and dynamically create link to corresponding page in a different language

Hi all, I am working on a website that uses a hashchange ajax navigation. The urls look something like this: domain.com/#contact.html etc... The site is going to exist in several languages and i want to place the language menu outside of the ajax content div, in the header for instance (a part of the page that stays the same). My...

Difference between executing php from the commandline and from the Http Side

What is the difference between executing php from command line and from Http side .Do They use the same executable such as (Php.exe or php-cgi.exe ( Apache or IIS )).Do the Results differ when they are executing from Commandline or HTTP side. ...

How to store characters like ♥☆ to DB?

Previous issue - was not able to store non-english characters: http://stackoverflow.com/questions/3008918/how-to-store-non-english-characters That was fixed by using UTF8. But realized today that symbols like ♥☆ are not stored correctly. They get converted to characters like ♥☆. How can this be fixed? ...

Image Grabbing with False Referer

Hey guys, I'm struggling with grabbing an image at the moment... sounds silly, but check out this link :P http://manga.justcarl.co.uk/A/Oishii_Kankei/31/1 If you get the image URL, the image loads. Go back, it looks like it's working fine, but that's just the browser loading up the cached image. The application was working fine before...

apostrophe issue with ajax post to php

hi there, i am posting data with jquery ajax to php but if input has ' inside, data wont be posted. I tried encodeURIComponent but wont work. any idea on this ? thanks EDIT: my code var name = $("input#name_add").val(); name = encodeURIComponent(name); $.post("function.php", { name: name }, function(data) { ...

Get name and values of a form post

How can I print the name and values of a submitted form. Thanks for any help. ...

Page does update with details from the database after i hit a button

I have a code and the way it should work is,when they click on NEW CUSTOMER,it takes them to test1.php where in they enter the details and they hit submit.it saves all the details in properly in the database and when i go back and hit REFRESH ,it should come up with the customer details which they had entered in previously. But what happ...