This would be of some use to you http://bugs.php.net/bug.php?id=13342&edit=1
-Naintara
-Original Message-
From: Nicole [mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2003 2:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Yikes! Strange Occurrence of ! in mail
Has anyone experienced exc
I get this error "Fatal error: Call to undefined function: mysql_connect() " in one
script. whereas
phpMyAdmin is installed in another directory and it works fine.
Any ideas why?
-Naintara
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Very simple, there's a function designed just for this.
check out the manual for array_count_values()
array_count_values() returns an array using the values of the input array as
keys and their frequency in input as values.
EXAMPLE:
$array = array (1, "hello", 1, "world", "hello");
print_r(array_
Are you incrementing number_of_days anywhere within the loop?
It looks like you have an infinite loop running. If you want to be able to
move to the next date, increment you date variable.
-Naintara
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of ander
You might want to consider removing the leading zeroes, this post is there
in the php manual and has been useful to me.
-xxx-
jchen3625 AT yahoo DOT com (25-Aug-2002 03:33)
beware, arguments with leading zeros are treated as zeros.
that is,
"mktime(0,0,0,10,09,
You possibly have a select list box named 'title[]' remove the brackets []
and rename the list box 'title'. That should work.
-Naintara
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of Tirnovanu Aurel
Sent: Saturday, June 21, 2003 12:28 PM
To: [EMAIL PROTECTED
;
reinicialize
}
}
print out
Naintara Jain wrote:
>I have a logic problem:
>
>I have a complicated query. The main thing is that I have an ID, and for a
>particular ID, I may have between 1 to 3 rows returned. The rows returned
>are variable, that is for 1 particular
t
2 Further requirement
3 Completed
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Chris Hewitt
Sent: Tuesday, September 24, 2002 1:49 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] in a logic loop!
Naintara Jain wrote:
>What I am doi
I have a logic problem:
I have a complicated query. The main thing is that I have an ID, and for a
particular ID, I may have between 1 to 3 rows returned. The rows returned
are variable, that is for 1 particular ID there might just be 1 row and at a
later time it may have 3 rows.
But what I nee
lets say,
ServerOne has TimeZone GMT+2
ServerTwo has TimeZone GMT+3
the gmdate() will return diff values for the same timestamp.
essentially there will be a diff of 1 hour in the return values from these
two servers.
-Naintara
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL P
are u using the exact code (below, as given by u)
if yes,
the 1st page has the problem (missing = ), replace with this
name="id"
not name "id"
-Naintara
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Meltem Demirkus
Sent: Friday, September 06, 2
see, if you output anything for the user, then you cannot use a header
if your include files have echo/print statements or errors that are
displayed then it is considered output.
use JavaScript to redirect the page
look up window.location= in JavaScript reference
embed that script in php.
or els
You can use explode/split functions on the search parameters - that will
give u an array with each search token indexed individually. Suppose the
search input was 'abc xyz'
$strsearch = "abc xyz";
$search=explode(" ",$strsearch);
your array "search" will contain
$search[0]=abc
$search[1]=xyz
The following code was created to generate a random password.
But it can be used to generate a random string for any purpose.
The basic idea was to create an array that would contain all the letters of
the English alphabet, and pick out random values from that array. I have
outlined two methods b
First I seed the generator with
mt_srand ((double) microtime() * 100);
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Naintara Jain
Sent: Tuesday, July 23, 2002 6:36 PM
To: Php-General@Lists. Php. Net
Subject: [PHP] array_rand() and seed
Using
Using Win2K Professional Server, IIS
PHP Version 4.2.1
mt_getrandmax() returned 2147483647
I have an array of 26 characters. I want three random values from the array,
I use the following:
$rand_al = array_rand ($arralpha, 3);
I get the same characters each and every time.
The way I am handling
what OS are you running on?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Mike
Sent: Tuesday, July 09, 2002 12:37 PM
To: Jay Blanchard; [EMAIL PROTECTED]
Subject: Re: [PHP] CANT GET STUFF TO WORK
I have read that, I am still confused, I have made it
To: [EMAIL PROTECTED]
Subject: Re: [PHP] session problem
You have to set the variables before using session_register().
If you try registering a variable that has no value, then of course no value
can be carried over to the next page. :o)
Martin
>>> "Naintara Jain" <[EMAIL PR
You can use both JavaScript and PHP.
Initially use PHP to get your data, you can use 13 arrays to store this
data.
1st array stores the options for the 1st list.
The other 12 arrays can store options related to each item of the 1st
list/array.
Use JavaScript (client-side scripting, faster) to pop
One thing I forgot to mention is that the same code works perfectly on the
web server (running on Apache and a Unix flavor).
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Naintara Jain
Sent: Saturday, July 06, 2002 6:09 PM
To: Php-General@Lists
I am storing some values in session variables.
The behavior of the session is pretty unpredictable.
On the first page I begin with:
session_name("aname")
session_start()
session_register("var1","var2")
In another page I check for existing value of session variable "var2".
In the next page I have
I need to replace some html code in about 100 files.
Wanted to do this through code, and am using fgets() to get a line at a time
from the file, this string is saved in variable $line.
Then I check for the occurrence of the search string in $line using
strpos().
If found, I echo some statements,
Is that a space in the directory path?
I think you will have to use opendir() function first.
"opendir: Returns a directory handle to be used in subsequent closedir(),
readdir(), and rewinddir() calls. "
The manual has some good examples.
-Original Message-
From: [EMAIL PROTECTED]
[mai
This is rather sad, the PHP mailing list is pretty good.
Agreed, sometimes the answers are curt, that's because a lot of the
questions have been asked a zillion times and can be found in the archives.
And sometimes there's no response, perhaps the solution is not evident to
those on the list.
But
IL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Naintara Jain
Sent: Tuesday, June 04, 2002 2:37 PM
To: Ricardo Fitzgerald; [EMAIL PROTECTED]
Subject: RE: [PHP] Logic -- conditional statements
The problem here is that you have defined three different variables
$value1,$value2,$value3.
Keep only
The problem here is that you have defined three different variables
$value1,$value2,$value3.
Keep only one variable (say,$valueChk) that can take values 1,2 or 3.
Then check for the condition.
And there's another mistake in the script, you are checking
---if ($value2 ==0)---
twice, you probably m
If you really want to delete the file contents then open the file in
write-only mode, like so:
$open_file = fopen("$file_name","w");
-Naintara
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Jas
Sent: Monday, June 03, 2002 8:37 AM
To: [EMAIL PROTECTED]
Use JavaScript within PHP.
If you want to open a new browser window, add the following to the script
window.open('url','winname','window features');" ;
?>
look up the 'open' method in JavaScript.
- Original Message -
From: "Hugh Danaher" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL
You have the same requirement
Put this wherever you want in your script.
alert('Message!') ";
}
?>
- Original Message -
From: "Eduardo Kokubo" <[EMAIL PROTECTED]>
To: "Naintara Jain" <[EMAIL PROTECTED]>
Sent: Thursday, Oct
There are 2 things you are doing here:
1) Session start
2) page redirection
put session_start() as the 1st line in your script.
Echo commands in the included file causes such warnings:
"Warning: Cannot send session cookie - headers already sent by (output
started at c:\program files\apache group\
Maybe you can try simplifying your logic.
Why don't you avoid nested IFs till later, and keep to simple IFs.
If you want to check for $site_style not equal to 10 and also not equal to 9
then you can say
($site_style != 10 && $site_style != 9)
or even
!($site_style == 10 || $site_style == 9
I have a 2D array wherein each row is an associative array (which has keys that are
column names of
a certain MySQL table)
the array name is "sess_arrayPhotos".
I need to match PhotoId (2nd dimension key) for every row (numeric index) of the 2D
array.
I tried--
$keyPos=array_search($searchedfor
Hi Mike,
The query
$query="selct count(*) from users where sign=1";
should be "select" not "selct"
-and in future to know if there is any error in your queries you might want to check
this way:
if(mysql_query($query)
{
--do statements--
}
else
-error msg-
or even the following would be
33 matches
Mail list logo