[PHP] for loop problem
I have a problem with a piece of code that uses the mail function in a for loop. It sends out mail to all the users in the database but it has a problem with attaching their specific name into the message. What happens is the first user in the database will get their name in the e-mail (Dear John,). Then the second user in the database will get the last users name and their name in the e-mail (Dear John, Dear Mike) ...and so on and so forth. How do I fix this problem? Your help is appreciated. Here is the code: If ($button != ) { $t = mysql_query(SELECT * from AddExisting); $number_of_customers = mysql_num_rows($t); for($i=0; $i$number_of_customers;$i++) { $r = mysql_fetch_array($t); $email = $r[EMAIL_ADDRESS]; $cusname = $r[Name]; $to = $email; $subject = hello; $message = Dear $cusname,.$message; $fromaddress = [EMAIL PROTECTED]; mail($to, $subject, $message, $fromaddress); }//end of for }//end of if
Re: [PHP] Multipage form
On Wed, 20 Mar 2002, David Johansen wrote: I was just wondering what was the best way to handle a multipage form. Would the best way be to keep passing the variables through the forms as hidden values or should I use sessions and store all the values as session variables? What's the best way to handle all of this? Also the different forms will all be in the same php file that loops to itself if that makes a difference. Erik gives you some good advice. The best I can add is to minimize your expectations about rational behavior on the part of your users. People will use the back button to go back and change their answers, etc., no matter how much you tell them not to. For really complicated forms I usually build (from leftover parts in our virtual basement) a system something like this: 1) An array ('form_fields') describing all the form items on all the pages. This describes what type of form element, how it's labeled, which other elements it depends on, whether it's mandatory, etc. 2) Another array ('field_pages') that says which of these should ideally appear on which apges, and in which sequence. 3) A set of functions that can draw any form element based on the definitions in array form_fields above. 4) Iterate through array field_pages above, drawing all the items on the page we currently think we're on (this is the one thing we store in a hidden variable; everything else stays in a session array). 5) When the form is submitted, check through the items that array field_pages says should be on the page identified by the hidden variable. If any marked as mandatory are not completed, generate an error label indexed on its form_fields key. Do the same for any other errors. 6) If we have anything in our error label array, re-draw those fields, labeled with the appropriate error messages, and return to step 5. 7) Otherwise, increment our index into field_pages and draw some more (returning to step 4), until there's nothing left. It's a bit of work to set up the first time, but well worth it, because your complex forms will be more robust than most. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] for loop problem
Try this: If ($button != ) { $t = mysql_query(SELECT * from AddExisting); $number_of_customers = mysql_num_rows($t); for($i=0; $i$number_of_customers;$i++) { $r = mysql_fetch_array($t); $email = $r[EMAIL_ADDRESS]; $cusname = $r[Name]; $originalMessage = $message $to = $email; $subject = hello; $message = Dear $cusname,.$originalMessage; $fromaddress = [EMAIL PROTECTED]; mail($to, $subject, $message, $fromaddress); }//end of for }//end of if * * Cal Evans * Techno-Mage * http://www.calevans.com * - Original Message - From: Kris Vose [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 2:07 PM Subject: [PHP] for loop problem I have a problem with a piece of code that uses the mail function in a for loop. It sends out mail to all the users in the database but it has a problem with attaching their specific name into the message. What happens is the first user in the database will get their name in the e-mail (Dear John,). Then the second user in the database will get the last users name and their name in the e-mail (Dear John, Dear Mike) ...and so on and so forth. How do I fix this problem? Your help is appreciated. Here is the code: If ($button != ) { $t = mysql_query(SELECT * from AddExisting); $number_of_customers = mysql_num_rows($t); for($i=0; $i$number_of_customers;$i++) { $r = mysql_fetch_array($t); $email = $r[EMAIL_ADDRESS]; $cusname = $r[Name]; $to = $email; $subject = hello; $message = Dear $cusname,.$message; $fromaddress = [EMAIL PROTECTED]; mail($to, $subject, $message, $fromaddress); }//end of for }//end of if -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] for loop problem
Opps, last messages had the definition of $originalMessage in the wrong place. Try this: If ($button != ) { $t = mysql_query(SELECT * from AddExisting); $number_of_customers = mysql_num_rows($t); $originalMessage = $message; for($i=0; $i$number_of_customers;$i++) { $r = mysql_fetch_array($t); $email = $r[EMAIL_ADDRESS]; $cusname = $r[Name]; $to = $email; $subject = hello; $message = Dear $cusname,.$originalMessage; $fromaddress = [EMAIL PROTECTED]; mail($to, $subject, $message, $fromaddress); }//end of for }//end of if * * Cal Evans * Techno-Mage * http://www.calevans.com * - Original Message - From: Kris Vose [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 2:07 PM Subject: [PHP] for loop problem I have a problem with a piece of code that uses the mail function in a for loop. It sends out mail to all the users in the database but it has a problem with attaching their specific name into the message. What happens is the first user in the database will get their name in the e-mail (Dear John,). Then the second user in the database will get the last users name and their name in the e-mail (Dear John, Dear Mike) ...and so on and so forth. How do I fix this problem? Your help is appreciated. Here is the code: If ($button != ) { $t = mysql_query(SELECT * from AddExisting); $number_of_customers = mysql_num_rows($t); for($i=0; $i$number_of_customers;$i++) { $r = mysql_fetch_array($t); $email = $r[EMAIL_ADDRESS]; $cusname = $r[Name]; $to = $email; $subject = hello; $message = Dear $cusname,.$message; $fromaddress = [EMAIL PROTECTED]; mail($to, $subject, $message, $fromaddress); }//end of for }//end of if -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTMLnetscape issue
Try including a nbsp; in the cell tr td background=images/bottomcell_bg.gifnbsp;/td /tr - Original Message - From: Vlad Kulchitski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 1:11 PM Subject: [PHP] HTMLnetscape issue Hi, Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. Please help, Thanks, Vlad http://kulchitski.com -- 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] for loop problem
On Wed, 20 Mar 2002, Kris Vose wrote: I have a problem with a piece of code that uses the mail function in a for loop. It sends out mail to all the users in the database but it has a problem with attaching their specific name into the message. What happens is the first user in the database will get their name in the e-mail (Dear John,). Then the second user in the database will get the last users name and their name in the e-mail (Dear John, Dear Mike) ...and so on and so forth. If ($button != ) { $t = mysql_query(SELECT * from AddExisting); $number_of_customers = mysql_num_rows($t); for($i=0; $i$number_of_customers;$i++) { $r = mysql_fetch_array($t); $email = $r[EMAIL_ADDRESS]; $cusname = $r[Name]; $to = $email; $subject = hello; $message = Dear $cusname,.$message; $fromaddress = [EMAIL PROTECTED]; mail($to, $subject, $message, $fromaddress); }//end of for }//end of if You don't need a for loop here; you don't actually care specifically how many customers there are, just that you iterate once for each one. And you've put a raw email address in the extra headers argument to mail() rather than a properly-formed From: header. Here's the code you want: if (!empty(button)) { $t = mysql_query(SELECT * from AddExisting); while ($r = mysql_fetch_assoc($t)) { $message = Dear {$r[name]},\n{$message}; mail ($r[email_address], 'hello', $message, 'From: [EMAIL PROTECTED]'); } } miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql update help needed
On Wed, 20 Mar 2002, ROBERT MCPEAK wrote: $sql = UPDATE mytable SET img_url=$img_url,visitdate=$visitdate,img_group=$img_group,display=$display, caption=$caption where id = $id; You need to surround non-numeric values with 'single quotes'. $sql = update mytable set img_url='$img_url', etc. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] TIMESTAMP and COMPARISON
On Thursday 21 March 2002 03:53, chris allen wrote: Hello, I am looking for a standard way to compare to dates. I have a date/time stored in a field in a mysql table as date_added TIMESTAMP(14). (IE mmddhhmmss). I want to delete all records in this table if date_added is older than 2 hours. IE if current_date date_added +2 hours then delete record. How do I do this from within mysql? There are plenty of date/time functions in MySQL -- DATE_ADD(), DATE_SUB() etc. For example: DELETE FROM table WHERE current_date DATE_ADD(date_added, INTERVAL 2 HOUR); **Untested** use with caution. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* You cannot have a science without measurement. -- R. W. Hamming */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cvs data PHP
I was wondering if there is a way to access CVS from a PHP script. Obviously there's some way to do it, SourceForge does it. What I'm wondering is how -- Somebody commits an XML file to CVS. Later, somebody else accesses the PHP script. The PHP script queries CVS for the latest version of the file, and reads its contents. (This is because I actually want the PHP script to parse the XML and do later things with this info.) Does anyone know how this is done? Rather, can anyone point me to a tutorial or resource on this topic? Thank you, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cvs data PHP
Look for CHORA on the net. It is a PHP thing that somehow accesses a CVS respository. I discovered it as part of phpGroupWare. It works well and should serve as a decent guide. On Wed, 20 Mar 2002, Erik Price wrote: -I was wondering if there is a way to access CVS from a PHP script. -Obviously there's some way to do it, SourceForge does it. What I'm -wondering is how -- - -Somebody commits an XML file to CVS. Later, somebody else accesses the -PHP script. The PHP script queries CVS for the latest version of the -file, and reads its contents. (This is because I actually want the PHP -script to parse the XML and do later things with this info.) - -Does anyone know how this is done? Rather, can anyone point me to a -tutorial or resource on this topic? - -Thank you, -Erik - - - - - - - -Erik Price -Web Developer Temp -Media Lab, H.H. Brown [EMAIL PROTECTED] - - --- -PHP General Mailing List (http://www.php.net/) -To unsubscribe, visit: http://www.php.net/unsub.php - ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php code generator
We are trying to find a php code generator like Macromedia Ultradelv to develope a web base app. Can someone recommend a few. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: php code generator
you can find a fairly decent PHP extension for ultra dev at the below link. http://www.interakt.ro
Re: [PHP] HTML (to XML?) to PDF
I need to take what is presented to the user (ie, the data less the HTML tags but maintaining the formatting) and turn it into a PDF file. I found the solution with HTMLDoc (http://www.easysw.com/htmldoc/) It was very easy to set up and use. I heartily recommend it for anyone who has the same problem I had. Thanks for all the suggestions! Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Multipage form
Hello, David Johansen wrote: I was just wondering what was the best way to handle a multipage form. Would the best way be to keep passing the variables through the forms as hidden values or should I use sessions and store all the values as session variables? What's the best way to handle all of this? Also the different forms will all be in the same php file that loops to itself if that makes a difference. Thanks, This is exactly what you need: http://www.phpclasses.org/browse.html/package/108.html Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newman] updating a mysql record if IP # is the same.
What I'm trying to do: I have a log table called 'access'. When a user comes to my website there IP is logged, along with there DNS name. When they return with the same IP number the accessVIEW is updated +1 and the last number is assigned to them. Heres the Code: ?php requireconfig.php; $proxy_ip=getenv('REMOTE_ADDR'); $proxy_dns=gethostbyaddr($proxy_ip); $actual_ip=$HTTP_X_FORWARDED_FOR; $actual_dns = gethostbyaddr($HTTP_X_FORWARDED_FOR); $add_date=date (d/F/Y h:i:s A); $sql = SELECT accessIP FROM `access` ORDER BY `accessID` DESC; $sql_result = mysql_query($sql, $connection) or die (Could not get Query); $row = mysql_fetch_array($sql_result); $accessIP = $row[accessIP]; if (mysql_num_rows($sql_result) == $accessIP) { // Update view where ip = visitor_ip mysql_query(UPDATE access SET accessVIEW = accessVIEW+1 WHERE accessIP = $accessIP); } else { // Normal insert $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); $result = mysql_query($sql); } $sql = SELECT accessID FROM `access` ORDER BY `accessID` DESC LIMIT 1; $sql_result = mysql_query($sql, $connection) or die (Could not get Query); $row = mysql_fetch_array($sql_result); $accessNUMBER = $row[accessID]; mysql_free_result($sql_result); mysql_close($connection); ? Can anyone help me. This script is not working. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sessions
I am kind of confused by an error I am getting when trying to destroy a session. Here is the error that I am receiving along with the code that is causing the problem. Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/wildwebtech/cumc/default.php:9) in /home/www/wildwebtech/cumc/default.php on line 10 ? session_start(); $old_user = $cumc_user; // store to test if they *were* logged in $result = session_unregister(cumc_user); session_destroy(); ? This is the only code on that particular page, I just want to make sure that when they leave the site via my links that the session is destroyed. -- Joshua E Minnie CIO [EMAIL PROTECTED] Don't work for recognition, but always do work worthy of recognition. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Multipage form
I find sessions to be the best solution in these situations. I like to compile the problem into a single multi-dimensional array of pages and form inputs such as.. $forms = array ( 'contact' = array ($company, $name, $email, $addr, $phone), 'creditcard' = array ($full_name, $num, $type, $confirm) ); session_register(forms); Access.. $forms[contact][0]; // $company $forms[creditcard][3]; // $cc_confirm This way there is no chance I can loose data. And there isn't anything that my visitors can do to mess it up. Set the No-cache headers at the top of each script to prevent the page expired message from appearing when your users hit the back button. You should also use the session array to repopulate fields. Do not rely on browser cache. header(Pragma: no-cache); header(Cache-Control: no-cache); -Kevin -Original Message- From: David Johansen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 9:57 AM To: [EMAIL PROTECTED] Subject: [PHP] Multipage form I was just wondering what was the best way to handle a multipage form. Would the best way be to keep passing the variables through the forms as hidden values or should I use sessions and store all the values as session variables? What's the best way to handle all of this? Also the different forms will all be in the same php file that loops to itself if that makes a difference. Thanks, Dave -- 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] sessions
There must be some whitespace in the script before the opening ?php Lose that and the error should go with it. Alastair Battrick Senior Developer Lightwood Consultancy Ltd http://www.lightwood.net I am kind of confused by an error I am getting when trying to destroy a session. Here is the error that I am receiving along with the code that is causing the problem. Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/wildwebtech/cumc/default.php:9) in /home/www/wildwebtech/cumc/default.php on line 10 ? session_start(); $old_user = $cumc_user; // store to test if they *were* logged in $result = session_unregister(cumc_user); session_destroy(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] html form select list selected
I'd like to determine the selected option in a select list based on a passed variable. The code below won't work, but I can't figure out why. Any guesses? echo form; echo select name=\display\; echo option value=\true\; if ($display==false){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions
on line 10? Curious, you don't even have 10 lines there. Do you have lines above the PHP tag ?. The ? Must start the first character on the first line of the page otherwise the browser will interpret it as either Content-type: text/plain or Content-type: text/html and give you a headers already sent error. Hope that helps. -Kevin -Original Message- From: Joshua E Minnie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 12:53 PM To: [EMAIL PROTECTED] Subject: [PHP] Sessions I am kind of confused by this error that I am receiving when I try to logout of a session. If somebody could pleae help me out here. Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/wildwebtech/cumc/default.php:9) in /home/www/wildwebtech/cumc/default.php on line 10 Here is the code that is causing the problem. ? session_start(); $result = session_unregister(valid_user); session_destroy(); ? -- Joshua E Minnie CIO [EMAIL PROTECTED] Don't work for recognition, but always do work worthy of recognition. -- 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
[PHP] Fwd: html form select list selected
Whoops! Still won't work but that code should read: echo form; echo select name=\display\; echo option value=\true\; if ($display==true){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; ROBERT MCPEAK 03/20/02 04:20PM I'd like to determine the selected option in a select list based on a passed variable. The code below won't work, but I can't figure out why. Any guesses? echo form; echo select name=\display\; echo option value=\true\; if ($display==false){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Fwd: html form select list selected
The contents of $display are a string so you must have quotes aroud it in the comparison statement. if ($display == 'false') // should work. Alternatively you could do. select name=display option value=0True option value=1False /select Now the contents of $display is an integer which will can be interpreted as a boolean value (true or false). Then you can compare it like you had. if ($display == false) -Kevin -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 2:24 PM To: [EMAIL PROTECTED] Subject: [PHP] Fwd: html form select list selected Whoops! Still won't work but that code should read: echo form; echo select name=\display\; echo option value=\true\; if ($display==true){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; ROBERT MCPEAK 03/20/02 04:20PM I'd like to determine the selected option in a select list based on a passed variable. The code below won't work, but I can't figure out why. Any guesses? echo form; echo select name=\display\; echo option value=\true\; if ($display==false){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; Thanks! -- 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] why doesnt this work???
Hello, I read a ton of replies to this already, and there was a lot of good advice. However, it should be worth noting (and I don't think anyone did already) that you have a misspelling in this code: snip $password = ; // . . . $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; // . . . if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; /snip You initialize the variable as $password, but refer to it as $passord (no 'w'). Maybe that was just a typo in the email, but that will definitely be a problem in the code, too. Of course, all the other advice ('==' instead of '=', '' instead of 'and', etc...) should be heeded as well... -- [ joel boonstra | [EMAIL PROTECTED] ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Fwd: html form select list selected
Still doesn't work. What gives? Kevin Stone [EMAIL PROTECTED] 03/20/02 04:31PM The contents of $display are a string so you must have quotes aroud it in the comparison statement. if ($display == 'false') // should work. Alternatively you could do. select name=display option value=0True option value=1False /select Now the contents of $display is an integer which will can be interpreted as a boolean value (true or false). Then you can compare it like you had. if ($display == false) -Kevin -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 2:24 PM To: [EMAIL PROTECTED] Subject: [PHP] Fwd: html form select list selected Whoops! Still won't work but that code should read: echo form; echo select name=\display\; echo option value=\true\; if ($display==true){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; ROBERT MCPEAK 03/20/02 04:20PM I'd like to determine the selected option in a select list based on a passed variable. The code below won't work, but I can't figure out why. Any guesses? echo form; echo select name=\display\; echo option value=\true\; if ($display==false){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; Thanks! -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] broken select solution
got it: ?php echo $displayBr; echo form; echo select name=\display\; echo option value=\true\; if ($display == 'true'){echo selected;} echo Display; echo option value=\false\; if ($display == 'false'){echo selected;} echo Don't Display; echo /select; echo /form; ? ROBERT MCPEAK [EMAIL PROTECTED] 03/20/02 04:39PM Still doesn't work. What gives? Kevin Stone [EMAIL PROTECTED] 03/20/02 04:31PM The contents of $display are a string so you must have quotes aroud it in the comparison statement. if ($display == 'false') // should work. Alternatively you could do. select name=display option value=0True option value=1False /select Now the contents of $display is an integer which will can be interpreted as a boolean value (true or false). Then you can compare it like you had. if ($display == false) -Kevin -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 2:24 PM To: [EMAIL PROTECTED] Subject: [PHP] Fwd: html form select list selected Whoops! Still won't work but that code should read: echo form; echo select name=\display\; echo option value=\true\; if ($display==true){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; ROBERT MCPEAK 03/20/02 04:20PM I'd like to determine the selected option in a select list based on a passed variable. The code below won't work, but I can't figure out why. Any guesses? echo form; echo select name=\display\; echo option value=\true\; if ($display==false){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; Thanks! -- 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 -- 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
[PHP] Check Version - License verification
Hi All, In appreciation of the fine contributions found on this list I thought I'd post remarks about a new system I'm trying that shows some promise. The system purpose is to enable a third party [an administrator] to check the software version for a php driven software application [which you write]. This is the process: a) CONSTANTS define the PRODUCTNAME and the INSTALLVERSION for your software, as well as other admin data you might find useful. Note: the ADMINUSERNAME and ADMINPASSWORD are saved in php4 session. b) each page load for the administration page [except php_self] has the visitor [presumably admin] ip, port and datetime inserted into the administrator's application database table c) a threshold is set which when it is reached triggers a check version call d) the checkversion calls a script on your own site e) the script fetches version information from your own [remote] database f) the upgrade information is presented to the administrator, or if the version is ok then the administration page is loaded [which was the original file request] and in so doing the entire process can be relatively transparent to the admin user, g) [optional] deny the file request for the application administration page if the product registration does not match your [single domain license] license database. In this manner a third party administrator is enabled to check the version of their php driven software application - with easy to use upgrade links - and you the software developer have more control over the use of your own software. For obvious reasons these are not all the details, but this software is currently in place and preliminary tests are looking good. It's a good feature for the administrator to be able to check the version of their software and be able to upgrade in a timely manner. There are simpler ways to effect the algorithm above, of course, but this particular method shows some promise because of the license verification side effect. I thought someone on this list might be able to benefit from this algorithm. I don't have time to read this list everyday, but when I make time I always learn something - and appreciate your posts. Kind Regards, Richard Creech [EMAIL PROTECTED] Phone 250.744.3350 Pacific Time, Canada DreamRiver Software Powers the Net http://www.dreamriver.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] something weird is going on...
Could be a browser cache issue. Open just the image in the browser (http://kulchitski.com/problem/images/bottomcell_bg.gif) and hit Ctrl+Refresh. Go back to the page and see if it doesn't show up. Attractive looking page by the way. :) -Kevin -Original Message- From: Vlad Kulchitski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 2:28 PM To: [EMAIL PROTECTED] Subject: [PHP] something weird is going on... Sorry bringing Netscape issue up again but I seem to have found something... Here's the issue, I am talking about image-background in table cell td/td... the problem is that one of the cells shows background, one of them does... the index.html file attached... This cells shows background: TD width=100% background=images/topcell_bg.gifnbsp;/TD This doesn't: TD width=100% background=images/bottomcell_bg.gifnbsp;/TD NOTE: the weird thing is that when I change the image name the the one on the first cell where it works, it shows the image, but when I change it back to bottomcell_bg.gif it doesn't... I went to change GIF files and they have the same property, both GIF(indexed colour)... And to illustrate the problem, here's the file: http://kulchitski.com/problem/ Vlad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail()
Jennifer, The SMTP option in php.ini is for Windows only. On other platforms you should specify a delivery program (sendmail). If you still want to use an external server, there are classes available that send mail through an SMTP server without using mail(). bvr. Jennifer wrote: sorry...i should have mentioned also that I am not using the internal mail server but i am using an external mail server -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fwd: html form select list selected
On Wednesday, March 20, 2002, at 04:23 PM, ROBERT MCPEAK wrote: Whoops! Still won't work but that code should read: echo form; echo select name=\display\; echo option value=\true\; if ($display==true){echo selected;} echo Display; echo option value=\false\; if ($display==false){echo selected;} echo selectedDon't Display; echo /select; echo /form; First of all, this form doesn't have a method or action attribute -- so I'm not sure which script you intend to call with it, or what HTTP protocol you intend to pass the data with. But assuming it's the POST method and the action is PHP_SELF, and that you are using PHP 4.1.x or greater: // perform a test to see which should be selected if ($_POST['display'] == 'true') { $select_if_true = selected=\yes\; $select_if_false = selected=\no\; } elseif ($_POST['display'] == 'false') { $select_if_true = selected=\no\; $select_if_false = selected=\yes\; } // create the form, including the above-defined variables $form_html = form method=\post\ action=\ . $_SERVER['PHP_SELF'] . \ select name=\display\ option $select_if_true value=\true\Display/option option $select_if_false value=\false\Don't Display/option /select /form; // print the form print $form_html; HTH Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [Newman] updating a mysql record if IP # is the same.
A number of problems. First and foremost you're extracting multiple rows from the database table are you not? Therefore you must increment through them in some way. I like to embed my mysql_fetch_xxx() functions in a while() loop. --- while ($row = mysql_fetch_array($sql_result)) { // Check to see if this IP Address was previously recorded. $exists = 0; if ($proxy_ip == $row[accessIP]) { $exists = 1; break; } } // IF the IP exists do this thing ELSE do that other thing. if ($exists) { // Update view where ip = visitor_ip mysql_query(UPDATE access SET accessVIEW = accessVIEW+1 WHERE accessIP = $proxy_ip); } else { // do this other stuff... } --- Remember the WHILE() loops. By the way there's a fantastic book that talks all about this stuff called, PHP and MySQL Web Development by Luke Welling Laura Thomson. It is an invaluable source of real-world examples. Hope this helps. -Kevin -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 1:58 PM To: [EMAIL PROTECTED] Subject: [PHP] [Newman] updating a mysql record if IP # is the same. What I'm trying to do: I have a log table called 'access'. When a user comes to my website there IP is logged, along with there DNS name. When they return with the same IP number the accessVIEW is updated +1 and the last number is assigned to them. Heres the Code: ?php requireconfig.php; $proxy_ip=getenv('REMOTE_ADDR'); $proxy_dns=gethostbyaddr($proxy_ip); $actual_ip=$HTTP_X_FORWARDED_FOR; $actual_dns = gethostbyaddr($HTTP_X_FORWARDED_FOR); $add_date=date (d/F/Y @ h:i:s A); $sql = SELECT accessIP FROM `access` ORDER BY `accessID` DESC; $sql_result = mysql_query($sql, $connection) or die (Could not get Query); $row = mysql_fetch_array($sql_result); $accessIP = $row[accessIP]; if (mysql_num_rows($sql_result) == $accessIP) { // Update view where ip = visitor_ip mysql_query(UPDATE access SET accessVIEW = accessVIEW+1 WHERE accessIP = $accessIP); } else { // Normal insert $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); $result = mysql_query($sql); } $sql = SELECT accessID FROM `access` ORDER BY `accessID` DESC LIMIT 1; $sql_result = mysql_query($sql, $connection) or die (Could not get Query); $row = mysql_fetch_array($sql_result); $accessNUMBER = $row[accessID]; mysql_free_result($sql_result); mysql_close($connection); ? Can anyone help me. This script is not working. -- 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] HTMLnetscape issue
At 20.03.2002 13:38, you wrote: STILL DOESN'T WORK :( -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 20 ÂÅÒÅÚÎÑ 2002 Ò. 13:29 To: [EMAIL PROTECTED] Subject: Re: [PHP] HTMLnetscape issue At 20.03.2002 13:11, you wrote: Hi, Sorry for repeating myself, but am lost and still can't find a solution to the following problem, I need to specify a background image for td like the code below: tr td background=images/bottomcell_bg.gif/td /tr This code works EVERYWHERE (in all browsers) but Netscape Navigator 4.xx versions. UNTESTED Try an $nbsp; insidetd/td as: trtd background=images/bottomcell_bg.gifnbsp;/td/tr Look at the code at: http://www.rudis-motorcycle-store.de/m5.html there I did what you want to do, I just tested it with NS451 and it works! Also in NS405. I think you have to have to set height width and the put an transparent gif over it, have a look at the code. James is wrong with his mail, sorry HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4.2.0 Release Candidate 1
Hello, A release candidate for PHP 4.2.0 has just been packed. This build is used for testing the readiness of the release branch. By providing feedback to this build, we can make sure the actual release (planned for April, 22nd) has as few bugs as possible. This release candidate is NOT meant for production servers, only for helping out the PHP-QA Team finding week spots. You can help use by completing one of the following tasks: Simple build tests 1. Download the RC from: http://www.php.net/~derick/ - php-4.2.0RC1.tar.gz (Source) - php-4.2.0RC1-win32.zip (windows binaries: CLI, CGI, ISAP module and extensions: cpdf, ctype, cybercash, db, dbx, domxml, fdsql, fdf, filepro, gd, gettext, java, mhash, oci8, openssl, pdf, pgsql, shmop, sockets, tokeniser, w32api, xslt and zlib (all without libraries!!!) - php4apache.dll (apache 1.3.23 module for windows) 2. Build and test the RC 3. Provide feedback through: http://qa.php.net/buildtest-submit.php If you are really serious, you can also help us run testcases in the following ways: 1. Run 'make test' after you build from source (non-windows only) and provide feedback to [EMAIL PROTECTED] 2. Run testcases, which you can find on: http://qa.php.net/testcases-4.2.0.php These testcases address areas of PHP, which need some special attention during the Release Process. It's very important that you run these cases very thouroughly. You can provide feedback with http://qa.php.net/buildtest-submit.php (specify your testcase there). If you have any questions, please mail to the [EMAIL PROTECTED] mailinglist. regards, Derick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] safemode access to /usr/local/lib/php ?
If I enable safemode I get an error each time a function in the PHP repository is used, something like: access for the file with UID xxx is not allowed to /usr/local/lib/php/PEAR.php with UID 0 It's clear why this happens but it doesn't make any sense to shut off access to this directory. Obviously, the same would happen, if I provide a global PHPLIB via include_path. Also, making all php files UID 0 isn't acceptable. So, what's the best cure for this? Is there an UID which *all* PHP scripts would be allowed to access? Thanks, Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com IE-Center: http://ie5.de http://msie.winware.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP 4.2.0 Release Candidate 1
Where can we read a description of what is in this release? TIA Kirk A release candidate for PHP 4.2.0 has just been packed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Assignment operator proposal
Hi all! I'd like to hear from a single one of you who isn't tired of code similar to ? if (!$whatever) { $whatever=something; } ? or else ? if ($whatever) { $somethingelse=$whatever; } ? How about a new asignment operator which would shut up all those Python enthusiasts - let's say the new operator would be caret - and we could replace the first example with ? $whatever^=something; ? and the second example with ? $somethingelse=^$whatever; ? What's more, we could also have ? $yetanother^=^$anything; ? which would assign $anything to $yetanother if and only if both are note null. What do you think? Bogdan Stancescu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Assignment operator proposal
On Thu, Mar 21, 2002 at 12:36:26AM +0200, Bogdan Stancescu wrote: Hi all! I'd like to hear from a single one of you who isn't tired of code similar to i'm solving this with some little knowledge of shortcuts evaluation ... ? if (!$whatever) { $whatever=something; } ? (($whatever) || ($whatever = something)); or else ? if ($whatever) { $somethingelse=$whatever; } ? (($whatever) ($somethingelse=$whatever)); How about a new asignment operator which would shut up all those Python enthusiasts - let's say the new operator would be caret - and we could replace the first example with sounds interesting. IMHO you have to rewrite some stuff in the php language parser so it detects these expressions and generates an if-else-tree ... ~-n -- Enrico Weigelt== meTUX IT services software development, IT service, internet security solutions www: http://www.metux.de/phone: +49 36207 519931 email: [EMAIL PROTECTED]cellphone: +49 174 7066481 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forcing little endian with pack(d);
http://www.php.net/manual/en/function.pack.php The manual page describes format string d as: d double (machine dependent size and representation). Is there an easy way of forcing the binary to be representated little endian even with hosts which are big endian (undocumented format string for example?). -- Mika Tuupola http://www.appelsiini.net/~tuupola/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP_Upload with PHP
Hello, I also have been seeing file upload problems with version 4.1.2. It seems that the (phpinfo()) default settings of: upload_tmp_dir = no value no value ... are not in agreement with [online documentation] the anticipated temporary upload folder named /tmp. $upload_tmp_dir = /tmp as the default included in the distribution file may improve harmony. Richard. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Assignment operator proposal
There seems to be a parse error in your code. The words Python and enthusiast can not exist together in the same substr. This will result in the LMAO error you've been receiving. :) -Kevin -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 3:36 PM To: [EMAIL PROTECTED] Subject: [PHP] Assignment operator proposal Hi all! I'd like to hear from a single one of you who isn't tired of code similar to ? if (!$whatever) { $whatever=something; } ? or else ? if ($whatever) { $somethingelse=$whatever; } ? How about a new asignment operator which would shut up all those Python enthusiasts - let's say the new operator would be caret - and we could replace the first example with ? $whatever^=something; ? and the second example with ? $somethingelse=^$whatever; ? What's more, we could also have ? $yetanother^=^$anything; ? which would assign $anything to $yetanother if and only if both are note null. What do you think? Bogdan Stancescu -- 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] Assignment operator proposal
At 21.03.2002 00:36, you wrote: Hi all! I'd like to hear from a single one of you who isn't tired of code similar to ? if (!$whatever) { $whatever=something; } ? or else ? if ($whatever) { $somethingelse=$whatever; } ? How about a new asignment operator which would shut up all those Python enthusiasts - let's say the new operator would be caret - and we could replace the first example with ? $whatever^=something; ? snip I think this is a nice idea for php8 (or some release, I´ll never have to use) The main thing in using php is that it is close to c. As there are so many new functions, some of them are not really necessary, I would not prefer shortcuts like these. Who should help these guys, which use these kind of abbrevations. We will get code like these real C-freaks make when they get mad in optimizing. Its always a walk on a sharp edge, optimizimg and readability. For compatibility reasons, I would not like this kind of stuff. and also, where can you write your comments old style if($whatever) // this option must be true { do something; // this operation does something } // end of whatever new style $whatever^=something // this option must be true an then it does something (guaranteed to be more then 80 chars, have fun when reading this command under production pressure at 0:30 at the box using ed) oops I just wanted to add a comment, I find myself writing a book ;-) Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Again, and Again, and AGAIN!
That's fine. I already got it going (somebody helped me). Thanks for that tip anyhow. Mike Gohlke [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Are you hitting enter while in one of the fields or clicking the submit button. I've seen versions of IE that would not set the submit button if enter was used. Personally, I would check for isset($username) isset($password). Mike... (Sorry for the very late reply, etc. I've been dealing with a screwy server for the past few days:( Jason Wong wrote: On Sunday 17 March 2002 13:14, Jason Wong wrote: You're using 4.1.1, $HTTP_POST_VARS{} has been replaced by $_POST[] (see changelog/history/php.ini for details). Sorry a typo: $HTTP_POST_VARS[] has been replaced by $_POST[] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] something weird is going on...
At 20.03.2002 16:28, you wrote: Sorry bringing Netscape issue up again but I seem to have found something... snip And to illustrate the problem, here's the file: http://kulchitski.com/problem/ Hi Val, for me it looks OK, no fault to see. (NS405,451,475) I´d suggest, that you enclose your width and height values in parentesis , so that they look height=100 width=200 also all other values. I had problems with the NS46 family on this. Also the vals topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 added to the body tag, make your left side notes look more real, as ther´s a cutted left side. HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Assignment operator proposal
From: Enrico Weigelt [EMAIL PROTECTED] On Thu, Mar 21, 2002 at 12:36:26AM +0200, Bogdan Stancescu wrote: Hi all! I'd like to hear from a single one of you who isn't tired of code similar to i'm solving this with some little knowledge of shortcuts evaluation ... ? if (!$whatever) { $whatever=something; } ? (($whatever) || ($whatever = something)); or else ? if ($whatever) { $somethingelse=$whatever; } ? (($whatever) ($somethingelse=$whatever)); How about a new asignment operator which would shut up all those Python enthusiasts - let's say the new operator would be caret - and we could replace the first example with sounds interesting. IMHO you have to rewrite some stuff in the php language parser so it detects these expressions and generates an if-else-tree ... Please note, there are many German PHP developers. Most of them are not so stupid ... -Egon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] refreshing form
Hey [EMAIL PROTECTED], I am doing small simple voting script for my site..and i don't want to refresh whole site how should i refresh only the form? i can't find info anywhere... so i am trying over hare..i am new so i dunno what is this cong about. and i am using DB for my voting poll thanks for help if there will be any ;) :--: Have A Nice Day! Mantas Kriauciunas A.k.A mNTKz Contacts: [EMAIL PROTECTED] Http://mntkz-hata.visiems.lt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Phpfx, what is it?
Hi, I was sourgeforge.net looking at the PHP stuff, I saw something call phpfx, but it not clear what it is or what it does. Has anyone mess with it? Also I am looking for a php program that was written so that you can do a BBS, I wanted to use Ultimate Bulletin Board, but they no longer support the freeware verision, you have to pay almost $500 for it. The verision I have the date is not Y2K, so the dates come out 19100. So I need to replace the BBS, it was written with perl and I like to have something well you guys know. One last question for now. Is there a site that explain how to do list in php with colors, I want to add color to my lists, when I do thinks now there are so boring, with just white. Thanks a head of time...By the way | Chuck Payne | | Magi Design and Support | | www.magidesign.com | | [EMAIL PROTECTED] | BeOS, Macintosh 68K, Classic, and OS X, Linux Support. Web Design you can afford. Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself.- Harvey Fierstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpfx, what is it?
Chuck \PUP\ Payne wrote: Also I am looking for a php program that was written so that you can do a BBS, I wanted to use Ultimate Bulletin Board, but they no longer support the freeware verision, you have to pay almost $500 for it. The verision I have the date is not Y2K, so the dates come out 19100. So I need to replace the BBS, it was written with perl and I like to have something well you guys know. Try www.phpbb.com -- W | I haven't lost my mind; it's backed up on tape somewhere. + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpfx, what is it?
On Wed, 20 Mar 2002, Ashley M. Kirchner wrote: Chuck \PUP\ Payne wrote: Also I am looking for a php program that was written so that you can do a BBS, I wanted to use Ultimate Bulletin Board, but they no longer support the freeware verision, you have to pay almost $500 for it. The verision I have the date is not Y2K, so the dates come out 19100. So I need to replace the BBS, it was written with perl and I like to have something well you guys know. Try www.phpbb.com Maybe www.phpnuke.org too? It depends by how you define BBS. It's what ppl call WebPortals nowadays. --thalis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [newman] This don't work, if else if
Can anyone tell me why this isn't working? What its ment to do is add an IP number to the database. if the IP is all ready in the database then it would update a counter. ?php $proxy_ip=getenv('REMOTE_ADDR'); $proxy_dns=gethostbyaddr($proxy_ip); $add_date=date (d/F/Y @ h:i:s A); $sql = SELECT accessIP FROM `access` ORDER BY `accessID` DESC; $sql_result = mysql_query($sql, $connection) or die (Could not get Query); $row = mysql_fetch_array($sql_result); $accessIP = $row[accessIP]; if (mysql_num_rows($sql_result) 0) { // Update view where ip = visitor_ip mysql_query(UPDATE access SET accessVIEW = accessVIEW+1 WHERE accessIP = $accessIP); } else { // Normal insert $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); $result = mysql_query($sql); } ? Philip J. Newman PhilipNZ :: Design Solutions http://www.philipnz.com/ [EMAIL PROTECTED] ICQ# 20482482 +64 25 6144012
[PHP] I won NETSCAPE BATTLE!!!
Hi everyone! I am so happy tonight because it worked! All I had to do is to convert the image to JPEG and it worked! I think it would be useful to know it in the future. Have a good one, Vlad Kulchitski.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Saving files back to server
Hi All I have a rather interesting thought for a website I'm currently working on. I imagine this is not going to be possible, but here goes: - Visitors can go to a page http://www.whatever.com, log in, and get a list of files in their home directory. - They click a link for a document (for example) they want to download, and it is pushed through to them (as it is outside the webroot). No problem so far. Excellent functionality to have would be for the user to make changes to the document, click Save in Microsoft Word and the file is saved back to the server overwriting the old one. It can be accomplished using HTTP PUT to a script which receives it and then copies it back to its relevant location (in the users home directory). However, the difficult part would be to cause Microsoft Word to trigger the upload whenever a user saves their file. I've seen this done in Lotus Notes, but I imagine it will be near impossible using the web. Any thoughts on the matter would be greatly appreciated. --- Adam Whitehead Systems Developer - CSM Limited Ph. (08) 8936 3165 ** Mobile (0411) 241 120 E-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Saving files back to server
On Thu, 21 Mar 2002 [EMAIL PROTECTED] wrote: It can be accomplished using HTTP PUT to a script which receives it and then copies it back to its relevant location (in the users home directory). However, the difficult part would be to cause Microsoft Word to trigger the upload whenever a user saves their file. http://www.webdav.org/ miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpfx, what is it?
You can also give YaBB SE a shot http://www.yabb.info - Original Message - From: Chuck PUP Payne [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 7:11 PM Subject: [PHP] Phpfx, what is it? Hi, I was sourgeforge.net looking at the PHP stuff, I saw something call phpfx, but it not clear what it is or what it does. Has anyone mess with it? Also I am looking for a php program that was written so that you can do a BBS, I wanted to use Ultimate Bulletin Board, but they no longer support the freeware verision, you have to pay almost $500 for it. The verision I have the date is not Y2K, so the dates come out 19100. So I need to replace the BBS, it was written with perl and I like to have something well you guys know. One last question for now. Is there a site that explain how to do list in php with colors, I want to add color to my lists, when I do thinks now there are so boring, with just white. Thanks a head of time...By the way | Chuck Payne | | Magi Design and Support | | www.magidesign.com | | [EMAIL PROTECTED] | BeOS, Macintosh 68K, Classic, and OS X, Linux Support. Web Design you can afford. Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself.- Harvey Fierstein -- 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] Phpfx, what is it?
You can also try FUDforum (http://fud.prohost.org/forum/) Ilia On March 20, 2002 07:11 pm, Chuck \PUP\ Payne wrote: Hi, I was sourgeforge.net looking at the PHP stuff, I saw something call phpfx, but it not clear what it is or what it does. Has anyone mess with it? Also I am looking for a php program that was written so that you can do a BBS, I wanted to use Ultimate Bulletin Board, but they no longer support the freeware verision, you have to pay almost $500 for it. The verision I have the date is not Y2K, so the dates come out 19100. So I need to replace the BBS, it was written with perl and I like to have something well you guys know. One last question for now. Is there a site that explain how to do list in php with colors, I want to add color to my lists, when I do thinks now there are so boring, with just white. Thanks a head of time...By the way | Chuck Payne | | Magi Design and Support | | www.magidesign.com | | [EMAIL PROTECTED] | BeOS, Macintosh 68K, Classic, and OS X, Linux Support. Web Design you can afford. Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself.- Harvey Fierstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Oracle ORA_ functions and blobs / clobs
Hi All, Is it possible to store/fetch blobs/clobs with the oracle (ORA not OCI8) functions? Cheers, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Phpfx, what is it?
Thanks I have four PHP WebPortals or what I use to calling BBS, but I still don't have a clue about phpfx. Oh, well. Nor on a good site that shows how to add color to my php code. I am sorry that I am still usig I grew in the dark ages of 8-bit computers when Atari 800 and Apple IIE where king. Thanks guys for the help, now I have to choose which program is best. on 3/20/02 8:26 PM, Ilia A. at [EMAIL PROTECTED] wrote: You can also try FUDforum (http://fud.prohost.org/forum/) Ilia On March 20, 2002 07:11 pm, Chuck \PUP\ Payne wrote: Hi, I was sourgeforge.net looking at the PHP stuff, I saw something call phpfx, but it not clear what it is or what it does. Has anyone mess with it? Also I am looking for a php program that was written so that you can do a BBS, I wanted to use Ultimate Bulletin Board, but they no longer support the freeware verision, you have to pay almost $500 for it. The verision I have the date is not Y2K, so the dates come out 19100. So I need to replace the BBS, it was written with perl and I like to have something well you guys know. One last question for now. Is there a site that explain how to do list in php with colors, I want to add color to my lists, when I do thinks now there are so boring, with just white. Thanks a head of time...By the way | Chuck Payne | | Magi Design and Support | | www.magidesign.com | | [EMAIL PROTECTED] | BeOS, Macintosh 68K, Classic, and OS X, Linux Support. Web Design you can afford. Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself.- Harvey Fierstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Perl NewsGroup?
This may be the worst place to put this but here goes: Does anyone know of a Perl NewsGroup? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: I need help building The CGI Open Source Foundry (COSF)
Does anyone have a PHP project that you need more help on? David Duong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The objective of this foundry is to develop scripts that will be usefull to anyone. We will be producing scripts from scratch when we have a good script in mind, but most of the time we will be working on scripts with high potential that a member has created.. What I mean by marketers is people who are incharge of distributing the script. Thus most of their time will be spent marketing. David Duong [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I need some experienced people to become managers of the CGI Open Source Foundry (COSF)? I am planning to make a CGI Open Source Foundry We will start in stages. Stage 1 getting initial members (Hard Part) - Once we gain 10-20 members we will start stage 2. Stage 2 Dividing them into groups (members can be in multiple groups) - Managers - Head(s) of the specific groups. - GUI - Members with strong webdesigner skills - Database - File Wizards - Good with file manipulation - Clean-up - Clean up the source - General Developers - Resource - Find servers to host this - Marketers - Those who will distribute the scripts. - Newbies/Learners - Webmasters - See Stage 5 Stage 3 Finding/Creating a Groupware script that will allow us to all to work on single or multiple scripts. Stage 4 Decide what would be the perfect first project. This project may be an existing one in the makes with high potential, or something from scratch. (Ten people on one script may sound crazy but I think it will work if we planned it out.) Stage 5 Making the main site. The site will include a place to Release and Plan all our scripts. I have my eye on SourceForge.net as host. After the first stages well start making other scripts that will be of use. If your interested or have comments than your input would be appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Phpfx, what is it?
Dont' know about phpfx, but there's www.phorum.org for a bulletin board system... On Wed, 20 Mar 2002, Chuck PUP Payne wrote: Hi, I was sourgeforge.net looking at the PHP stuff, I saw something call phpfx, but it not clear what it is or what it does. Has anyone mess with it? Also I am looking for a php program that was written so that you can do a BBS, I wanted to use Ultimate Bulletin Board, but they no longer support the freeware verision, you have to pay almost $500 for it. The verision I have the date is not Y2K, so the dates come out 19100. So I need to replace the BBS, it was written with perl and I like to have something well you guys know. One last question for now. Is there a site that explain how to do list in php with colors, I want to add color to my lists, when I do thinks now there are so boring, with just white. Thanks a head of time...By the way | Chuck Payne | | Magi Design and Support | | www.magidesign.com | | [EMAIL PROTECTED] | BeOS, Macintosh 68K, Classic, and OS X, Linux Support. Web Design you can afford. Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself.- Harvey Fierstein -- 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
[PHP] Re: Hi can we write a form inside td element of a table?
This is an HTML question and not a php question. The answer is yes. TDinput type=text/td -- Gaylen PHP KISGB v4.0.2 Guest Book http://www.gaylenandmargie.com/phpwebsite/ Balaji Ankem [EMAIL PROTECTED] wrote in message 000201c1c98c$dd246980$[EMAIL PROTECTED]">news:000201c1c98c$dd246980$[EMAIL PROTECTED]... Hi, can we give a form element as td inside table element? Thanks in advance Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Making a simple borderless pop up window with a Close button
As noted before and on their website, it only works in IE. -- Gaylen PHP KISGB v4.0.2 Guest Book http://www.gaylenandmargie.com/phpwebsite/ Qartis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If you want a popup window that lacks a border entirely, check out chromeless windows at www.microbians.com Denis L. Menezes [EMAIL PROTECTED] wrote in message 000f01c1cf3f$5321d520$c900a8c0@d8d0l7">news:000f01c1cf3f$5321d520$c900a8c0@d8d0l7... Hello friends. I am making a database website where I need to add a small help button for every field on the form. Whenever the user clicks the small help button, I wish to show a titleless popup window containing the help text and a close button. Can someone help me with the php script for this. Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Making a simple borderless pop up window with a Close button
Actually, it sort of works for other browsers. It just isn't as cool the window that is opened on netscape is just a normal bordered popup window, with no toolbars. - Original Message - From: Gaylen Fraley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 6:32 PM Subject: [PHP] Re: Making a simple borderless pop up window with a Close button As noted before and on their website, it only works in IE. -- Gaylen PHP KISGB v4.0.2 Guest Book http://www.gaylenandmargie.com/phpwebsite/ Qartis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If you want a popup window that lacks a border entirely, check out chromeless windows at www.microbians.com Denis L. Menezes [EMAIL PROTECTED] wrote in message 000f01c1cf3f$5321d520$c900a8c0@d8d0l7">news:000f01c1cf3f$5321d520$c900a8c0@d8d0l7... Hello friends. I am making a database website where I need to add a small help button for every field on the form. Whenever the user clicks the small help button, I wish to show a titleless popup window containing the help text and a close button. Can someone help me with the php script for this. Thanks Denis -- 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] page expired message
try using GET Method instead of POST. It solves the problem, however, the parameters that you pass through will be shown in the address bar. If someone know a way to avoid that page with POST, please let me know too! - Original Message - From: Gonzalez, Zara E [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 20, 2002 9:56 AM Subject: [PHP] page expired message Is there any way to avoid getting this message when I hit back on my browser Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button. I get it when I am using a form with session variables... Zara -- 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] Re: Phpfx, what is it?
A quick search on google told me this: phpfx is a website with the goal of providing free and quality open source php scripts Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 7:05 PM To: Chuck PUP Payne Cc: PHP General Subject: [PHP] Re: Phpfx, what is it? Dont' know about phpfx, but there's www.phorum.org for a bulletin board system... On Wed, 20 Mar 2002, Chuck PUP Payne wrote: Hi, I was sourgeforge.net looking at the PHP stuff, I saw something call phpfx, but it not clear what it is or what it does. Has anyone mess with it? Also I am looking for a php program that was written so that you can do a BBS, I wanted to use Ultimate Bulletin Board, but they no longer support the freeware verision, you have to pay almost $500 for it. The verision I have the date is not Y2K, so the dates come out 19100. So I need to replace the BBS, it was written with perl and I like to have something well you guys know. One last question for now. Is there a site that explain how to do list in php with colors, I want to add color to my lists, when I do thinks now there are so boring, with just white. Thanks a head of time...By the way | Chuck Payne | | Magi Design and Support | | www.magidesign.com | | [EMAIL PROTECTED] | BeOS, Macintosh 68K, Classic, and OS X, Linux Support. Web Design you can afford. Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself.- Harvey Fierstein -- 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 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Delete Confirmation
Actually I have that working fine. I was just looking to add to the code a confirmation box of some sort. either typing in YES or clicking a YES NO BOX. Thanks for your post. **DAN** Matt Wallace phpnews@ender To: [EMAIL PROTECTED] .comcc: Subject: [PHP] Re: Delete Confirmation 03/20/2002 11:03 AM Daniel Negron/Kbe wrote: Does anyone have examples of record deletions from php to mysql Could you be more specific? $sql = DELETE from tablename where tablename_idx = $index; $result = mysql_query($sql); would be a very simple example of deleting a record from a hypothetical database with php, but I'm not sure if that's what you were really asking. -- 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
[PHP] table not refreshing after update.
Hi All, I am having an issue where I can update an entry, then when I go back to view the updates they do not show up. But if I go and look at the actual database the update has been made. Even after refreshing and clearing the cache, the entry still shows no change. Now he is something also really weird. My girlfriend has exactly the same problem, only she is using ASP and an Access Database. So is there something I (we) are missing ? Anything pointing me in the right direction would be helpful. TIA. ***DAN*** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [newman] This don't work, if else if
In article 001001c1d070$76ef8dd0$0401a8c0@philip, [EMAIL PROTECTED] says... Can anyone tell me why this isn't working? What its ment to do is add an IP number to the database. if the IP is all ready in the database then it would update a counter. ?php $proxy_ip=getenv('REMOTE_ADDR'); $proxy_dns=gethostbyaddr($proxy_ip); $add_date=date (d/F/Y @ h:i:s A); $sql = SELECT accessIP FROM `access` ORDER BY `accessID` DESC; $sql_result = mysql_query($sql, $connection) or die (Could not get Query); $row = mysql_fetch_array($sql_result); $accessIP = $row[accessIP]; if (mysql_num_rows($sql_result) 0) { // Update view where ip = visitor_ip mysql_query(UPDATE access SET accessVIEW = accessVIEW+1 WHERE accessIP = $accessIP); } else { // Normal insert $sql = INSERT INTO `access` (`accessID`, `accessIP`, `accessDNS`, `accessTIME`, `accessUPDATE`, `accessVIEW`) VALUES ('', '$proxy_ip', '$proxy_dns', '$add_date', NOW(NULL), '0'); $result = mysql_query($sql); } ? Seems to me that you are treating accessIP as a string in one and an integer in the other query. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Creating a global variable for all PHP pages?
Take a look at this PHP extension and see if it will help solve your problem. It doesn't work on Windows yet though... http://pwee.sourceforge.net Lance -Original Message- From: Warrick Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 2:49 PM To: [EMAIL PROTECTED] Subject: [PHP] Creating a global variable for all PHP pages? I want to define a variable that I can reference on ALL of my PHP pages. Ideally, I'd like to do it in php.ini or some similar place so that I can modify it as I place code on different systems, but not need to make changes in lots of different places. I looked at the Configuration section of the manual, did web searches, tried getenv() and using the OS environment (we're mixed Windows and UNIX boxes, using Apache and mysql and PHP 4.1.1), and had zero luck. I was hoping that getenv() or _ENV[] would have worked. I tried creating something in php.ini by simply adding a line, with no luck. Is there some way of doing this? Warrick -- 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] Creating a global variable for all PHP pages?
what about a common include file? -Original Message- From: Lance Lovette [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 4:00 PM To: Warrick Wilson; [EMAIL PROTECTED] Subject: RE: [PHP] Creating a global variable for all PHP pages? Take a look at this PHP extension and see if it will help solve your problem. It doesn't work on Windows yet though... http://pwee.sourceforge.net Lance -Original Message- From: Warrick Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 2:49 PM To: [EMAIL PROTECTED] Subject: [PHP] Creating a global variable for all PHP pages? I want to define a variable that I can reference on ALL of my PHP pages. Ideally, I'd like to do it in php.ini or some similar place so that I can modify it as I place code on different systems, but not need to make changes in lots of different places. I looked at the Configuration section of the manual, did web searches, tried getenv() and using the OS environment (we're mixed Windows and UNIX boxes, using Apache and mysql and PHP 4.1.1), and had zero luck. I was hoping that getenv() or _ENV[] would have worked. I tried creating something in php.ini by simply adding a line, with no luck. Is there some way of doing this? Warrick -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why doesnt this work???
Hi Try this: $query = select * from medlemmer where bruker = '$bruker' and passord ='$passord'; $result = mssql_query( $query ); while($line = mssql_fetch_row($result)): if( $line[bruker] == $bruker $line[password] == $passord) echo hei $bruker.; else echo FEIL; endwhile; Tom At 12:14 AM 21/03/2002, chris wrote: this script receives vars b and p from a form. If b and p matches the echo on IF, then it works just fine. The problem is that if the vars dont match the ELSE ECHO does not apear... why not? ? $bruker = $HTTP_POST_VARS[b]; $passord = $HTTP_POST_VARS[p]; $hostname = ; $username = ; $password = ; $dbname = ; MSSQL_CONNECT($hostname,$username,$password); mssql_select_db($dbname); $query = select * from medlemmer where bruker = '$bruker' and passord = '$passord'; $result = mssql_query( $query ); for ($i = 0; $i mssql_num_rows( $result ); ++$i) { $line = mssql_fetch_row($result); if( $line[1]='$bruker' and $line[2]='$passord') echo hei $bruker.; else echo FEIL; } ? -Chris -- 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
[PHP] Newbie needs help
Hi everybody, I am having a problem with GET variables. Basically I have not found a way to clear them so they are reset to if the user reload the page. Here is the speudo code: ?php session_start(); If ($Faction==Add to Data) { Add_to_data(); } html... form...method=POST action='this_script?with session_id()' .. input... input type='submit' name=Faction value='Add to Data' /form ?PHP function Add_to_data() { Add data to mysql DB session_unregister('Faction'); session_destroy; } ? The above speudo script work fine and when the user click 'Add to Data', the data is added to my database. Howver, the session_unregister and session_destroy do not clear the variable Faction and its value. Therefore if the user click Reload on the browser, the data gets added again. What is my problem, Thanks in advance Claude -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Creating a global variable for all PHP pages?
The short answer - efficiency. The FAQ has a more elaborate explanation. -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 12:14 AM To: 'Lance Lovette'; Warrick Wilson; [EMAIL PROTECTED] Subject: RE: [PHP] Creating a global variable for all PHP pages? what about a common include file? -Original Message- From: Lance Lovette [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 4:00 PM To: Warrick Wilson; [EMAIL PROTECTED] Subject: RE: [PHP] Creating a global variable for all PHP pages? Take a look at this PHP extension and see if it will help solve your problem. It doesn't work on Windows yet though... http://pwee.sourceforge.net Lance -Original Message- From: Warrick Wilson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 2:49 PM To: [EMAIL PROTECTED] Subject: [PHP] Creating a global variable for all PHP pages? I want to define a variable that I can reference on ALL of my PHP pages. Ideally, I'd like to do it in php.ini or some similar place so that I can modify it as I place code on different systems, but not need to make changes in lots of different places. I looked at the Configuration section of the manual, did web searches, tried getenv() and using the OS environment (we're mixed Windows and UNIX boxes, using Apache and mysql and PHP 4.1.1), and had zero luck. I was hoping that getenv() or _ENV[] would have worked. I tried creating something in php.ini by simply adding a line, with no luck. Is there some way of doing this? Warrick -- 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 -- 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
[PHP] User's IP Address
Hi! Is there any possibility to get PHP page viewer's ip address.. for example $addr=some_function_that_returns_viewer's_address() or something like that? Thanks, Maris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] User's IP Address
On Thu, 21 Mar 2002, Maris Kalnins wrote: Is there any possibility to get PHP page viewer's ip address.. for example $addr=some_function_that_returns_viewer's_address() $REMOTE_ADDR You might want to play with phpinfo() - it tells you a lot. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Returning mutliple matches of a regex with preg_match()
Hello all I have been scratching my head for the last two days about this regular expression problem. I would be really VERY happy if someone could help me! I have the following text in the file 'text.htm', for example: -- BLOCKQUOTEP Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig /P/BLOCKQUOTE -- I want to return all the stuff between BLOCKQUOTEP ... /P/BLOCKQUOTE in an array. One element per match. For example, for the above text, I would like to get back an array back like this: array( Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines, Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines, Rabbit, Rabbit, Rabbit, Rabbit, Pig, Pig, Pig, Pig, Pig ) I have been trying to do this with (many variations of) the following code: -- ?PHP // open file $fd = fopen (./text.htm, r); // load contents into a variable while (!feof ($fd)) { $content .= fgets($fd, 4096); } // close file fclose ($fd); // remove char returns and co. $content = preg_replace(/(\r\n)|(\n\r)|(\n|\r)/, ,$content); // match agains regex -- this does not work correctly if (preg_match(/BLOCKQUOTEP(.*)\/P\/BLOCKQUOTE/i,$content,$matches)) { echo pre; var_dump($matches); echo /pre; } ? -- For the above, var_dump() returns this: -- array(2) { [0]= string(556) BLOCKQUOTEP Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig /P/BLOCKQUOTE [1]= string(524) Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig } -- Clearly not what I want. Is my approach here incorrect? Or is it indeed possible to construct a regex to do what I want (with just one pass of the text)? Thank you in advance. :-)) S. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Returning mutliple matches of a regex with preg_match()
preg_match_all(); Niklas -Original Message- From: Stefen Lars [mailto:[EMAIL PROTECTED]] Sent: 21. maaliskuuta 2002 7:28 To: [EMAIL PROTECTED] Subject: [PHP] Returning mutliple matches of a regex with preg_match() Hello all I have been scratching my head for the last two days about this regular expression problem. I would be really VERY happy if someone could help me! I have the following text in the file 'text.htm', for example: -- BLOCKQUOTEP Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig /P/BLOCKQUOTE -- I want to return all the stuff between BLOCKQUOTEP ... /P/BLOCKQUOTE in an array. One element per match. For example, for the above text, I would like to get back an array back like this: array( Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines, Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines, Rabbit, Rabbit, Rabbit, Rabbit, Pig, Pig, Pig, Pig, Pig ) I have been trying to do this with (many variations of) the following code: -- ?PHP // open file $fd = fopen (./text.htm, r); // load contents into a variable while (!feof ($fd)) { $content .= fgets($fd, 4096); } // close file fclose ($fd); // remove char returns and co. $content = preg_replace(/(\r\n)|(\n\r)|(\n|\r)/, ,$content); // match agains regex -- this does not work correctly if (preg_match(/BLOCKQUOTEP(.*)\/P\/BLOCKQUOTE/i,$content,$matche s)) { echo pre; var_dump($matches); echo /pre; } ? -- For the above, var_dump() returns this: -- array(2) { [0]= string(556) BLOCKQUOTEP Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig /P/BLOCKQUOTE [1]= string(524) Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig } -- Clearly not what I want. Is my approach here incorrect? Or is it indeed possible to construct a regex to do what I want (with just one pass of the text)? Thank you in advance. :-)) S. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- 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] Returning mutliple matches of a regex with preg_match()
use preg_match_all(); the var_dump($matches); to see what happened. Best regards, Andrey Hristov - Original Message - From: Stefen Lars [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 21, 2002 7:27 AM Subject: [PHP] Returning mutliple matches of a regex with preg_match() Hello all I have been scratching my head for the last two days about this regular expression problem. I would be really VERY happy if someone could help me! I have the following text in the file 'text.htm', for example: -- BLOCKQUOTEP Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig /P/BLOCKQUOTE -- I want to return all the stuff between BLOCKQUOTEP ... /P/BLOCKQUOTE in an array. One element per match. For example, for the above text, I would like to get back an array back like this: array( Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines, Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines, Rabbit, Rabbit, Rabbit, Rabbit, Pig, Pig, Pig, Pig, Pig ) I have been trying to do this with (many variations of) the following code: -- ?PHP // open file $fd = fopen (./text.htm, r); // load contents into a variable while (!feof ($fd)) { $content .= fgets($fd, 4096); } // close file fclose ($fd); // remove char returns and co. $content = preg_replace(/(\r\n)|(\n\r)|(\n|\r)/, ,$content); // match agains regex -- this does not work correctly if (preg_match(/BLOCKQUOTEP(.*)\/P\/BLOCKQUOTE/i,$content,$matches)) { echo pre; var_dump($matches); echo /pre; } ? -- For the above, var_dump() returns this: -- array(2) { [0]= string(556) BLOCKQUOTEP Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig /P/BLOCKQUOTE [1]= string(524) Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow Cow, Cow, Cow, Cow, Cow a lot of lines /P/BLOCKQUOTE pboring stuff - we are not interested in this/p BLOCKQUOTEP Chicken, Chicken, Chicken Chicken, Chicken, Chicken Chicken, Chicken, Chicken more lines /P/BLOCKQUOTE pmore boring stuff - we are not interested in this/p BLOCKQUOTEP Rabbit, Rabbit, Rabbit, Rabbit /P/BLOCKQUOTE peven more boring stuff - we are not interested in this/p BLOCKQUOTEP Pig, Pig, Pig, Pig, Pig } -- Clearly not what I want. Is my approach here incorrect? Or is it indeed possible to construct a regex to do what I want (with just one pass of the text)? Thank you in advance. :-)) S. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- 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
[PHP] Form Value Validation
I was wondering if there was a way to do validation of the values in forms. I know that I could just check it all after it's been submitted with a post, but is there any way to do it as they're entering the data or when they click the button right before it sends the data? Thanks, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Form Value Validation
On Thu, 21 Mar 2002, David Johansen wrote: I was wondering if there was a way to do validation of the values in forms. I know that I could just check it all after it's been submitted with a post, but is there any way to do it as they're entering the data or when they click the button right before it sends the data? Sure, go read about JavaScript. Doesn't have much to with PHP except that you can dynamically generate the JavaScript code to go along with dynamically-generated forms, if the need arises. Also please remember that plenty of people surf with JavaScript off, some by choice and some because of institutional policy. So you should make sure your page still works without it. But all this is a matter for another forum. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache
Anyone know of a good apache group? I want to hide the structure of a directory when there is no idex.html present g J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php