Hey Guys,
i have made module in which i am trying to add validation like if the user had entered the characters in "Phone No" text filed and same on "Mobile No".
This will run when user had open the user registration form.
I have made this....
<?php
function form_intro_form_alter($form_id,&$form){
if($form_id == 'user_register' || ...
I have the following snippet of code:
setlocale(LC_ALL, "de");
print(strftime("%A %e %B %Y", time()));
and it's printing
Tuesday 4 May 2010
instead of
Dienstag 4. Mai 2010
Any ideas why? How to fix?
...
i need to load data as array to memory in PHP.but in PHP if i write $array= array("1","2"); in test.php then this $array variable
is initialized every time user requests.if we request test.php 100 times by clicking 100 times browser refresh button then this $array variable will be executed 100 times.
but i need to execute the $array v...
Hello,
I have an Oracle global temporary table which is "ON COMMIT DELETE ROWS".
I have a loop in which I:
Insert to global temporary table
Select from global temporary table (post-processing)
Commit, so that the table is purged before next iteration of the loop
Insertion is done with a call to oci_execute($stmt, OCI_DEFAULT). Retr...
What should be given as the url to the script while adding it to cron scheduler. The script is at domain.com/scripts/script.php
PS:I am using cPanel
...
Hello! I am using phpmailer class to send email and i am attaching a file to the mail.
The email is sent successfully but the attachment which is an sql file is empty which should not be the case. I have tried with an image file, but it seems that every file that i attach is empty.
Can anyone help me solve this problem please?
$mail = n...
I want to be able to separate the birthday from the mysql data into day, year and month.
Using the 3 textbox in html. How do I separate it? I'm trying to think of what can I do with the code below to show the result that I want:
Here's the html form with the php code:
$idnum = mysql_real_escape_string($_POST['idnum']);
mysql_select_db...
Hi there,
I'm trying to put the top of my page (which is all html) in a seperate file so I only need to change things once like the menu bar etc.
So I googled some and found a solution on this website as well, but it doesn't work and I don't know why.
So I have a page like article.html and on the top I have this:
<!DOCTYPE HTML PUBL...
Hello everyone, Im really really new to Javascript but Ive got this script that loads the contents of a url and everything works fine. I call the plannerSpin function with an onClick method on a button but how would I go about displaying an animated gif whilst all this is going on?
var xmlHttp
function plannerSpin(str) {
xmlHttp = G...
if ($user->values($_POST)->check())
{
$user->save();
} else {
// How can i get the errors?
}
Any idea how that works?
Thanks in advance!
...
There are a few parts to this code. The first part is creating fixtures.
$totalRounds = $teams - 1;
$matchesPerRound = $teams / 2;
$rounds = array();
$roundDates = array();
$curTime = time();
for ($i = 0; $i < $totalRounds; $i++) {
$rounds[$i] = array();
$numDays = $i * 4;
$roundDates[$i] = s...
I have found plenty of great PHP frameworks, but so many of them seem to use rails-like URL routing. Anyone know of a PHP framework which emulates the django model?
...
I am currently developing a script in PHP to fetch webpages. The fact is that by doing so, I occasionally do too much requests to a particular website. In order to control any overflow, I would like to keep trace of how many requests have been done in the last hour or so for each domain. It doesn't need to be perfect, just a good estimat...
I see similar questions asked but I seem to have problem with more basic stuff than were asked. How to declare a variable in php? My specific problem is I have a function that reads a DB table and returns the record (only one) as an object.
class User{
public $uid;
public $name;
public $status;
}
function GetUserInfo($uid)
{
...
I want to create a sort of datamapper library, where you'd do something like this:
$users = Users::getTable();
$users->add($newUser1);
$users->add($newUser2);
Now $users contains 2 user records, but they aren't yet persisted to the database. To be efficient, I'd like to flush them all at once. I would like to have a flush() method to ...
Hi I writed a test code as below.
<?php
$url = 'http://localhost/events/result/cn_index.php?login';
print_r(parse_url($url));
echo parse_url($url, PHP_URL_PATH);
?>
Output
Array ( [scheme] => http [host] => localhost [path] => /events/result/cn_index.php [query] => login ) /events/result/cn_index.php
Now I inserted the line be...
Is there any free opensource (GNU GPL, LGPL etc) Comet Video Chat? (PHP)
I want to integrate it into my own CMS I am creating.
...
Hello i have a private and public keys for RSA generated in .net
in this format
string privateKey = "<RSAKeyValue>" +
"<Modulus>...kCFhsjB4xMW49mrx5B/Ga...</Modulus>" +
"<Exponent>...</Exponent>" +
"<P>...7bRCrQVgVIfXdTIH3iY8x...</P>" +
...
I currently echo certain variables in hidden input fields and read them out with Javascript whenever I need them.
Me and a colleague are now thinking of generating an extra Javascript file with PHP which only contains all variables for Javascript. This way the variables already exist and there is no extra code in the HTML.
What are goo...
Good morning,
I would like the code in my controller to look something like this:
<?php
$class = new sanitizeInput()
$string1 = $class -> input($_POST[name]) -> mysql_escape();
$string2 = $class -> input($_POST[age]) -> mysql_escape();
print "
String1: $string1 <br />
String2: $string2"
?>
It seems with my sanitizeInput c...