When a user signs up at a Drupal site, there is a configurable message that Drupal will send the user letting them know their username and password.
I have about 1,000 users that I imported, but at the time, I didn't want to notify them - but now I do. Is there a way notify the users without reimporting them?
I looked through some of t...
I'm using PHP, and am wondering what the best way is to handle simple POSTs and AJAX POSTs without repeating code in the simplest way possible. Thanks!
...
I have a complicated page being rendered by PHP and would like to keep all elements of the page up to date via AJAX long polling. Is there some kind of general / clever way to design an infrastructure to support this without having to specify manually each element to update? Just looking for ideas. Thanks!
...
I want users to be able to upload their CV in PDF, .txt, .doc, .docx; and allow potential employers to download the file.
What data type should I use? In MS MSQL, I would use varbinary(max), right? But since I'm new to MySQL I'm a bit confused. :)
...
I'm going to allow companies to register on my website and create job listings.
I'm currently approaching the problem by creating a Company table with Name, Logo and Password fields. Then when a person registers he can say, "I belong to X company"; at this point, I'll request the password written in by the initial registrator. If she/he...
What's wrong with this...? I don't get an email back...
Also, does the from address have to be a real address? If I run this on a computer that doesn't have Outlook Express, will it not work? How can I make it work on computers like that?
<html>
<head>
<title>Test php</title>
</head>
<?php
$to = "[email protected]";
$subject = "te...
I am using this class to highlight the search keywords on a piece of text:
class highlight
{
public $output_text;
function __construct($text, $words)
{
$split_words = explode( " " , $words );
foreach ($split_words as $word)
{
$text = preg_replace("|($wo...
All the files in the code base I am documenting will always use the same version "string" Is there a way I can specific in a single place for the PhpDocumentor to use the same version for all files, regardless if it is specified or not (should auto-inherit)
...and what other tags would this be useful for off the top of your head?
Edit:...
So I've run into a bit of an issue. I know of a solution but it doesn't seem very clean and I'm wondering if there's a better one.
I'm writing a MySQLi wrapper for running prepared statements. As it's a wrapper and is meant to be reused (dynamic) the amount of columns returned depends on the query and isn't static.
The one solution to ...
Hello,
in order to keep as few SQL statements as possible, I want to do select set from MySQL:
SELECT * FROM products WHERE category IN (10,120,150,500) ORDER BY category,id;
Now, I have list of products in following manner:
CATEGORY
- product 1
- product 2
CATEGORY 2
- product 37
...
What's the best and most efficent way to pr...
I have the most simple SQL
SELECT * FROM words
It has 13000 words (varchar). I need to get the longest word first in my output. I guess it might be possible with the WHERE command?
Alternative
If it doesn't work like that, is there a smart way to sort my output array so it will order it by the longest word first (in the 'word'-colum...
been trying to set up a webserver with uk2.net all day but i keep receiving the following error when i try to log in:
Access denied for user 'speedycm_root'@'localhost' to database 'speedycms'
what could it mean?
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_speedycms = "localhost";
$database_spee...
EDIT: I believe my confusion is probably created by this code at the top of the page in which I'm testing for the value of the option... This creates a shortcut method to refer to the option without using the get_option('option') method...
global $options;
foreach ($options as $value) {
if (get_settings( $value['id'] ) === FALSE) {
...
Hi,
Does anyone know where can I find recent data on PHP4 vs PHP5 "market share", that is, what percentage of servers on the Internet have PHP5 installed?
I found this but it's from 2008:
http://www.nexen.net/chiffres_cles/phpversion/18824-php_statistics_for_october_2008.php
I also checked netcraft.com but I don't think they have some...
When trying to change it,throw an exception.
...
Hi all,
I'm trying to figure out if I can do the following:
User submits form to script via jquery post
Depending on what was processed, script may or may not return errors
If the script did not process any errors (i.e. SUCCESS), I want to redirect to a SUCCESS page
I know it's possible to redirect the browser via javascript, but I'...
hello,
I am having a wee problem, and I am sure there is a more convenient/simpler way to achieve the solution, but all searches are throw in up a blanks at the moment !
I have a mysql db that is regularly updated by php page [ via a cron job ] this adds or deletes entries as appropriate.
My issue is that I also need to check if any...
Specifically, is one more efficient than the other?
...
I am trying to create a simple log in system that uses ajax but the problem I am having it wont set the $_SESSION.
login.js:
$('#bt-login').click(function(){
var login = $('#login').serialize();
$.ajax({
type: "POST",
url: 'widgets/Login/loginFunction.php',
data: login,
c...
<html>
<head>
<title>Connecting </title>
</head>
<body>
<?php
$host = "*.*.*.*";
$username = "xxx";
$password = "xxx";
$db_name = "xxx";
$db = mssql_connect($host, $username,$password)
or die("Couldn't Connect");
$selected = mssql_select_db($db_name, $db)
or die("Couldn't open database");
?>...