Right now I have some links to move to a Previous page or to the Next page (or any page number).
ex. <--prev | 0 | 1 | 2 | 3 | next-->
My issues is that I am only listing items on the page with a "status='A'". (A for active... some items are no longer being listed on this page and would have a 'D' for Delete or 'S' for Sold Out).
In ...
I want to be able to take user inputted text in a comment field and check for URL type expression, and if it exists, add an anchor tag (to url) when the comment is displayed.
I am using PHP on the server-side, and Javascript (with jQuery) on client, so should I wait to check for URL until right before it is displayed? Or add the anchor ...
I want understand what the widget can I use to generate such html:
<input name="users[]" value="Robert" type="checkbox"> Robert
<input name="users[]" value="Bob" type="checkbox"> Bob
Or perhaps symfony doesn't have that widget and I have to write it myself?
Thanks
...
I'm working on a view for a blog that mixes blog posts, comments, and uploaded media items into one large grid layout. I've set up the individual models in CakePHP and the associations, some of which are as follows:
Comment BelongsTo Post or Media
Post HasMany Media
What I'm working with is trying to sort all three models (Comment, M...
how to make a webbased email service such as inbox, outbox, deletemail, reply ,forward mail etc.
Is it possible to make with PHP. just give some guidelines from where to start.
...
whats the meaning of this line
<input type=text name="name" value="<?= $name ?>
if we are to declare as PHP shouldn't we write <?php instead of <?=
Thanks
...
My friend and I maintain a submission site with comments. We want to know if it is possible to have a constant AJAX connection. Basically, each submission has a comments section. My friend had an idea of having an alert appear on the page everytime a new comment came in. So, would it be possible to keep up a constant link between the AJA...
I have a Blog class that does exactly what you think it would...create an object and handle it. That part is nice and clean.
I am now in need of a function that will quickly return a number of all the blogs in my database (not necessarily related to the blog object). Therefore, I am thinking a static method would be a good choice.
My q...
Basicly I have a bunch of links on a page and I will use something like this
<?PHP echo $SITE_PATH ?>
Many many times on the same page but it will show a Notice in PHP for doing so.
I know you are supposed to use things like isset() but would I really need to use it every time I call?
<?PHP echo $SITE_PATH ?>
--- EDIT :
If I swi...
What are some of the most expensive operations in PHP? I know things like overusing the @ operator can be expensive. What else would you consider?
...
Hello,
I have a php script that writes xml data to a file and another one that sends the contents of this file to the client as the response.
But on the client side,im getting the following error:
XML Parsing Error: not well-formed
When i view source of the page, the XML i see is as follows:
<?xml version="1.0" encoding="UTF-8" standal...
I currently use sessions pretty heavy and I am re-coding my network site right now. 1 thing I have done is made a session class that has some simple methods for example here is how I would retrieve session data using my class.
$session = new Session();
// to set a session I would use this
echo $session->set('user_id');
// to view a...
I have several file extensions, like .module, that I would like to be understood by Eclipse to be PHP - so I get the same syntax highlighting, code completion, etc features as I would if I were editing a .php file. How can I do this?
I went to Window >> Preferences >> General >> File Associations and added *.module to the file types lis...
Each time i vote up or down it just sets an 1.
But i want that votes_up=votes_up+1 inkrements eachtime i vote up.
this is php code
public function voteUp($id)
{
$this->initDB();
$q="update twitter.tweets set vote_up=vote_up+1 where id=$id";
$this->db->query($q);
}
the result is
Down Votes:1
Up Votes:1
Total Vot...
I am busy with an application that uses transclusion. Basically I need to parse a given text and capture tags as follows:
{{author: name |
book : sometitle |
year : someyear |
img : {{img:.....}}
}}
My problem is that I need to recursively parse what is within the double curly brackets and replace it with other text. ...
I asked a previous question about keeping up a constant link with a database, and someone suggested long polling. I found a small tutorial with a skeleton, but I don't understand some things.
The page is here: http://www.google.ca/url?q=http%3A//www.ajaxprojects.com/ajax/tutorialdetails.php%3Fitemid%3D575&ei=AsIzS8nYHNDDlAfY1NSjBw&am...
Is this the proper way to define an include path for both *nix and Windows?
define( 'INCPATH', realpath( dirname( __FILE__ ) ) . '/' );
Note the trailing forward-slash I included above. Is the forward-slash for includes/requires the same for both OS's, as well?
EDIT (UPDATED WITH ANSWER):
From what I can gather, my code below is the...
When I follow the instructions in ZS documentation to create a phpunit test case, the wizard returns no objects to select on the "Element to Test" line. Selecting "browse" provides an empty dialog box. The PHPUnit path in my preferences shows "/Applications/zend/zs710/plugins/com.zend.php.phpunit_7.1.0.v20091120-0900/resources/library/"....
I am sending a very simple HTML email (it's mainly just a happy holidays image, centered) from my site using Swift.
It works perfectly in several clients (Thunderbird, Outlook Express, Yahoo Mail), but for some reason Gmail considers it as 'quoted content' and therefore the user does not see any of it unless they click the tiny '- Show ...
Hey Guys,
I am a noob to PHP can anyone explain me whats Pear DB library with a practical use?
Thanks
...