php

Best use of Jquery sliders and PHP

Hello there, I have two questions: What's the best way to send sliders' values to a PHP page ? I'm associating each slider (several per page) with an hidden form so far, but I wonder if there's a "cleaner" way to do this. Related to the 1st question; I've some trouble with the script: var score = $(this).slider( "option", "value" );...

PHP HTML CSS Beginner USE CASE / SWITCH / IF ELSE? Need advice...

Building a website using a PHP based Ecommerce product Magnto. The problem I have is that I want to use tabbed navigation. My idea was to use CSS to show the TAB over the relevant Navigation menu item based on the URL. However, one URL always changes, so I wanted to somehow use an ifelse statement. I've come up with two methods that ...

Form data upload from iPhone to PHP server via https

Is there a good tutorial or sample project of how to upload data from iPhone to a self-owned web server? The project is like: A survey application on iPhone which stores the user input data in a plist When there is internet connection, the program will enable an "Upload" button When the Upload button is clicked, the program will upload...

header problem in php refresh

hello i have this code : <?php session_start(); echo "".$_SESSION['eventnum'].""; $urlRefresh = "testremot.php"; header("Refresh: 5; URL=\"" . $urlRefresh . "\""); ?> but the header doesnt work and this warning appear when i try to run this code : Warning: Cannot modify header information - headers already sent by (output starte...

PHP read a cookie that is on another domain

Hello, I have two domains. One domain contains the login script. It creates a cookie when logged in. Another domain have a URL shortener. So, on the 2nd domain that have the URL Shortener script have a file called session.php. Usually I was using $_COOKIE['sessionid'] to get the session id and match it using database. How can I get th...

Bulk Update in MYSQl

I have a site which has client side and admin side. There is a table called account History. which contains fields like uid | accountBalance | PaymentStatus | Date. Now this table has to be updated every month for all the paid users and the table is bulk. So what is the best way to update the table every month.Do i need to select all th...

Posting on Digg using .Net or PHP

Hi, I'm using Digg Api to get stories from digg. But I couldn't find any method to post stories on Digg using that API. Is there any other way to post stories on Digg? ...

Wamp server and xdebug installation

I am trying to install xdebug on wamp server. With this code: zend_extension_ts="c:/wamp/bin/php/php5.3.0/ext/php_xdebug-2.1.0RC1-5.3-vc9.dll" xdebug.default_enable = on xdebug.remote_enable = 1 xdebug.remote_port = 9000 xdebug.remote_host = localhost And apache error log: PHP Warning: PHP Startup: Unable to load dynamic librar...

Error during data UPDATE in php

$sql = "UPDATE tblprofile SET name = '$membername' , f_h_name = '$fathername', maritalS = '$mstatus' , dob = '$dob' , occupation = '$occupation' , ...

An issue on object orientation in php

Hello people, I have come up to issues while I'm trying to write some classes, here is an example: I have this class called TwitterGrub and I cant call it like that: $c = new TwitterGrub(); $c->twitterDisplay(); here is the class itself: <?php class TwitterGrub{ function twitterCapture($user = 'username',$password = 'pass')...

Can't set a cookie in Chrome 5

Hi, Since today I am facing a tricky issue with Google Chrome that I've just updated to v5. I have a user login process running on my website. Everything works fine on FF 3.6.x and IE 7, but I just can't set any cookie in Google Chrome 5. I'm mentioning 5 because it worked very well before on v4. My PHP script looks like that: $cook ...

how to calculate time difference in PHP

I Have to calculate date time difference how to do that in PHP. I need exact hours , mins and secs. any body have the scripts for that please give me :-P ...

url rewriting for 404 page

suppose i have a file missing at http://www.mydomain.com/user/10202.html i.e user.php then the server gives me 404 page default error.... than i add the following to my .htaccess file ErrorDocument 404 /404.html but it redirects me to http://www.mydomain.com/404.html while i want to stay on http://mydomain.com/user/10202.html and show...

How to know record has been updated successfully in php

$sql = "UPDATE...."; if(mysql_query($sql)) { $_SESSION['Trans']="COMMIT"; header("location:result.php"); exit; } else { $_SESSION['Trans']="FAIL"; $_SESSION['errors'] = "Error: Sorry! We are unable to update your Profile, Please contact to PNP HelpDesk."; h...

Future proof Tweeting with PHP

Hello I'm looking to implement a system for tweeting directly from my site backend, which is written in PHP 5. I have a script from the internet that I can adapt, but I'm concerned that when Twitter switches to Oauth only, I'll be out in the cold. Basically, I'm hoping someone can point me toward a script/tutorial that will let me do t...

PHP split content when a HTML element is found

Hello, I have a PHP variable that holds some HTML I wanting to be able to split the variable into two pieces, and I want the spilt to take place when a second bold <strong> or <b> is found, essentially if I have content that looks like this, My content This is my content. Some more bold content, that would spilt into another variab...

checkbox selection in edit section in cakephp

Hi... I want to shoe checkbox selected in edit section if there have value in DB. i m using cakephp 1.3 version .in edit section how i will show valued checkbox true. Please help me as soon as possible. Thanks Manish ...

I want to create multiple thumbnails using GD library in php, which is better creating on the fly or creating physical one?

Dear all, I want to create multiple thumbnails using GD library in php, and I already have a script to do this, the question is what is better for me .. is it better to create thumbnail on the fly? or create a physical file on my server each time I want a thumb?? and Why? Please, consider time consuming and storage capacity and other d...

Get translations from .po or .mo file

How can I extract all translations from a .po or .mo file? I need to create an array of all translations that are inside. ...

php is not recognized as an intern command (using windows)

Hello, I want to develop using a framework called symfony BUT, i do not have a MAC and i don't want to dual boot with Debian. I tryed virtual hosts via Virtual Box but it's too crappy. So i decided to stay on windows So when the tutorial tells me to do php lib/vendor/symfony/data/bin/check_configuration.php i do in the windows cmd...