RE: [PHP] problem with require_once

2007-08-15 Thread Sanjeev N
Hi, The problem is simple... Either the file myclass.php path is wrong (may be your calling file is in some folder and myclass.php is in another folder) or if path is correct and file may have some syntax errors or some function may not exist.. Please check the path if wrong and check the file fo

RE: [PHP] www.soongy.com

2007-08-15 Thread Sanjeev N
Hi Gevorg, Great work.. But few things. Scroller is not working even at bottom content is there... I tried in both mozila and IE... In IE when I selected text and moved down then it scrolled down. But where in Mozila no use... Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory

RE: [PHP] Parsing Variables Inside a String

2007-08-15 Thread Sanjeev N
$new = '$good_day$fr['iop']'; This will give you error... Instead if you try in this way as follows $new = "$good_day$fr['iop']"; or $new = $good_day.$fr['iop']; It will include the "They're carzy!" in the $new variable.. Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sa

RE: [PHP] Parsing Variables Inside a String

2007-08-15 Thread Sanjeev N
Consider the variable name inside database is 'emp_name' and now you want to use this as $emp_name.. This variable will be stored in as follows $variable1 = $resultfromdatabase['variable1']; Then next step is store anything in this variable as follows $$variable1 = "John"; I hope this may not h

RE: [PHP] for loop inside a switch

2007-08-17 Thread Sanjeev N
This will not work at all.. Instead of switch try with if condition as follows for ($i=0; $i <21; $i++) { if(faq$i == $q){ echo $faq1; break; } } Now it works.. You can write the code to display the result how you want.. but you cant write the code to write

RE: [PHP] cant get if logic correct..

2007-08-17 Thread Sanjeev N
Why don't you try to check for if it is integer. You will get the function to check the variable (is_integer not sure) in manual. Warm Regards, Sanjeev http://www.sanchanworld.com http://webdirectory.sanchanworld.com - Submit your website URL http://webhosting.sanchanworld.com - Choose your best

RE: [PHP] Cookies and sent headers

2007-08-18 Thread Sanjeev N
Hi, Its not the problem of cookies. Its problem of redirection or the parent.location.replace function. I mean if you already output something on the page and tries to redirect then this problem happens. Redirect before outputting anything on the page.. like space is also an output. Warm Regards,

RE: [PHP] About Session And Cookies

2007-08-18 Thread Sanjeev N
Hi Kelvin, You can use the session for your ecommerce website.. Cookies also good, but if it is disabled then it is of no use. I basically use session variable to particular member for accessing his data. Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com - Su

RE: [PHP] Does JavaScript not work in php web file?

2007-08-25 Thread Sanjeev N
Hi, JavaScript codes works in php files. Yours code is also fine. But check your calling function and defined functions. Calling function is jsopsi and defined function is opsi. Please check. Other than this everything is ok Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.

RE: [PHP] Calling functions which names are inside a variable

2007-08-25 Thread Sanjeev N
I tested this functionality. This is working fine. foo.php somefunction.php Out put is hello. You make sure that your both files are in same folder and make sure that $var.'.php' is exist with $var function. Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirector

RE: [PHP] determine which string is longer and then what is different in that string

2007-08-25 Thread Sanjeev N
Hi Richard, I am trying to get your actual problem. First, you want to compare 2 strings and want to check what the difference between these 2 strings is. I assuming string may contain either numbers or any characters. Second, you are trying to compare the numbers. But I am thinking that your pr

RE: [PHP] Does JavaScript not work in php web file?

2007-08-26 Thread Sanjeev N
4. State: getkoneksi("survey",$sqlnya); if ( mysql_num_rows($klas) > 0 ) { echo ""; while( list($state,$statename) = mysql_fetch_row($klas) ) { echo "$statename ($state)"

RE: [PHP] cant mail

2007-09-06 Thread Sanjeev N
Hi, Try to set from the program using ini_set()function and or check your mail server is correct or what. In most of the case I have used as follows Ini_set("SMPT","mail.domainname.com"); And port If mail server doesn't exist then used as Ini_set("SMPT","domainname.com"); And port And believe me

RE: [PHP] IE Not Following Header("Location: /path/to/file.php");

2007-09-06 Thread Sanjeev N
There may be some output before header() or may be IE browsing interface is not getting refresh properly Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com - Submit your website URL http://webhosting.sanchanworld.com - Choose your best web hosting plan -Or

RE: [PHP] Flow chart graph library

2007-09-06 Thread Sanjeev N
Hi, The following link may help you for what you want to achieve. I had bookmarked this link a long back. http://www.phpclasses.org/browse/package/3009.html But I have not tried. Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com - Submit your website URL ht

RE: [PHP] Opening a file

2007-09-07 Thread Sanjeev N
Here there may be 2 cases. 1st either file() is not returning any values, that is why array empty and wrong datatype error, are you able to read the file. 2nd try to use implode function to consider each word as different value in an array $lines = implode('', file("fruits.txt")); Warm Regards,

RE: [PHP] php Login script issue

2007-09-16 Thread Sanjeev N
Hi, $result = mysql_query("SELECT * FROM tablename WHERE userName='$userName' AND password = '$password'"); if($rec = mysql_fetch_array($result)){ //your code } Try like this it may solve. It may solve your problem Don't try to fetch the result from one single line code. Warm Regards, Sa

RE: [PHP] read the main domain cookie in sub domain

2007-09-18 Thread Sanjeev N
] Sent: Wednesday, September 19, 2007 12:41 AM To: Sanjeev N Cc: php-general@lists.php.net Subject: Re: [PHP] read the main domain cookie in sub domain Sanjeev N wrote: > Assume, I have www.domain.com <http://www.domain.com/> in which I wrote the > functionality for user authentication and

RE: [PHP] read the main domain cookie in sub domain

2007-09-18 Thread Sanjeev N
website URL http://webhosting.sanchanworld.com - Choose your best web hosting plan -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 19, 2007 12:46 AM To: Sanjeev N Cc: php-general@lists.php.net Subject: Re: [PHP] read the main domain cookie in sub domain

[PHP] read the main domain cookie in sub domain

2007-09-18 Thread Sanjeev N
Hi, Assume, I have www.domain.com in which I wrote the functionality for user authentication and his profile related functionality. Now, when user logs in using http://www.domain.com/users/login.php then after his successful login a session as well as a cookie is gett

[PHP] show required row first and then other remaining rows

2007-10-25 Thread Sanjeev N
Hi, Consider the following case mysql> select *from names; ++-++ | id | name| phone | ++-++ | 1 | sanju | 984565 | | 2 | sanjeev | 997223 | | 3 | puttu | 990058 | | 4 | raju| 944811 | ++

Re: [PHP] show required row first and then other remaining rows

2007-10-25 Thread Sanjeev N
Hi Andrew, Thanks a lot. it really worked very well. Sanjeev On 10/26/07, Andrew Ballard <[EMAIL PROTECTED]> wrote: > > This should work: > > ORDER BY CASE WHEN id = 3 THEN 0 ELSE 1 END, name > > Andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.

[PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Sanjeev N
Hi, I have written a program which imports the tab delimited file and insert all the line from file to the mysql line by line. I am succeding in the above case. but problem with the above method is its taking to too much time while inserting into the database. The file's size will be more than 5000

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-08 Thread Sanjeev N
Hi Jim Lucas, You are correct... i want to run in the same way. but as my 2 tables, column name are different i cant run the LOAD DATA infile. And the example you mentioned for break at 100, also i thought to use in that way. but one of the column had the text type which we cant predict about th

Re: [PHP] convert query result to array

2008-05-13 Thread Sanjeev N
fetchAll() works if php version is greater than 5. As Wang suggested, we should write our own function. its easy... i have done so many times for larger database. Store earch rows of the resultset in the array (multidimensional ie. 2). and then work on the array using the loops & conditions $qu

Re: [PHP] problem with htmlspecialchars in version5.2.5

2008-05-19 Thread Sanjeev N
which special characters dint converted? this function converts only few special characters. try to use htmlentities function instead -- Regards, Sanjeev http://www.sanchanworld.com | http://webdirectory.sanchanworld.com - submit your site On 5/17/08, It flance <[EMAIL PROTECTED]> wrote: > > Hi

RE: [PHP] Which PHP-Editor to use?

2007-08-02 Thread Sanjeev N
Hi, I have used both Editplus and Macromedia dreamweaver. If you want to see the visual the elements then dreamweaver is best. If you only want the coding environment the I also suggest you to use editplus Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com -

RE: [PHP] php SHOW

2007-08-03 Thread Sanjeev N
Hi, If I understood your problem correctly then, you can use ob_start and ob_end functions Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com -Original Message- From: Hulf [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 4:26 PM To: php-general

RE: [PHP] About PHP/MYSQL Pagination

2007-08-04 Thread Sanjeev N
Hi, 1. first you know current page number 2. you know how many pages Next consider total how many page number you want to display Assume 5 I.e. << first previous | 1 2 3 4 5 | next last >> Now when you come to page 4 then starting page is around 4-1 or 4-2 (however you want) and start

RE: [PHP] Check if var has a date (timestamp or regular)

2007-08-08 Thread Sanjeev N
Hi, You need to check with your submitted data as in which format it is. Try with different combination for splitting the string (include -, / while splitting string). If input string works with split then assume input string as in above format. Otherwise simple, consider it as in timestamp. But

RE: [PHP] compose html body with variables

2007-08-08 Thread Sanjeev N
Use as following: $body = " Hello, here is your quote from Freight Services.Shipping from: $origin to $destinationShipping subtotal $" . number_format($subtotal,2). "Freight charges $" . number_format($freightCharges,2). ""; And so on Warm Regards, Sanjeev http://www.sanchanworld.com/ http:/