Now when I submit the character ' I get the following error listed below other then that everything is okay when I submit words. I am using htmlentities() and I still get this error.
How can I prevent this error from happening is there a way I can allow or convert or stop the character ' form displaying as an error?
Here is the error I...
I am trying to connect to a database using a login form. Currently there is one user in the database but when pressing submit the page just appears to refresh and is not redirected to the home page as it should. Here is my code:
<html>
<head><title>Login</title></head>
<body>
<?php
ob_start();
include('connect.php');
$handle = mysql_...
I have a custom directory, eg /www/phpstuff which is in my include_path. Inside of this phpstuff directory is a folder i18n. It contains server-side level .mo files.
Zend_Translate lets you specify a directory in the second parameter of the constructor, I can't really do
Zend_Translate( 'gettext', 'i18n/', 'en' );
It tries to read f...
I have following two arrays and the code to find array_diff:
$obs_ws = array("you", "your", "may", "me", "my", "etc");
$all_ws = array("LOVE", "World", "Your", "my", "etc", "CoDe");
$final_ws = array_diff($all_ws, $obs_ws);
Above code giving output array as:
$final_ws = array("LOVE", "World", "Your", "CoDe");
But I want it as:
$f...
I can't figure out where it is located. I only find a 'my.ini' file which doesnt have a 'mysqld' section in it...
Do I have to upload my website to an ACTUAL server before attempting this?
Thanks
...
I have created a form, with 5 textbox fields and I want to add those five entries in the database. I want to use the textbox "array", that way I can use a for-each when saving to the database. As anyone, any code on how to do this or can direct me in the right path?
input type="text" value="whateva" name= ?php text[0] ?>
input type="te...
I'm trying to insert a relative URL in the code below before "/images" in $thumb_directory and $orig_directory however I'm not sure how to do so within 'apostrophe's'. Also, this is a WordPress website, so if anyone knows how to call the function within '/images', like so: '/images' please let me know (I realize that what I just typed ...
I cant seem to find any documentation on what $_this means in PHP. It seems to be used quite a bit in the CakePHP framework.
Any ideas?
...
I have an authenticate function. The user is automatically logged out after 30 minutes. I'd like to store the time of login (timestamp?) in the authenticate function. I will then update that time each time a function requiring authentication is called. If 30 minutes have passed since the last call, it will automatically reauthenticate. I...
Warning: main() [function.main]: Node no longer exists
I am loading a ml file via simplexml_load_file, it sometimes has values for an attribute and sometimes does not.
Usage:
$value = $xml->Name->arttributes();
Echo $value;
how do I error check to see if there is a value without getting a warning.
Thanks
...
I have this function, which loads a select from a database.
function Competition() {
$(document).ready(function() {
$.ajax({
url: "load-comp.php",
cache: false,
success : function(html) {
// something here
}
});
EditRow();
});
}
I need to put that select ins...
Array example entry:
test : title=Diet Coke
Becomes
test:title=Diet Coke
...
Is there a MYSQL or PHP method to display an item first before all others then display the rest of my items alphabetically?
SELECT client_name FROM clients ORDER BY client_name ASC
Gives me the following list:
Bob
Harold
Sandy
Timmy
Except I am looking for a way to display them in order like this.
Harold
Bob
Sandy
Timmy
or lik...
Hi,
Is it possible in PHP 5 to have an interface that has private / protected methods?
Right now I have
interface iService
{
private method1();
}
That throws an error. Just want to confirm that it is the case that interface can only contains public methods.
Thank you,
Tee
...
I am using Zend Framework 1.9.6. I think I've got it pretty much figured out except for the end. This is what I have so far:
Form:
<?php
class Default_Form_UploadFile extends Zend_Form
{
public function init()
{
$this->setAttrib('enctype', 'multipart/form-data');
$this->setMethod('post');
$description ...
Hello,
I have been asked to construct a website for a local not-for profit, and they don't have any money to spend on the project. It is starting out as a small project, so I agreed to do it for them. However, I would prefer to be able to do some scripting. I already know Coldfusion, but am willing to learn some PHP to do this. I a...
Hello,
I was wondering if any of you fine gentlemen would be able to recommend some of your favorite open source php applications in terms of code quality and proper programming technique.
Though I have been using frameworks for quite a while, I would love to see how professional applications go about this.
I'm particularly interested...
What are the best resources I can use to quickly learn PHP?
...
Hi,
I've spent hours trying to override the Magento block for the "Add store" and "Edit store" pages in an extension, to add another text box to it. After Going through books and Googling, I've found several solutions which people say are working, however not for me.
One recommendation was this one: http://www.magentocommerce.com/board...
Lately geo-targeting has been pretty popular in technology. By IP, cell tower, GPS, using browser plugins, HTML5?, mobile devices ...
Since I'm about to add some geo-targeted features on our site, I wanted to know what's the best approach. Is there some API that uses a mix of all those technologies? Or at least, what API/service would y...