I want to populate form fields with values from a database immediately after the user enters a value in the #sid field. Here is my jQuery/HTML example:
<script src="jquery-1.3.1.min.js"></script>
<script type="text/JavaScript">
$(document).ready(function()
{
$('#sid').bind("change", function(){
$.getJSON("test.php?sid=" + $("#sid...
I'm trying to find a way to wrap a long headline after a specific number of words, based on the total character count of the headline. My purpose is to make the bottom line of the wrapped text longer than the top line to increase readability.
I'd like to use Smarty to find the character count of the headline, then decide how long to ma...
I need to match a space character in php regex. Anyone got any ideas?
EDIT
I mean like "gavin schulz" the space in between the two words. I'll make another clarification. I did try and find more info but nothing turned up. Anyways I am using a regex to make sure that I only allow letters, number and a space. But I'm not sure how t...
I am trying to create a form for my php/mysql application. I want my users to list the priority of thier choices where they have 5 options and they have to choose each in order of preference
...
Is there a better way to select empty datetime fields than this?
SELECT * FROM `table` WHERE `datetime_field` = '0000-00-00 00:00:00'
...
Title says it all.
Though the manual says you're better off to avoid a function call, I've also read $array[] is much slower than array_push(). Does anyone have any clarifications or benchmarks?
Thank you!
...
I have a database table. It has several hundred entries and each entry is timestamped. I'm looking to only output each day and not have it duplicate any days.
Data:
2009-02-04 06:20:27
2009-02-04 06:20:27
2009-02-05 06:20:27
2009-02-07 06:20:27
2009-02-07 06:20:27
2009-02-07 06:20:27
Output should only be (time is irrelevant):
20...
Zend Framework makes development a lot easier; for instance there is a getPost function from the Zend_Http that handles POST parameters.
Is there anything similar to handle file uploads? I can access $_FILES directly, but I would rather use a built in function to keep things consistent.
...
For community websites like Facebook, myspace, etc.. They have a feature called "Friendship", means you can add friends, send "add friends request", etc..
How to structure it in database? I means, what tables required? What are the columns for each table required?
...
Has anybody forked PHP4 to continue support for this version?
EDIT: This isn't a question about migrating to PHP5.
...
As you see I have created drop down and give it name the field name, and I have also the count function.
What I want to do is, if some select drop down menu..show the how many result found in number like 10, 20,.. if the second dropdown selected it will check the two drop down selected and pass the result count..like that continuous..if...
I'm wondering which is the best PDF creation library for PHP, mainly for creating PDFs from scratch (not as much HTML to PDF)?
I have worked with FPDF for quite a while now, but it's getting quite old and hasn't had much for updates. I found TCPDF the other day (thanks you another question on SO). It seems very good and is based on FPDF...
I have a form with 5 fields, two of which are textboxes extended with tinyMCE, the rest are simple inputs of type text.
I need to generate a PDF from this input. I understand that I can use Zend_Pdf to generate the PDF and include the plain text data. But how, for example, can I include a bulleted list from the tinyMCE fields?
Would ...
I am trying to install this
http://fr2.php.net/manual/en/book.ssh2.php
on a Centos 5 (a fork of RHEL 5).
I installed libssh2 (yum install libssh2) wich is located in /usr/lib, and when I install SSH2 extension (via pecl install -f ssh2) I get this message
checking for ssh2 files in default path... not found
configure: error: The r...
lets assume the same environments for php5 working with MySQL5 and CSV files. MySQL is on the same host as hosted scripts.
Will the MySQL always faster than retriving/searching/changing/adding/deleting records to CSV ?
Or is there some amount of data below which php+CSV performance is better than using database server ?
...
Hello, I currently have a set-up that goes as such:
I have a bunch of "client" point of sale systems that periodically send new sales data to one centralized "HQ", which stores the data into one big database for report generation.
The client POS is based on PHPPOS, and I have implemented a module that uses the standard XML-RPC library ...
Hi Again,
I have a site that stores a bunch of records in an sql database that i want to pull onto a page based on the date, which is stored as Y-m-d in sql. But, I want to paginate the results based on day.
So for the index, i want to show all the results from the current day, for which i was going to use the php date() function as th...
We wrote some code involving usort which works fine on our development systems (PHP 5.2.8), but are experiencing a problem on our live systems (PHP 5.2.0):
// Sort by distance
usort($locations, 'Interpolator::sortByDistance');
calls the method (within the same class Interpolator):
private static function sortByDistance($a, $b) {
...
hello,
I am invoking PHP curl method on a server and the response is XML type. Curl is saving the output ( after removing the tags ) in a scalar type variable. Is there a way to store it in a object/hash/array. So that its easy to parse.\
Thanks
...
Okay, so im sure plenty of you have built crazy database intensive pages...
I am building a page that I'd like to pull all sorts of different / unrelated databse information from....here are some sample different queries for this one page:
-article content and info
-IF the author is a registered user, their info
-UPDATE the article's...