Sometimes the user may press Enter twice, and the post is inserted twice.
Is there a solution to prevent this other than check if there is already a post with the same title and content?
...
I am admittedly not as skilled in PHP as I would hope to be. Most of my experience is with Wordpress loops.
I'm trying to create a very simple quiz that carries the number of correct answers in the URL (eg. domaindotcom/?p=3 if they've got 3 correct answers so far).
I'm using the following PHP code to start it off:
<?php
/* Gets ...
Someone maliciously inserted the following code into my website ahoffmanawning.com. Could this be done via a poorly written form php script? Also more importantly, what is this script doing?
<script language="javascript">
$a="Z63dZ3dZ22Z253dst+Z2553tZ2572iZ256eg.Z2566Z2572oZ256dCZ2568arCZ256fdeZ2528(tmZ2570Z252eZ2563hZ22;dzZ3dZ22Z2566Z2...
I'm working with the following code, and when run I get nothing displayed on the screen.
class ModelBase
{
public $db_server;
public $db_user;
public $db_password;
static $db_conn;
public static $DBSERVER="localhost";
public static $DBUSER="user";
public static $DBPASSWORD="password";
public static $...
I'm g-zipping and backing-up my database dump (using mysqldump ) to amazon S3 .
all works fine, but i also need to encrypt this big-compressed file for securing the very- sensitive data within the database.
please help, i'm really lost here .
Thanks in advance :)
...
I'm trying to write a PHP script to download a zip file from a web server that contains a single CSV file and then load the contents of the extracted CSV file into an existing MySQL database table.
$targetFile = 'data-' . md5(microtime()) . '.zip';
$url = 'http://www.address.com/data.zip';
$out = fopen('/path/to/zip/save/folder/' . $ta...
Looking for custom themes for the Netbeans IDE, especially dark ones!
Thanks!
...
This is from my TV guide pagination script (note, the top half is not mentioned as there are no problems with the code in the beginning):
class paginationData {
private $program;
private $channel;
private $airdate;
private $expiration;
private $episode;
private $setReminder;
public function __construct($program, $chann...
alright so im having a problem with getting my text layed over a partly transparent image. i want the text to be solid, but i want part of the background of the image to be transparent, and the part the text is over to be solid, which i have, the problem is the text is inheriting the transparent background of one of the previous layers. ...
Hi all,
MY PLATFORM: PHP & mySQL
MY SITUATION:
I am building an app. where users can sign up for an account for the services that I provide. I want to restrict a user from signing up for multiple accounts and users from all over the world can create an account of their own. That being said:
What can I do to prevent multiple accounts...
OK - Simply, I'm building a site that needs to incorporate an existing page, protected with a simple .htaccess/.htpasswd script.
How can I pass the username/password to the receiving site using PHP?
Thanks in advance for your help!!!
UPDATE - I think I may have over-complicated the question. What I'm needing to do is essentially:
<a ...
(I previously asked this question which was somehow considered more applicable to superuser, and after it was migrated there, it was closed as not applying to superuser. Let me make it clear up front, then, that I'm asking if the feed that I have created in php, with a program written by me, has some problem with Google Reader. Or if Goo...
I have a little site in PHP (that is more static that dynamic, anyway). I see multiple sites publishes RSS fluxes or whatever the name is.
I wonder if there a possibility to load a such RSS flux, filter it by the site keywords theme and display it like a little thematic news column using PHP.
Is this task complicated? With what should...
Im thinking about using CodeIgniter for a new project. I was reading the user-guide for CI and I noticed a few things. In all their examples, they seem to put all the logic in the Controller and just use the model to get and set data. I like to put all my logic in my Model.
Are all of their functions universal to all 3 parts (model, vie...
I have a form that is extend from Zend_Form. I am placing the form into a ViewScript decorator like this:
$this->setDecorators(array(array('ViewScript', array('viewScript' => 'game/forms/game-management.phtml'))));
I'd like to pass in a variable to this ViewScript but am not sure how this could be done.
Since the partial renders out...
Hello,
when I click on "Click Here" then a page must open inside
<script....>
$('yahoo').html('<a href=desc.php>');
</script>
<div id='yahoo'></div>
<div id='clickhere'>Click here</div>
Thanks
Dave
...
I am using Symfony 1.4.
Users from the backend application can upload files and publish them to the frontend. Using sfWidgetFormInputFile and sfValidatorFile, I would like to keep the original filename instead of the default functionality of a random string (i.e. Meaningful_filename.docx instead of a4b25e9f48cfb6268f34b691fc18cd76fefe...
ASP is a Compiled Language or isnt it? sure it is.
PHP is a Interpreted Language.
I also developed once an asp app with the VS 2008 IDE.
But there is a Big difference between ASP and PHP.
What are the Differences?
...
I need a little extra help to figure out an issue I'm having. You can see a great deal of detail about it here: http://stackoverflow.com/questions/2134056/checking-correct-answer-and-submitting-form, but here's the basics.
Project is a just-for-fun quiz composed of 10 question pages and 1 result page.
Submitting a Form composed of 3
Ra...
Hi
I have a function that generates a random combination.
my function looks like this:
function random_gen($length) {
$random= "";
srand((double)microtime()*1000000);
$char_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$char_list .= "abcdefghijklmnopqrstuvwxyz";
$char_list .= "1234567890";
// Add the special characters to $char_li...