RE: [PHP] Yikes! Strange Occurrence of ! in mail

2003-09-16 Thread Naintara Jain
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

[PHP] Fatal error: Call to undefined function: mysql_connect()

2003-09-12 Thread Naintara Jain
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

RE: [PHP] twodimensional array / word-frequencylist

2003-06-26 Thread Naintara Jain
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_

RE: [PHP] need help breaking out of loop.

2003-06-26 Thread Naintara Jain
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

RE: [PHP] Weird mktime problem

2003-06-26 Thread Naintara Jain
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,

RE: [PHP] Fw: Help

2003-06-21 Thread Naintara Jain
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

RE: [PHP] in a logic loop!

2002-09-24 Thread Naintara Jain
; 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

RE: [PHP] in a logic loop!

2002-09-24 Thread Naintara Jain
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

[PHP] in a logic loop!

2002-09-23 Thread Naintara Jain
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

RE: [PHP] gmdate()

2002-09-06 Thread Naintara Jain
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

RE: [PHP] cant find the wrong?

2002-09-06 Thread Naintara Jain
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

RE: [PHP] question about Location

2002-09-06 Thread Naintara Jain
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

RE: [PHP] PHP/MySQL Search Engine Query Question

2002-07-27 Thread Naintara Jain
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

RE: [PHP] Password Generator Script

2002-07-27 Thread Naintara Jain
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

FW: [PHP] array_rand() and seed

2002-07-23 Thread Naintara Jain
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

[PHP] array_rand() and seed

2002-07-23 Thread Naintara Jain
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

RE: [PHP] CANT GET STUFF TO WORK

2002-07-09 Thread Naintara Jain
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

RE: [PHP] session problem

2002-07-08 Thread Naintara Jain
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

RE: [PHP] Linked drop down selection lists and dynamically generated links

2002-07-06 Thread Naintara Jain
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

FW: [PHP] session problem

2002-07-06 Thread Naintara Jain
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

[PHP] session problem

2002-07-06 Thread Naintara Jain
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

[PHP] FOXED - no success in replacing file content using fgets/fputs and str_replace

2002-06-26 Thread Naintara Jain
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,

RE: [PHP] Trying to list a directory content HELP PLEASE

2002-06-07 Thread Naintara Jain
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

RE: [PHP] MySQL - Creating The Database

2002-06-04 Thread Naintara Jain
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

FW: [PHP] Logic -- conditional statements

2002-06-04 Thread Naintara Jain
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

RE: [PHP] Logic -- conditional statements

2002-06-04 Thread Naintara Jain
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

RE: [PHP] delete file contents before writing?

2002-06-03 Thread Naintara Jain
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]

Re: [PHP] Another Header headed nowhere

2001-10-05 Thread Naintara Jain
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

Re: [PHP] popup window under php

2001-10-04 Thread Naintara Jain
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

Re: [PHP] Session and header() errrors

2001-10-04 Thread Naintara Jain
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\

Re: [PHP] php in css not working with IF's

2001-10-03 Thread Naintara Jain
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

[PHP] array_search in 2-D array

2001-09-27 Thread Naintara Jain
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

Re: [PHP] mysql_fetch_array() doesn't work

2001-09-26 Thread Naintara Jain
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