Re: [PHP] Hi problem with selected value!!
I don't know what the problem is because it works fine here (IE 5.5) On Mon, 11 Mar 2002, Balaji Ankem wrote: > Hi friend, > could u plz. Tell me how to display the slected option value in alert > box? > > Code I wrote is like this.. But I am getting NULL.. Any help would be > appreciable.. > > = > > > > > > > > > function check() > { > var a; > alert(document.babai.bongu.value); // Is it correct?? > return true; > } > > > > > > > > > > > > 11 > 12 > 13 > > > > > > > > > Thanks in advance > Balaji > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session OR variables
On Mon, 11 Mar 2002, Vlad Kulchitski wrote: > The question is how reliable the session is? In other words > I understand session works based on cookies right? So if the client > browser has cookies disabled the session is not going to work > right? Not per se, cookies is one way of using sessions. The other way is to use the special var SID (without the $ sign, so a constant in a way) like this (from the manual): To continue, click here And concerning the reliability, if you store data in a session a user can't fiddle with the values as easily as when you would save your data the url. Jan > > Vlad > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hi How to compare two dates using PHP which are from mysqldatabase?
On Tue, 12 Mar 2002, Balaji Ankem wrote: http://www.php.net/manual/en/function.strtotime.php you can compare the results with > < =, etc... > Hi, > I would like to compare the two dates (including time stamp) > using php. > Is it possible? > > Any help would be apprciable. > > Thanks in advance > Balaji > > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to compare two dates using PHP which are from mysqldatabase?
On Tue, 12 Mar 2002, Balaji Ankem wrote: > Hi Jan, > I want to compare the DTAETIME1,DATETIME2 which are from mysql > table and want to compare in PHP. > But strtotime takes only one argument and it checks whether it > is valid or not. True, after you've fetched a record with, e.g. $row = mysql_fetch_row($result) use if (strtotime($row["DATETIME1"]) < strtotime($row["DATETIME2"])) { ... } or whatever you desire... > > Balaji > > -Original Message- > From: Jan Rademaker [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 12, 2002 6:40 PM > To: Balaji Ankem > Cc: Php-General > Subject: Re: [PHP] Hi How to compare two dates using PHP which are from > mysql database? > > > On Tue, 12 Mar 2002, Balaji Ankem wrote: > > http://www.php.net/manual/en/function.strtotime.php > > you can compare the results with > < =, etc... > > > Hi, > > I would like to compare the two dates (including time stamp) > using > > php. > > Is it possible? > > > > Any help would be apprciable. > > > > Thanks in advance > > Balaji > > > > > > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hi How to compare two dates using PHP which are from mysqldatabase?
On Tue, 12 Mar 2002, Jason Lotito wrote: > Why not compare them in the SQL Query itself? > That could work just as well, depending in what you want to do with the data. -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Handling!
On Tue, 12 Mar 2002, Thomas Edison Jr. wrote: > I want errors reported on a page when the mail() > function for any reason fails to send emails. FOr > example, if there is a malformed email address or > anything, and the mail is not sent, how can i catch > the Error and Display it on the page? the easiest way is: > > Thanks, > T. Edison Jr. > > > > = > Rahul S. Johari (Director) > ** > Abraxas Technologies Inc. > Homepage : http://www.abraxastech.com > Email : [EMAIL PROTECTED] > Tel : 91-4546512/4522124 > *** > > __ > Do You Yahoo!? > Try FREE Yahoo! Mail - the world's greatest free email! > http://mail.yahoo.com/ > > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] parse error? how can I print spesific message for allerror mesage
On Tue, 12 Mar 2002, Ceyhun Güler wrote: > than the script works like mine > but I wonder to disable "Warning: Undefined index: dir in > c:\inetpub\wwwroot\kocak\resimgoster.php on line 1" > response if someone directly enter "localhost/myphp/resmigoster.php" I want > to say him that "Access Denied" Or something like that use error_reporting() (see manual) to suppres warnings. to give back an error use something like; if (!isset($dir) || !isset($res)) { print "Access Denied"; exit; } > > > > > > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Another Session Question..
On Tue, 12 Mar 2002, Gonzalez, Zara E wrote: > On second look, perhaps it is working correctly. > > I wasn't incrementing my counter variable. Sorry to flood your mailboxes. > > Zara > this should work as well; foreach($_REQUEST as $key => $val) { $_SESSION[$key] = $val; } -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $PHP_SELF in include files
On Tue, 12 Mar 2002, David Johansen wrote: you might try global $PHP_SELF; in that function... > Here's the chunk of code in the include file that gave me that. I should > have put it with the original post: > > function questions() > { > ?> > U face="Times New Roman" size="2"> > > color="#CC">Questions > size="2"> > Insert questions here. > } > ?> > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and permissions
On Tue, 12 Mar 2002, Don wrote: use phpinfo() to find that out... > Hi, > > I have a question about how PHP runs. I have a file on my FreeBSD server that is >owned by another user but is the same group as myself. The file has read/write >permissions for the user only. Therefore, when I log onto the server I cannot read >or write to the file. In fact, I can not even FTP it. > > The funny thing is, I wrote a PHP script to read the file (it's actually a CSV file) >into an array using the function fgetcsv and display the values within the browser. >This worked. > > So my question is, what user is PHP run under that allows me to access another >user's file (but the same group)? > > Thanks, > Don > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and permissions
On Tue, 12 Mar 2002, Don wrote: > I did. That's why I'm confused. phpinfo() is telling me that the user is > myself (I don't see the group). So what is the "permission" difference > between running PHP and logging on to the server via telnet as myself? you should be able to find the group id in the same place as the userid (after the /), eg.: user(1234)/group(4323) or user(1234)/4323 Maybe this helps you out a little further... -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and permissions
On Wed, 13 Mar 2002, Jan Rademaker wrote: > On Tue, 12 Mar 2002, Don wrote: > > > I did. That's why I'm confused. phpinfo() is telling me that the user is > > myself (I don't see the group). So what is the "permission" difference > > between running PHP and logging on to the server via telnet as myself? > > you should be able to find the group id in the same place as the > userid (after the /), eg.: > > user(1234)/group(4323) > or > user(1234)/4323 > > Maybe this helps you out a little further... i forgot to mention that you can find user/group ids in the apache section of phpinfo(); -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array within an array
On Fri, 15 Mar 2002, Caspar Kennerdale wrote: > I have an sql query which calls * rows from a table. > > Each row is an array of table field values. > > This is how I understand the heirachy > > $table_row_array[0] = $field_row_array[] > $table_row_array[1] = $field_row_array[] > $table_row_array[2] = $field_row_array[] > > Now $table_row_array is being drawn from the database via a while loop and > an $a++, thus I do not have a name for $field_row_array- > > I just know that the value of each in $table_row_array is an array. > > How can I access the values within $filed_row_array[]? > > I want to do something like > > $table_row_array[0 [1]]; (the second value from the array that is the first > of $table_row_array) $table_row_array[0][1]; > > I know this isnt the syntax > > Thanks in advance > > > > > > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Please explain...
Can someone explain why this works? $x = 0; if ($x == "foo") { print "yeah"; } This prints 'yeah', but i can't figure out why... -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache
On Thu, 21 Mar 2002, jtjohnston wrote: > I'm also looking at this in my .conf. I know putting something here is the > answer, but what :) I believe it was something like the NoIndex option, but I'm not sure... > > > Options FollowSymLinks > AllowOverride All > > > J > > Scott Furt wrote: > > > Errmm... i don't know any apache groups, but > > if you want to do what you ask, just read the > > documentation, it's easy :-) > > > > jtjohnston wrote: > > > Anyone know of a good apache group? > > > I want to hide the structure of a directory when there is no idex.html > > > present > > > > > > J > > > > > > > > > > > -- > John Taylor-Johnston > - > > ' ' ' Collège de Sherbrooke: > ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/ >- Université de Sherbrooke: > http://compcanlit.ca/ > 819-569-2064 > > > > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using a counter in a foreach loop
On Tue, 26 Mar 2002, Erik Price wrote: > I have a pretty basic question and was wondering if someone could point > me in the right direction: > > I have a foreach loop, where I execute some commands for each element in > a certain array. One thing I would like to add to this loop is a > counter, so that on each iteration of the loop I have a next higher > number. The following does not work: > > foreach ($months) { >$i = 1; >// do some things >$i++; > } > > because in each new iteration of the loop, $i is reset to 1. Is there a > way that I can achieve this effect? Thanks for any advice, well... put $i = 1; outside your loop...? $i = 1; foreach ($months) { // do some things $i++; } -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] syntax
On Wed, 27 Mar 2002, John Fishworld wrote: use this: ${"ned_".$i."_city"} = $ned_city; after that you can use your new var as $ned_1_city, if $i was 1 ofcourse... But in this case you might be better off using arrays, as some have suggested. > Can someone please remind me what the correct syntax for this is ! > in a loop > and want individual > > $ned_1_city = blah > $ned_2_city = blur > > I've been trying this but its wrong > > $ned_.$i._city = $ned_city ; > > thanks > john > > > > > -- Jan Rademaker <[EMAIL PROTECTED]> http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php