php

how to show a pop-up message(like this site) on submit form

hello i use of php and jquery in my application i want when users submit success a form in page1 , forward form page1 to page2 and show a pop-up message(like this site) "success" and when they do not submit success , dont forward and just show pop-up message "error" how i can implement this process? thanks? ...

PHP array question.

How do I show the dates number format next to its name in the array using PHP? So that the number format is saved in the database and the month name is displayed? Here is the php code. $month_options = array("Month", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"...

modelling database entities in MVC -- how to create them?

I'm working on a PHP web app and I'm trying to use the MVC model. I have a lot of things that exist as 'database entities' -- a row, or a set of related rows, that are conceptually one human recognizable 'thing'. So I often try to provide an interface to that thing in a model class. So of course, the run of the mill functionality is t...

Actionscript multiple file upload, with parameter passing is not working

Hey everyone, First off, I am very bad at flash/actionscript, it is not my main programming language. I have created my own file upload flash app that has been working great for me up until this point. It uses PHP to upload the files and sends back a status message which gets displayed in a status box to the user. Now I have run into ...

How do I write this SQL statement to get the ad and posting? (PHP/MySQL)

I am a little confused on the logic of how to write this SQL statement. When a user clicks on a tag, say HTML, it would display all the posts with HTML as its tag. (a post can have multiple tags) I have three tables: Posting-->posting_id, title, detail, etc tags-->tagID, tagname postingtag-->posting_id, tagID I want to display all t...

Swift Mailer Error

Hi, Im using the following code to send a message: try { require_once "lib/Swift.php"; require_once "lib/Swift/Connection/SMTP.php"; $smtp =& new Swift_Connection_SMTP("mail.somedomain.net", 587); $smtp->setUsername("username"); $smtp->setpassword("password"); $swift =& new Swift($smtp); //Create the send...

PHP include once.

Is it more efficient to use PHP's include_once or require_once instead of using c-like include with a header guard? i.e, include_once 'init.php'; VERSUS include 'init.php'; //contents of init.php if (!defined('MY_INIT_PHP')) { define('MY_INIT_PHP', true); ... } ...

comparing rows on a mysql table

Ok here's the deal I got one table with a bunch of client information. Each client makes up to one purchase a year which is represented by an individual row. there's a column for the year and there's a column the contains a unique identifier for each client. What I need to do is to construct a query that takes last year and this year and...

Is there a PHP script to mail forms for beginners for free?

I have a place where I want users to submit emails for newsletter subs and a place to submit an entire contact form. Zero php knowledge outside of know that it can do what I need. ...

echo command not found while testing selenium with phpunit

I am getting an ERROR: Unknown command: 'echo' executing a selenium script with phpunit. Based on the output that echo command should be included in my version of PHPUnit. The selenium script does execute successfully in the firefox selenium IDE. mkdir_build: phpunit: [exec] PHPUnit 3.4.12 by Sebastian Bergmann. [exec] ...

input onfocus problem

it is the problem, i can't undertand anyway. i have the following simple script <input class="input" type="text" name="l_username" style="color: #ccc;" value= " <?if ($_POST[l_username] != '') echo $_POST[l_username]; else echo 'something';?>" onfocus="if (this.value == 'something') { t...

Converting PHP pagination to jQuery?

Hey, I have been trying to get this pagination class that I am using to be more ajaxy - meaning when I click on the page number like page [2] the data loads, but I want to load in the data without going to a different page (HTTP request in the background, with no page reloads). Being new to both php and jquery, I am a little unsure on h...

Reading data from a MySQL database into a HTML Table?

So i am working on a project and need some advice. I have a MySQL database that stores events, i know how to code this functionality in PHP but im just stuck of a few specifics. As the project that I am creating is a timetable, the most important attributes are the day of the event, starting time and finishing time. Once i have read t...

PDO prepare silently fails

I'm experimenting with PHP's session_set_save_handler and I'd like to use a PDO connection to store session data. I have this function as a callback for write actions: function _write($id, $data) { logger('_WRITE ' . $id . ' ' . $data); try { $access = time(); $sql = 'REPLACE INTO sessions SET id=:id, access=:ac...

I Need a Human Readable, Yet Parse-able Document Format

I'm working on one of those projects where there are a million better ways to accomplish what I need but I have no choice and I have to do it this way. Here it is: There is a web form, when the user fills it out and hits a submit a human readable text file is created using the form data. It looks like this: field_1: value for field one...

PHPthumbFactory file not found on upload

library: http://wiki.github.com/masterexploder/PHPThumb/basic-usage i am using the PhpThumbFactory library to crop and upload an image. the error im receiving is this: Fatal error: Uncaught exception 'Exception' with message 'Image file not found: ' in /www/iaddesign/admin/classes/phpthumb/ThumbBase.inc.php:193 Stack trace: #0 /www/i...

How do you make a count that counts the number of page-views? (PHP)

For each ad on my site, I would like a box that shows the number of views it has (similar to this site). How would I capture the number of page views an ad has? Is there a function that does this in PHP? ...

RIA IDE - Visual Studio 2010, FlashBuilder and ExtJS Designer

I trying to decide whether we went to Flex, Silverlight or even ExtJS. There is one variable missing so that we can make the decision and this is about Visual Studio. With Silverlight, it looks like if I want a "drag and drop" approach to build my interface I would need Expression Blend to do that. So the basic question here is: Does V...

Zend Database Adapter - Complex MySQL Query

I have defined a function in my Navigation model that executes a query, and I was wondering if there's a more "Zendy" way of generating/executing the query. The query I'm using was proposed by Bill Karwin on another thread here for setting arbitrary record order. I tried using a prepared statement, but the values in the SIGN() function...

Flash As3.0 PHP Variables?

Is it possible to make php variables public and accessible anywhere on the timeline? The script I included works fine if I set it as the document class only (it won't work if I try importing it). The variables pass the text to dynamic text fields on the main timeline. The problem: It will pull the information and display it when the SW...