php

select multiple files in file upload in php?

i know that php doesn't allow you to select multiple files to upload in one box. is there a work around or do you have to learn another language for it? ...

PHP & Mysql database updating problem

For some reason when I changed my php code from mysql to mysqli everything got messed up. For example, when a user enters a rating my mysql table updates twice by entering one new row and updating the correct row. I was wondering how do I correct this problem so it only updates the new row and checks to see if there is no row it enters ...

getting a link with str_replace

hi! as a warning I have very limited experience with PHP, with just over 1 month of learning it. I have a textform that when its submitted it goes through str_replaces on the allowed tags (eg [img]) to turn them into html tags. What I want to do Is grab the URLS from the $string and add links to the original image and the url to the re...

Login suggestion query

I want to suggest login to user if their first choice was already taken. Suppose, user want to register as "Superman". There is already some Supermans on site. Logins are suggested in form "Superman01", "Superman02" and so on. So, script must: check for 'Superman' login in db if already used, append '01' to login and check for it in DB...

Dynamically populate a list in Div

I want to dynamically populate an un-ordered list in a Div section. But, I want it on page load and I couldn't find any onload event in the Div tag. I want to make an AJAX request to load list from a .php file. Which event to capture? ...

php code is not executing?

<?php class abhi { var $contents="default_abhi"; function abhi($contents) { $this->$contents = $contents; } function get_whats_there() { return $this->$contents; } } $abhilash = new abhi("abhibutu"); echo $abhilash->get_whats_there(); ?> i've initialized variable contents a default and a...

$_SERVER['document_root']?

is this pointing to the directory where the current file is executed? ...

Can you configure a single folder in a WordPress install that will allow directory list contents

Hello, I have a WordPress installation. I would like to have one folder in the file structure where the url will show you the files and folders and allow you to browse and download from there. Can it be done? Seth ...

How output buffering blocks in PHP/Apache works?

Hello. Suppose I am echoing random data from PHP to browser. Total amount of random data is about XGb and echo is done in YKb chunks. ob_start() is not used. Will echo calls block after PHP and Apache buffers are full (client is not capable of consuming data with the same speed it is generated)? If so, how much in size PHP and Apache bu...

php Multidimensional Array pushing

Is it possible to array_push to a multidimensional array? Creating the array using: $ObjectArray = array(); $ShiftArray = array($ObjectArray); $WeekShiftArray = array($ShiftArray); $MasterShiftArray = array($WeekShiftArray); And trying to push to the array using array_push($MasterShiftArray[$last_monday_from_date][$CurrentShift->O...

How can I access the value after a # in a URL?

Possible Duplicates: How to obtain anchor part of URL after # in php Is it possible to access anchors in a querystring via PHP? i need to find a way to do this, facebook does it so it has to be possible.... If a user goes to this URL in the browser http://localhost/index.php?photos=p#12345 Then I can have my PHP load a pho...

PHP: Pubsubhubbub and realtime information (for Subscriber)

Hi all, I started now with Pubsubhubbub (and all about realtime things), but I having trouble with the Subscriber option. I'm trying to develop a webapp in PHP to: Subscribe a RSS (previously Published) to the Hub (http://pubsubhubbub.appspot.com/); Read notifications (updates) from the Hub for the subscription; without succeed!!! :(...

Encoding Plain text email

What encoding should I use if I want to send plain text emails? I'm using PHPMailer. What setting do I need to change when sending email only as plain text, it's for a domain registration form. ...

Using the default filename (content_disposition) when downloading with CURL

I'm trying to download some files with PHP & CURL, but I don't see an easy way to use the default suggested filename (which is in the HTTP response header as Content-Disposition: attachment; filename=foo.png ). Is there an easier way then get the full header, parse the file name and rename? ...

jQuery AJAX Redirection problem

Hello please consider this: On page A I have a link that takes you to page B when JS is off, but when JS is on, I want to replace content on current page with content from the page B. Pages A and B are in fact the same script that is able to tell AJAX calls from regular ones and serve the content appropriately. Everything works fine, ...

Can't access $_SESSION variable in PHP called from Flash

I'm having difficulty accessing a $_SESSION variable. I have session_start() at the beginning of the file. I'm using jQuery uploadify and it calls a php backend file, which can't access $_SESSION variables, although other files outside could. Could it have something to do with the way that flash (jquery uploadify) is calling the php? ...

Remove header Content-transfer-encoding: 8bit using PHPMailer

Is it possible to remove Content-transfer-encoding: 8bit from the email headers using PHPMailer? ...

PHP using session_cache_limiter() and session_cache_expire() or multiple header()

I want my PHP pages to be cached. To allow cache I use: session_cache_limiter('private'); session_cache_expire(180); session_start(); Since I'm only using sessions for these cache headers, should I just drop these 3 line and replace them with (I'm never using $_SESSION): header('Expires: <some GMT date>'); header('Cache-Control: priv...

Getting image width and height of an image being used as a CSS background.

Hello all, i'm building a jquery slideshow carousel for a theatre site, it's being used to display the titles and the associated photos of the 5 most recent shows at the theatre. The shows, and the URLs of the photos that have been uploaded for them, are loaded in from a database, and inserted into the structure below: <div id="slidesho...

Cookie not saving

On my site the user is greeted with a yes/no menu what determines whether they see it, is this peiece of code. if(!isset($_COOKIE['bangUser'])) { // Get createRandomId() method and return a unique ID for the user $unique = ''; // Setting the cookie, name = bangUser, the cookie will expire after 30 day...