I have a users table that has the following fields: userid, phone, and address. Since this is user data, I'm letting the user change them whenever he wants. Problem is I'd like to keep track of those changes and preserve the old data too. Here's some of the ideas I considered:
appending the new data to the old data and using a separato...
I am new to PEAR::Mail, and I am looking for a tutorial that can teach me how to send bulk mails(10K+ emails). "Using mail() in php is not efficient, as its open and close the smtp sockets", this is what I read from internet sources (could not find link now, grrr).
Thus, I am thinking of doing it manually and using mail library that ar...
i need a regex that converts commas to spaces. I know this is super simple, but i do not know regex. thanks.
tag1, tag2, tag3, tag4,tag5 tag6
to
tag1 tag2 tag3 tag4 tag5 tag6
thanks
...
I want use html5's new tag to play a wav file (currently only supported in FF.)
https://developer.mozilla.org/En/HTML/Element/Audio
I"m using php's readfile command to get the wav file off the hdd, and write it to the http response.
But its not working. The audio widget in firefox just has the loading animation running constantly.
T...
I've been trying to clear my memcache as I'm noticing the storage taking up almost 30% of server memory when using ps -aux.
So I ran the following php code.
$memcache = new Memcache;
$memcache->connect("localhost",11211);
$memcache->flush();
print_r($memcache->getStats());
This results in the output of
( [pid] => 4...
All the examples I've seen of what and how MVC SHOULD be have used classes as the models, classes as the controller, and HTML templates as the view. And all of them consisted of one index.php script and different requests in the url to run the entire site.
So they've all been something like...
MODEL
class User{
function getUser($u...
I have a script that gets the raw binary image data via url request. It then takes the data and puts it into mysql.
Pretty simple right? Well It's I'm inserting some 8,000 decent sized 600x400 jpegs and for some odd reason some of the images are getting cut off. Maybe the part of my script that iterates through each image it needs to ge...
Hello All,
I have a PHP script at the following location
C:\wamp\www\tcl\bin\
I am accessing the same through a browser (http://localhost/tcl/bin/xxx.php
In the PHP script . I am doing a proc_open
$app = 'C:/wamp/www/tcl/bin/tclsh84.exe';
$process = proc_open($app, $descriptorspec, $pipes);
if i give the full path it works , but...
Hello,
Using PHP on Linux, I can just use the is_link() function to detect whether a given file is a symbolic link. However, is there a way to detect if a given file is the target of any other symbolic links?
Thanks, Brian
...
I'm calling php function mail, but it's returning false about 5% - 10% of the times, and it's driving me crazy.
I guess from the php side everything is well configured because (correct me if i'm wrong) if not the function should fail every single time.
So the question is how can i know the reason of this behavior? What can i do to debu...
I need to integrate mblox sms service via php to send and receive meaages. Is there any open source scripts or resources available to inetegrate mblox using php ?
Thanks in advance.
...
I have a CSS parser thats printing out stylesheet to the browser like so:
$cssParser->parse( 'style.css' );
echo '<pre>'; print_r( $cssParser ); echo '</pre>';
Can I 'syntax highlight' the output CSS somehow?
Thanks
...
Hi all,
I have a question about associative arrays in php.
I have following array in which there are two items named 4 and 2 respectively.
$items = array(4,2);
Now i want to associate each item's quantity to it which can be done as follows:
$items['4']=23;
$items['2']=0;
which means that there are 23, 'item 4s' and no 'item 2'.
...
If i have this Query:
SELECT tableA.Id, tableB.Id FROM tableA JOIN tableB ON (tableA.bId = tableB.Id)
Now if i try this in php i have some problems:
while($result = mysql_fetch_array(mysql_query(/Query Above/)){
print $result['tableB.Id'];
}
Now i know what you are going to say that i should do my query as:
SELECT tableA.Id AS...
I'm looking for an open-source contact database application, preferably written in PHP5. Anyone know of a good one? I'm not looking for a full-blown CRM system, just something with a contact entry form, a backend for adding/removing contacts and maybe even a search system.
thanks!
...
I am looking for the readmore plugin to integrate more than one read more link through the articles. i have installed Readmore Ext, AutoReadmore, Readmore Link Plugins. I installed and enabled these plugins.
Now What i need is how can i integrate the readmore link in articles using these plugins. I want to show more than one read more l...
So im having a problem (obviously). I have the following MySQL table data
7 USER1 1,1,1,10,1 The Guys Team 8,7,13,14,16
8 USER1 1,1,1,10,1 The Girls Team 7,12,15
10 USER1 1,1,1,10,1 Dog Team 8,7,14,15
I wrote a function to retrieve the data, and return it.
function ShowSetTeams($coach){
$result = mysql_query("...
Hi,
I have a form with the code below, which sends form option choice as "project" variable.
<form name="projects" method="get" action="\web\ttt.php?str=aaa" >
However, the output always looks this:
/ttt.php?Projects=3 //there is str=aaa missing which I defined in the form action.
How to let it pass this variable?
Thanks
...
I'm building a freelance job site using d6. I've created a new content type called "Freelance Jobs" using CCK which contains various fields such as Job Description, Skills, Start Date, End Date etc.
I want to display the most recent jobs on front page in a listing manners as it is displayed on most job sites.
Following is an example of...
I used to code in javascript - jquery and PHP. I like to have a folder of, let asy 100 images, scan it and get it to screen with a fade in beetween, and delay...
Much of that can be done pretty esealy
The question : only for speed purpose, i like to get img1, show it
preload img2
wait 2-3 second
fade to img2
preload img3
wait
... and so...