RE: [PHP] take date and convert to day of year

2001-11-13 Thread Martin Towell
looking at the manual, getdate() is meant to be passed a unix time stamp, so, you'll need to use strtotime() first thus: $utime = strtotime(30-Nov-1971); $dob = getdate($utime); $dobnum = $dob['yday']; print $dobnum; Notice I changed the format of the date, when I tried using the original

[PHP] silly question

2001-11-13 Thread Rodrigo Peres
Hi list, I have PHP code to insert the result of a form into mysql. When I nedd to made an update, I pass an id in the url and use it to make the update query. The problem is after I click in the update button (input submit) my page refresh and came back in the same state, to see the changes I

[PHP] javascript to php ????

2001-11-13 Thread fitiux
Hi =) is it possible to pass a javascript array to php ??? thanks.

Re: [PHP] javascript to php ????

2001-11-13 Thread Mark
On Tue, 13 Nov 2001 19:53:48 -0300, fitiux wrote: Hi =) is it possible to pass a javascript array to php ??? by the time javascript comes into play, php has already done it's job and left the building. If you mean can javascript pass variables to a new request for php to handle, then sure.

RE: [PHP] silly question

2001-11-13 Thread Martin Towell
try adding the nocache header() calls to the page to force the broswer to refresh. See how that goes Martin T -Original Message- From: Rodrigo Peres [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 9:43 AM To: PHP Subject: [PHP] silly question Hi list, I have PHP code to

[PHP] silly question cont...

2001-11-13 Thread Rodrigo Peres
Sorry all, just to add a little info, the inpu hidden i've mentioned in the other message is made if exist the id in the url!! it isn't all the time there :-) thks again Rodrigo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] javascript to php ???????

2001-11-13 Thread fitiux
Hi =) is it possible to pass a javascript array to php ??? by the time javascript comes into play, php has already done it's job and left the building. If you mean can javascript pass variables to a new request for php to handle, then sure. Thanks for your reply. =) I have a little

RE: [PHP] javascript to php ???????

2001-11-13 Thread Martin Towell
serialise the array and make the value of a hidden field this value. Then in PHP unserialise it. -Original Message- From: fitiux [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 10:18 AM To: PHP General Cc: [EMAIL PROTECTED] Subject: Re: [PHP] javascript to php ??? Hi

Re: [PHP] javascript to php ???????

2001-11-13 Thread Mark
On Tue, 13 Nov 2001 20:17:32 -0300, fitiux wrote: Hi =) is it possible to pass a javascript array to php ??? by the time javascript comes into play, php has already done it's job and left the building. If you mean can javascript pass variables to a new request for php to handle, then

RE: [PHP] javascript to php ???????

2001-11-13 Thread Mark
On Wed, 14 Nov 2001 10:16:42 +1100, Martin Towell wrote: serialise the array and make the value of a hidden field this value. Then in PHP unserialise it. that would work great if it were a php array, but I believe we're talking about javascript arrays here. :) -Original Message- From:

[PHP] Parsing XML

2001-11-13 Thread Michael Harris
Can anybody tell me if there is a way to build an array or some other means of collecting the attributes from the Start Element Handler so I can return them back to my main application? Thanks for any help, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] javascript to php ???????

2001-11-13 Thread Richard S. Crawford
Why, sure! In your FORM tag, use ACTION=test.php. You can send your JavaScript variable as part of the form, in a hidden form field such as INPUT TYPE=hidden VALUE=myValue. The value of the variable will be available the next time test.php shows up as $myValue. You can then manipulate it

RE: [PHP] javascript to php ???????

2001-11-13 Thread Martin Towell
That's why I put quotes around the words - obviously a function would be need to be written to do the serialising and a corresponding php function to retrieve the values and place them into an array again. -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November

Re: [PHP] javascript to php ???? THANKS =)

2001-11-13 Thread fitiux
Thanks to all for help me.. =) I hope to help someone soon. --Patricio.

Re: [PHP] Adding Dates (To Obtain Future Dates)

2001-11-13 Thread David Robley
On Wed, 14 Nov 2001 07:21, Robert Miller wrote: This problem took a while to figure out. I'm posting the solution so that = other's may find this example. If you know of a better way, please reply. = :-) Cheers, Rob Problem: Generate Future Dates: Sub-Problem: Future Dates are

[PHP] Re: Parsing XML

2001-11-13 Thread Manuel Lemos
Hello, Michael Harris wrote: Can anybody tell me if there is a way to build an array or some other means of collecting the attributes from the Start Element Handler so I can return them back to my main application? Maybe you would like to try this class that does exactly what you need.

[PHP] Sending mail from PHP with SMTP server requiring authentication

2001-11-13 Thread R'twick Niceorgaw
Hi gang, Any one tried to send mail through PHP using mail() through an smtp server which requires authentication ? Regards R'twick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

[PHP] newbie question about odbc_connect

2001-11-13 Thread Johannes Ambrose
Hi, I've been happily using mysql_connect() for various scripts on a linux box. Now I'd like to connect to a filemaker pro database using odbc_connect(). However, the response I get is Call to undefined function. Do I need to compile odbc support? (I thought it was built in.) Is there an

Re: [PHP] take date and convert to day of year

2001-11-13 Thread sundogcurt
I have tried to implement your code Martin, and I do thank you VERY MUCH for the help, but your code seems to have the same trouble as mine, it doesn't matter what date I start with, I end up with 364 as the day of the year, I am on win32 though I don't know if that matters. Here is what I

[PHP] Re: Can If Else statements be split into code blocks??

2001-11-13 Thread Brad Melendy
Ok, I figured out that just using echo seems to be the best way to do this under PHP. In ASP, you can end your code block and start in with HTML, but I couldn't get that to work with PHP. However, I was able to just use the echo statement to get the conditional HTML I wanted to show up when the

Re: [PHP] newbie question about odbc_connect

2001-11-13 Thread David Robley
On Wed, 14 Nov 2001 10:51, Johannes Ambrose wrote: Hi, I've been happily using mysql_connect() for various scripts on a linux box. Now I'd like to connect to a filemaker pro database using odbc_connect(). However, the response I get is Call to undefined function. Do I need to compile odbc

Re: [PHP] Re: Can If Else statements be split into code blocks??

2001-11-13 Thread David Robley
On Wed, 14 Nov 2001 11:43, Brad Melendy wrote: Ok, I figured out that just using echo seems to be the best way to do this under PHP. In ASP, you can end your code block and start in with HTML, but I couldn't get that to work with PHP. However, I was able to just use the echo statement to

RE: [PHP] Re: Can If Else statements be split into code blocks??

2001-11-13 Thread Jack Dempsey
David's correct. The reason it wasn't working for you is that you didn't put braces around the code you wanted executed in the if statement. Also, to output large chunks of html in a simple manner with variables included, look into here docs. They look like this: echoEOF This is html with a

Re: [PHP] fopen and paths

2001-11-13 Thread David Robley
On Tue, 13 Nov 2001 22:28, PACKER, Steffan wrote: Thanks but I am still having problems, $DOCUMENT_ROOT does not seem to work(I am using an NT4 server), I cannot use an absolute path as the content management software that is running has a tendency to strip them out! It seems (to me) that

Re: [PHP] Help! How do i mail a value from a mysql databse?

2001-11-13 Thread David Robley
On Wed, 14 Nov 2001 04:26, Raymond wrote: Hi! I'm trying to send a mail with password to the new user of my website, but . Does anyone know how to put the variable inside my mail? I have tried this: -- else { // sende kundeopplysninger til databasen $db

Re: [PHP] silly question

2001-11-13 Thread sundogcurt
Take care to be sure that you make the update, before the rest of the page loads, things happen in order, so it's almost like creating your page backwards (I just had that problem). I can elaborate if you like. (C: [EMAIL PROTECTED] wrote: Hi list, I have PHP code to insert the result of a

[PHP] Security concerns with Virtual Hosts

2001-11-13 Thread Michael A. Peters
I am not going to mention which host I'm using for obvious reasons. However, I'm wondering if it is just a mis-configuration, or if it is a weakness in php. With this host, you initially have the same database password to the MySQL database as you do to the account. It is wise to change both,

Re: [PHP] Security concerns with Virtual Hosts

2001-11-13 Thread Rasmus Lerdorf
This is what safe_mode addresses. On Tue, 13 Nov 2001, Michael A. Peters wrote: I am not going to mention which host I'm using for obvious reasons. However, I'm wondering if it is just a mis-configuration, or if it is a weakness in php. With this host, you initially have the same

RE: [PHP] Sending mail from PHP with SMTP server requiring authentication

2001-11-13 Thread Richard Heyes
Hi gang, Any one tried to send mail through PHP using mail() through an smtp server which requires authentication ? http://www.phpguru.org/scripts/10/ -- Richard Heyes If you have any trouble sounding condescending, find a Unix user to show you how it's done. - Scott Adams -- PHP General

RE: [PHP] take date and convert to day of year

2001-11-13 Thread Martin Towell
I'm running on WinNT4 w/ PHP 4.0.6 and the code I supplied came back with 333 and for today I get 317 dunno why you're getting 364 anyone, any eye-dears ?? -Original Message- From: sundogcurt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 12:14 PM To: GENERAL PHP LIST

Re: [PHP] some questions on sessions (long)...

2001-11-13 Thread Christian Dechery
But what about the session? It get's registered... doesn't sessions also need to send header information? it gets registered... it just doesn't persist... At 17:07 12/11/01 -0800, you wrote: Your problem probably is including the miec.php from the .shtml document. Does the .shtml document send

[PHP] Non-PHP question

2001-11-13 Thread Martin Towell
Sorry about asking a non-PHP question here, but I thought that since I've been helping others recently, you'll give me a bit of lee-way. In IE, to find out how far down a page is scrolled, you can do document.body.scrollTop what's the equivalent in Netscape 6 ? Thanks in advance Martin

[PHP] can php detect whether an email address is a valid one?

2001-11-13 Thread Alex Chau
I have a php script sending newsletter to a mailing list time by time, but some emails are no longer exist, so I need to remove them manually. Can php detect whether an email address is a valid one, then remove it from the list automatically? no matter before or after the newsletter has sent.

RE: [PHP] can php detect whether an email address is a valid one?

2001-11-13 Thread Martin Towell
You can set the Error-To: header to some email address that runs a script to remove the email address - other that that, no, not that I know of. -Original Message- From: Alex Chau [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:31 PM To: [EMAIL PROTECTED] Subject: [PHP]

Re: [PHP] for loop problem?

2001-11-13 Thread jimmy elab
Tyler Longren wrote: Here's something interesting though. There's an id field that's set to AUTO_INCREMENT. Yep, and that's one thing I've been looking at. See, I find it strange that you need an KEY idpass (id, passcode(245)) when the ID is quaranteed to be unique in itself. Funny...

RE: [PHP] Non-PHP question

2001-11-13 Thread Martin Towell
OK, just found it! window.pageYOffset -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 1:25 PM To: [EMAIL PROTECTED] Subject: [PHP] Non-PHP question Sorry about asking a non-PHP question here, but I thought that since I've been

RE: [PHP] It doesn't cost you anything, why not try it!

2001-11-13 Thread John Huggins
Well, well. They got around the USMail fraud problem so this now only violates several dozen laws. -Original Message- From: Saint [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 1:24 AM To: [EMAIL PROTECTED] Subject: [PHP] It doesn't cost you anything, why not try it!

[PHP] Re: Frames and Sessions

2001-11-13 Thread jimmy elab
Michael Hall wrote: can't figure out how I'm going to maintain a session across the three seperate HTML files in the frameset. You don't! PHP and your browser will do it for you. It doesn't matter whether you're in frames or not. All that matters is the cookie that is automagically generated

Re: [PHP] Security concerns with Virtual Hosts

2001-11-13 Thread Michael A. Peters
Ah, OK. So I need to complain that their php is not compiled with the --with-safe_mode option. Thanks! On Tue, 13 Nov 2001 18:09:41 -0800 (PST) Rasmus Lerdorf [EMAIL PROTECTED] wrote: This is what safe_mode addresses. On Tue, 13 Nov 2001, Michael A. Peters wrote: I am not going to

Re: [PHP] Security concerns with Virtual Hosts

2001-11-13 Thread Rasmus Lerdorf
That or open_basedir. Both can be configured in the php.ini file. It's not a compile-time thing. -Rasmus On Tue, 13 Nov 2001, Michael A. Peters wrote: Ah, OK. So I need to complain that their php is not compiled with the --with-safe_mode option. Thanks! On Tue, 13 Nov 2001 18:09:41

Re: [PHP] Parsing XML

2001-11-13 Thread Ben Gollmer
Do something like this: function parseXML($xmlFile) { $theParser = xml_parser_create(); xml_set_element_handler($theParser, startElementHandler, endElementHandler); //parse your XML here return $attributeArray; } function startElementHandler($theParser,

Re: [PHP] Parsing XML

2001-11-13 Thread Ben Gollmer
Oops, forgot a line: On Tuesday, November 13, 2001, at 08:58 PM, Ben Gollmer wrote: Do something like this: function parseXML($xmlFile) { global $attributeArray; $theParser = xml_parser_create(); xml_set_element_handler($theParser, startElementHandler,

[PHP] Re: EXPIRATION PROBLEM; PLEASE HELP ME !!!

2001-11-13 Thread Fred
Your login.php uses the POST method to send the username and password to main.php. In general this is a good idea, because you do not want someone's password available from the URL. If you used the GET method you would not have a problem with the page expiring, but the password would be

[PHP] using sessions and include

2001-11-13 Thread jtjohnston
Martin, are ya out there? Does anyone know anything about sessions? (An post reply would be handy :) I am using session_register. I have: http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/index.html http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/index.html.phps Which

Re: [PHP] is_null misses spaces... SOLUTION!

2001-11-13 Thread Spunk S. Spunk III
Ahh... and the winner is empty(). Thanks Christian for this elusive answer and everyone else for their input. Spunk I need to check variables for blank values but it appears that is_null and == return true if there is a space. Any other suggestions? Thanks -- PHP General

[PHP] Checkboxes / Undefined Variables

2001-11-13 Thread afrodriguez
In am HTML form, checkboxes NOT checked are not passed to the PHP script called by the form. Therefore, if $name_of_chechbox_3 is not passed but it's used in the PHP script, it results in Warning: Undefined Variable. How can I avoid this? Thanks! A. F. Rodriguez ([EMAIL PROTECTED]) --

RE: [PHP] Checkboxes / Undefined Variables

2001-11-13 Thread Martin Towell
use : @$name_of_chechbox_3 to suppress warnings or at the start of the file do : if (!isset($name_of_chechbox_3)) $name_of_chechbox_3 = ; or something similar -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 14, 2001 5:03 PM To: [EMAIL

[PHP] Function Call Line Number

2001-11-13 Thread Jason G.
Hello, Does anyone know of a way, that from within a function, you can determine what line number and file the function was called on? I did try: function myfunc($lineno = __LINE__) { echo $lineno; } but this just outputted the very line that __LINE__ resides on. This would be very

Re: [PHP] Checkboxes / Undefined Variables

2001-11-13 Thread Jason G.
your error reporting must be set to E_ALL. a very simple way is: $checkbox_3 = isset($checkbox_3); Now, $checkbox_3 will be either TRUE or FALSE with no errors! -Jason Garber IonZoft.com At 06:03 AM 11/14/2001 +, [EMAIL PROTECTED] wrote: In am HTML form, checkboxes NOT checked are not

[PHP] Re: Checkboxes / Undefined Variables

2001-11-13 Thread dav
define it :-)) boolean name_of_chechbox_3; for example J [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] .net... In am HTML form, checkboxes NOT checked are not passed to the PHP script called by the form. Therefore, if $name_of_chechbox_3 is not passed but it's used in

[PHP] Re: Frames and Sessions

2001-11-13 Thread dav
I agree :-)) J Jimmy Elab [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Michael Hall wrote: can't figure out how I'm going to maintain a session across the three seperate HTML files in the frameset. You don't! PHP and your browser will do it for

Re: [PHP] can php detect whether an email address is a valid one?

2001-11-13 Thread Daniel Masur
get the mx record: function checkmail ($mailtocheck) { if (eregi(^[_\.0-9a-z-]+@([0-9a-z][-0-9a-z\.]+)\.([a-z]{2,3}$), $mailtocheck, $check)) { if (getmxrr($check[1]...$check[2],$temp)) { return true; } return false; // kein mx gefunden } else { return false; // syntax fehler } } Martin

[PHP] Re: can php detect whether an email address is a valid one?

2001-11-13 Thread dav
You can do it like: 1) Have php send the email with a particulare return reply so that wrong email addresses get sent back to it 2) Configure procmail to launch a php script when an email is received on that account (the return one) 3) Write the php script (SCRIPT NOT WEB) to parse the email

[PHP] Re: Function Call Line Number

2001-11-13 Thread _lallous
I guess that is not possible with PHP yet. Jason G. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Does anyone know of a way, that from within a function, you can determine what line number and file the function was called on? I did try: function

<    1   2