I have the following model :
class Model extends BaseModel
{
public function save($conn = null)
{
if(!$this->getId())
{
//do stuff
}
return parent::save($conn);
}
}
I feel like I am follwing the API description of Doctrine_Record::save() signature (Except the weird parenthesis I would give me...
$output .="<keyword>".$_POST['keyword']."</keyword><name>".$row['url']."</name><occur>".$row['occurrences']."</occur><queryTime>".(substr($end_time-$start_time,0,5))."</queryTime>";
}
I want to check in Flex, if the value of name is null or not. I tried for these, but i am not getting any alert when the node value is empty.
event.resu...
Hello,
I'm working with mySQL, and I'm in a situation where I need to select data from one table that matches an ID at any level in parent -> child data hierarchy in the other table.
Further more, I would like to resolve this with a well written SQL query, rather than a recursive function in my PHP code, as this feature will be used qu...
I have a script that uses PHP mail() function to send emails:
mail("[email protected]", "Subject", "Message");
Everything worked fine until yesterday. Now the mails either end up in a dead.letter file or just don't get sent.
What could be the reason for this? Any hints into how do I debug such code?
...
$output = "<loginsuccess>";
for( $i = 1; $row = mysql_fetch_array($result); $i++ ) {
$output .="<keyword>".$_POST['keyword']."</keyword><name>".$row['url']."</name><occur>".$row['occurrences']."</occur><queryTime>".(substr($end_time-$start_time,0,5))."</queryTime>";
}
$output .= "</loginsuccess>";
I need now a simple condi...
Hi there.
On my remote server I'm using the line
AddType application/x-httpd-php .php .htm .html
to parse the php in files with htm/html extensions
How can I replicate this behaviour on my local machine running EasyPHP.
I have tried adding the same line to Apache/conf/httpd.conf and restarting the server, but the files are displayed as h...
Hey,
I've seen "spaghetti" thrown about a lot and I just want a clear explanation on what is spaghetti code and what isn't. Just because I'd rather not be doing it.
References in PHP would help as that is my language of choice.
...
Couldn't find any good information on how to do this so I thought I'd add it here. How do I grab the selected data from a multiple choice drop down html form using php and submit into a database. I need a seperate row for each choice.
I'd be happy just knowing how to grab the data and put it into an array.
...
class person {
var $name;
var $email;
//Getters
function get_name() { return $this->name; }
function get_email() { return $this->email; }
//Setters
function set_name( $name ) { $this->name = $name; }
function set_email( $email ) {
if ( !eregi("^([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,A-Z]+))*[@]([0-9,a-z,A-Z]+)([.,_,-]([0-9,a-z,...
Given the pattern ^[a-zA-Z0-9 .\-_]+$ and the string te\\st, why is the match positive? I'm using this to validate usernames and I don't want people to put slashes in their usernames, it messes with URLs.
I'm calling ereg($pattern, $username), running PHP version 5.2.8.
...
please help me i am this question again
dont block this question
i want to post my xml file to a url
from where i will get a reponse xml document in return
but i dont know how to do this
i want to do this as simple as possible
without using curl or any other things
just using java script , ajx and php
please any one provide a co...
In PHP it is possible to specify argument types although they call it type hinting.
I am implementing an interface where one of the functions specifies an array as the argument type:
function myFunction(array $argument){
}
I'd like to define a class, an instance of which can be used as the argument for this function. In other words i...
Suggest me a better way to do it. I would like to show the array result in the horizontal manner.
Column1 | Column 2 | Column 3
3 | 7 | 10
now it shows in vertical manner as follows
Column1 | Column 2 | Column 3
3
7
10
Array Result : Stored in $result variable and assigned in ...
I would like to convert a string into floating numbers. For example
152.15 x 12.34 x 11mm
into
152.15, 12.34 and 11
and store in an array such that $dim[0]=152.15, $dim[1]=12.34, $dim[2]=11.
I would also need to handle things like
152.15x12.34x11 mm
152.15mmx12.34mm x 11mm
Thank you.
...
word generated html sucks, of course. but i unfortunately need to fetch some text from such existing docs to my php pages. the problem is, then it messes up my original page's css. what could be a way out? thanks!
...
I have this string that I get back from Adobe Presenter 7. It's called suspend_data and is of type CMIString4096 (by the docs)
CMIString4096 A set of ASCII characters with a maximum length
of 4096 characters.
This is the string:
aG1111111000000000BB001EC%2EacC%7E%24GS%2AayjHm110BKCBBB0B0EBAB1B1ED%2EicC%7E%24GS%2AlfkHm110BKDBC...
Do I need to pass back any HTTP headers to tell the browser that my server won't be immediately closing the connection and to display as the HTML is received? Is there anything necessary to get the HTML to incrementally display like flush()?
This technique used to be used for things like chat, but I'm thinking about using it for a COMET...
I would like to be able to programmatically change the outputted path to a Drupal node without using the PathAuto module. We currently process a large volume of content (thousands of articles per day) that get added on the back-end. Rather than use PathAuto to generate path aliases, I would like to have Drupal output the default link b...
Hello. I'm generating JSON response from PHP witch looks like this:
{ done:'1', options: [{ message:'Example message'},{message:'This is the 2nd example message'}]}
I want to grab these results using ExtJS. This is what I have so far:
Ext.Ajax.request({
loadMask: true,
url: 'myfile.php',
params: {id: "1"}
});
What d...
Say one were looking at transitioning a codebase from using the basic PHP mysql_* functions to a mysqli implementation. Can connections to the same database be used side-by-side in both interfaces, or is there some way in which they can interfere with one another?
...