RE: [PHP] MySQL Install Problem
Dave, I tried it and got the following message: Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. C:\DOCUME~1\BENcd c:\mysql\bin C:\MYSQL\BINmysqld --standalone 'MYSQLD' is not recognized as an internal or external command, operable program or batch file. Any suggestions? Ben -Original Message- From: Dave Barry [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:05 AM To: Ben Clumeck Cc: [EMAIL PROTECTED] Subject: Re: [PHP] MySQL Install Problem On 20 0, Ben Clumeck [EMAIL PROTECTED] wrote: I am trying to install MySQL on WinXP, I get the following error message: Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. C:\DOCUME~1\BENcd c:\mysql\bin C:\MYSQL\BINmysqld--standalone 'MYSQLD--STANDALONE' is not recognized as an internal or external command, operable program or batch file. try 'mysqld --standalone' (note the space) it appears that you are not actually starting mysqld -- *-*-*-*-*-*-*-*-*-* So It Goes *-*-*-*-*-*-*-*-*-* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 7 Feb 2002 08:56:27 -0000 Issue 1157
php-general Digest 7 Feb 2002 08:56:27 - Issue 1157 Topics (messages 83754 through 83819): Re: !isset ?? 83754 by: Michael Sims 83758 by: Erik Price Re: Version checking 83755 by: Bogdan Stancescu GetImageSize and iptcparse problems 83756 by: Steven Jarvis 83808 by: Jason Wong checking for off site image 83757 by: sean.interconnect.is.it if variable is equal to 2 through 4 83759 by: Jay Fitzgerald 83765 by: Erik Price 83767 by: Erik Price 83769 by: hugh danaher Re: Sending MIME emails with base64 encoded attachments 83760 by: Svarc, Petr 83772 by: Analysis and Solutions Manual input, to form, to array, to session register... 83761 by: Floyd Baker 83763 by: Erik Price 83775 by: Floyd Baker Re: [PHP-DB] if variable is equal to 2 through 4 83762 by: Chris Boget 83764 by: Mihail Bota Re: mktime() Algorithm 83766 by: Lars Torben Wilson Re: Caching in php? 83768 by: Jeff Bearer odbc_fetch_into(), is there a way to display each data while using this function? 83770 by: Scott Fletcher Re: why !^ in email? 83771 by: Martin Towell Re: in_array algorithm 83773 by: Lars Torben Wilson XML closing elements called for tag / 83774 by: Hammy 83786 by: Christian Stocker 83788 by: Martin Towell Re: Newbie: Question about filesize() 83776 by: Ben Crawford 83777 by: Martin Towell 83779 by: Jeff Sheltren 83780 by: Lars Torben Wilson 83787 by: Lars Torben Wilson File Uploads 83778 by: Ben Crawford 83781 by: Jeff Sheltren Array !!! 83782 by: Pavel Zvertsov 83793 by: hugh danaher Writing PHP files from inside a PHP file 83783 by: Georgie Casey 83785 by: Brandon Orther 83789 by: J Smith Re: Create Mysql Records From a Comma separated Values String 83784 by: Ben Crawford Verisign / Payflow Pro 83790 by: Lazor, Ed cURL and XML? 83791 by: Petras Virzintas 83792 by: Martin Towell form summary !! 83794 by: Pablo Petek Differences between PHP, ASP, JSP 83795 by: Ben Clumeck 83796 by: Tyler Longren secure form handling 83797 by: wm 83798 by: Lars Torben Wilson 83800 by: wm 83801 by: CC Zona 83803 by: wm 83804 by: Lars Torben Wilson 83807 by: Lars Torben Wilson 83811 by: CC Zona function to post data 83799 by: wm 83806 by: Lars Torben Wilson 83818 by: val petruchek create dynamic pulldown menu? 83802 by: John P. Donaldson 83805 by: Jason Wong File upload 83809 by: Balaji Ankem 83810 by: Jason Murray Get file download time. 83812 by: J.F.Kishor 83813 by: Jason Wong Need XML info for PHP -- XML Newbie 83814 by: Navid Yar Server Loading Question... 83815 by: Jason G. MySQL Install Problem 83816 by: Ben Clumeck 83817 by: Dave Barry 83819 by: Ben Clumeck Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- At 03:06 PM 2/6/2002 -0500, Erik Price wrote: Pretty confusing. Can anyone shed some light on whether or not there is a final definite way to do this? I've used (!($_POST['var'])) with no problems in the past, but does good coding style suggest that I use (!isset($_POST['var'])) now? The problem with using (!$_POST['var']) as an expression is that you are asking the parser to evaluate the expression as a boolean. If $_POST['var'] isn't a boolean (and it won't be, because unless I'm mistaken all POST or GET variables are treated as strings unless you cast them) then the parser does an implicit cast to boolean while evaluating your expression. This is fine for most cases, but let's say that $_POST['var'] *is* set to either an empty string () or a string containing zero (0). Your test will fail, because both of these are evaluated as FALSE when cast as a boolean. That's the reason that isset() is a little more general purpose. If you aren't worried about missing an empty string or a string containing 0 then you can continue to use the method you have been using. For more info, see this: http://www.php.net/manual/en/language.types.boolean.php#language.types.boolean.casting ---End Message--- ---BeginMessage--- On Wednesday, February 6, 2002, at 03:42 PM, Michael Sims wrote: This is fine for most cases, but let's say that $_POST['var'] *is* set to either an empty string () or a string containing zero (0). Your test will fail, because both of these are evaluated as FALSE when cast as a boolean. That's the meat of it,
[PHP] difference !!??
Hello, What's the difference between: 1.- $row[column_name]; 2.- $row['column_name']; 3.- $row[column_name]; ? ragards Bart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 'encoded-words' in e-mail
I'm writing the program for sending e-mails. I have some troubles with creating encoded-words. There is a function for translation words in encoded-words? -- Alexandr Klaus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Server Loading Question...
Does anyone know of a Really Good way to determine what kind of loads your Webserver/network can handle before degrading performance or flaking out? I would like to find this out about our server before it fails us under heavy load. If you're running Apache it comes with a handy tool called ab which will do benchmarks for any amount of hits/concurrent requests to any page on your site. HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] difference !!??
Ok, 1 is IMO not correct, a string should be quoted. 2 and 3 make no practical difference in this situation, although 2 is probably somewhat faster because PHP doesn't substitute variables with their value when they're within single quotes. for code readability it is probaby best if you always use double quotes, and only if it saves a whole lot of escaping $'s and double quotes within the string use single quotes. note that if you like to include both single and double quotes in a long string (HTML for example) but still want to be able to use variables in it, you can use 'heredoc notation'. bvr. On Thu, 7 Feb 2002 10:05:18 +0100, B. Verbeek wrote: Hello, What's the difference between: 1.- $row[column_name]; 2.- $row['column_name']; 3.- $row[column_name]; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to find out what country the visitor comes from
Hi, I'm trying to find out what country the visitor comes from to offer them suitable language (like google.com does) but I haven't found a method that works 100%. What I have come up with so far is to use $HTTP_X_FORWARDED_FOR or gethostbyaddr($REMOTE_ADDR) Sometime I get domain which does the job (and that works) but often I get just IP number which leaves me out in the cold. Is there any other way to capture the visitors country? Thanks, SED -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Link Inquiry
Hi there, been thinking about how to retrieve all links on a webpage. How would I go about grabbing all links from a particular page? Thx Joe :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() - 7bit headers
How do i encode 8 bit text to 7 bit in php so that the mail server (courier) won't complain about 8 bit content in the header (From:) while still enabling mailreaders to decode it? Regards Martin Petersen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Install Problem
Ben, Is the file present at all? What do you see from DIR C:\MYSQL\BIN\MYSQL*.EXE ? Regards, =dn I tried it and got the following message: Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. C:\DOCUME~1\BENcd c:\mysql\bin C:\MYSQL\BINmysqld --standalone 'MYSQLD' is not recognized as an internal or external command, operable program or batch file. Any suggestions? Ben -Original Message- From: Dave Barry [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:05 AM To: Ben Clumeck Cc: [EMAIL PROTECTED] Subject: Re: [PHP] MySQL Install Problem On 20 0, Ben Clumeck [EMAIL PROTECTED] wrote: I am trying to install MySQL on WinXP, I get the following error message: Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001. C:\DOCUME~1\BENcd c:\mysql\bin C:\MYSQL\BINmysqld--standalone 'MYSQLD--STANDALONE' is not recognized as an internal or external command, operable program or batch file. try 'mysqld --standalone' (note the space) it appears that you are not actually starting mysqld -- *-*-*-*-*-*-*-*-*-* So It Goes *-*-*-*-*-*-*-*-*-* -- 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: Link Inquiry
There's a class named Snoopy on Sourceforge that can do this for you. At least it's a place where you can look at the sources and see how it's done. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Lerp [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, been thinking about how to retrieve all links on a webpage. How would I go about grabbing all links from a particular page? Thx Joe :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Link Inquiry
Thx Julio :) Lerp [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, been thinking about how to retrieve all links on a webpage. How would I go about grabbing all links from a particular page? Thx Joe :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using functions before they're defined
How does PHP 4 locate function definitions if the function is called before it is defined? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Link Inquiry
Joe, Parse the page source for 'A HREF=' (and 'INPUT TYPE=button' in case that contains a url)? Or am I missing something? Regards Chris Lerp wrote: Hi there, been thinking about how to retrieve all links on a webpage. How would I go about grabbing all links from a particular page? Thx Joe :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Differences between PHP, ASP, JSP
On Wednesday, February 6, 2002, at 10:14 PM, Ben Clumeck wrote: I know there must be a tone of articles on the subject. Can anyone give me brief advantages and disadvantages between the 3 languages. Is there something that one language specifically does that another doesn't? Could PHP be used for online banking? Usually banks use JSP or ASP, why don't banks use PHP? Is there security issues? Because they're fools. I admit to being biased. 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
[PHP] Re: Using functions before they're defined
My guess it's that since the page is entirely read before processed (hence you get parse errors and nothing before it's executed), the function calls are store somewhere waiting for the definitions. Once the page is entirely parsed, the functions try to execute... If you asked with PHP development, sources, module development, etc... I mean, if you want to know how it's done internally to change or take advantage of those resources, I guess php.dev mailing list is a better place. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Brad Harriger [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How does PHP 4 locate function definitions if the function is called before it is defined? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function to post data
On Wednesday, February 6, 2002, at 11:06 PM, Lars Torben Wilson wrote: On Wed, 2002-02-06 at 19:32, obo wrote: is there a command in php to post form data to a script? example: i have a form. once the submit is hit i use php to check the values. if the values are ok i then call a function to post the data. thanks. This is a fairly common request. Your best bets are to search for 'posttohost' in the mailing list archives, or just use cURL: http://www.php.net/curl ...which will more than likely satisfy any posting cravings you may have. :) I don't mean to butt in here, I'm just a bit confused. I thought that the poster (obo) was asking how to submit form variables using POST. For the purpose of doing more work with these variables, from a (PHP) script. Is obo asking something different here? I read about posttohost yesterday (someone provided a link) but I didn't see the purpose behind this process. What is it for? 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
[PHP] Re: [PHP-DB] difference !!??
Bart, See this page for an explanation of quotes inside array brackets: http://www.php.net/manual/en/language.types.array.php Basically, the correct way to do it is to _always_ use quotes (single quotes for strings without variables, and double quotes for strings with variables). So your example below should use format #2 since there are no variables to expand. Format #1 below is deprecated, and I can attest to weird behavior when you use $row[$column_name] without double quotes. Hope this helps! Daniel Ems On Thu, 7 Feb 2002, B. Verbeek wrote: Hello, What's the difference between: 1.- $row[column_name]; 2.- $row['column_name']; 3.- $row[column_name]; ? ragards Bart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Verisign / Payflow Pro
Hi Ed: I saw PHP has built-in support for Cybercash, but that Verisign has purchased them. It looks like I'll have to go with Payflow Pro, but I'm wondering if PHP has built-in support, available modules, or what the best approach is. Any recommendations? PHP does indeed have support for Payflow Pro. See http://www.php.net/manual/en/ref.pfpro.php. All these functions do is ship off the data to Verisign and return the response to a variable. You still need to assemble the data in Payflow format and then handle the response codes. I've written my own purchasing procedure which compiles the information in Payflow format (including Level 3 line item transaction data), passes it to Payflow Pro, handles the response codes, and stores the data in text files which get downloaded to an offline system, and finally imported into the offline database for historical and reconcilliation purposes. Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Calling PHP function from Perl - as external program
Hey Vaclav: Vaclav Muchna wrote: system('/fullpath/ob', '100'); produce this message: X-Powered-By: PHP/4.1.0 Content-type: text/html No input file specified. but, when i remove -q parametr from ob, it procude this message: X-Powered-By: PHP/4.1.0 Content-type: text/html #! /usr/bin/php Params: so, it is executed, but seem to be parsed by some other php in system (due to string output #!/usr/bin/php), but no parametrs are given. But what does your ob script look like? There may be an error in it causing the No input file specified response. Caio! --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Images
Seem to have a problem... I'm creating a form to upload a image to a dir on the webserver. When I fill out the form and submit it (method=post) the variable in the input type=file name=image-field doesn't get sent. I also use enctype multipart/form-data. Does anyone have any suggestions? regards Bart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to find out what country the visitor comes from
Hi: SED wrote: I'm trying to find out what country the visitor comes from to offer them suitable language $HTTP_X_FORWARDED_FOR or gethostbyaddr($REMOTE_ADDR) Domain names and IP's are NOT the way to go. Way to unreliable. Use the HTTP header HTTP_ACCEPT_LANGUAGE. Take it easy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] copy + chmod problems ...
hello, i'm attempting to copy a file from its original location to a new folder ... $oldfile = files/adamsCampbells.swf; $newfile = photos/adamsCampbells.swf; $test = copy($oldfile, $newfile); however, in doing so, i'm encountering some problems: Warning: Unable to create 'adamsCampbells.swf': Permission denied i've been trying to change permissions so that i can copy the file, but i'm encountering some errors chmod (files, 0777); Badly placed ()'s. does anybody recognize any problems with my approach or have any advice? dnke, jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql_insert_id() vs LAST_INSERT_ID()
I have two questions: 1. Can anyone tell me whether the following statement is true or false? The PHP function mysql_insert_id() differs from the MySQL function LAST_INSERT_ID() in that the PHP function returns the last auto-incremented value from the current connection, and the MySQL function returns the highest current value in a table's AUTO_INCREMENT column. 2. Secondly, if anyone could answer the following question it would be very helpful... When updating a foreign key (in-between table for many-to-many relationships) using the last auto-incremented value, is it better to write several separate SQL queries and store them in the same variable for mysql_query(), or is it better to write several separate SQL queries and store them in separate variables, and then run separate mysql_query() functions against those variables separately? IOW, ex 1: $sql = INSERT INTO table1 (column2, column3) VALUES ('value1', 'value2') INSERT IGNORE INTO table2 (column1, column2) VALUES (LAST_INSERT_ID(), '$id'); $result = mysql_query($sql); OR, ex 2: $sql1 = INSERT INTO table1 (column2, column3) VALUES ('value1', 'value2'); $result1 = mysql_query($sql1); $last_inserted = mysql_insert_id(); $sql2 = INSERT IGNORE INTO table2 (column1, column2) VALUES ('$last_inserted', '$id'); $result2 = mysql_query($sql2); In other words, when performing multiple SQL queries simultaneously, is it better to give them their own variable (each SQL statement), or can you lump them all together? 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
[PHP] block ctrlaltdel and alttab
Hi, I have a routine to administrate a cybercafe with MySQL, PHP over Win 2K. Does anyone knows how could I programm a routine to request ID and Password wich disables the ctrlaltdel , alttab and shiftf4? Thanks in advance, Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to Configure the MySql Database?
I don't know to configure MySql Database On Apache Server in Windows System. What I must do? (step by step)
[PHP] Simple for you, not for me
Hi, A simple question for you, but I can not find the solution. My source: ?php include(http://204.227.127.33/awc/fltfldr/6443.txt;) ? The result: http://www.sportvliegen.nl/test.phtml If you watch the original document: http://204.227.127.33/awc/fltfldr/6443.txt I would like to have the original document in my HTML-code. Does you have the solution? Please, email to [EMAIL PROTECTED] with your answer. Thank you very much, Ramin Berwers --- Pilotassistance Mail : [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pilotassistance bestaat onder andere uit: www.pilotassistance.com /-.be/-.nl - Algemene site Pilotassistance www.sportvliegen.com /-.be/-.nl- Vluchtvoorbereidingsinformatie www.privevliegen.com /-.be/-.nl- Vluchtvoorbereidingsinformatie www.vliegplan.com /-.be/-.nl - Indienen vliegplannen bij FIO Schiphol www.pilot-logbook.com /-.be/-.nl - De online pilot-logbook voor de vlieger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: automatic forward URL to other URL
In the first domain (www.mydomain.com) create a page called index.php with the code: ? header(Location:www.mydomain2.com); ? regards, Alfredo Manu Verhaegen wrote: I want automatic forward URL (www.mydomain.com) to (www.mydomain2.com) If i type in my brower www.mydomain.com the i will see www.mydomain2.com Greetings, Manu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to Configure the MySql Database?
USE MANUAL! I don't know to configure MySql Database On Apache Server in Windows System. What I must do? (step by step) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Images
What Mod does it need? -Oorspronkelijk bericht- Van: Anna Gintere [mailto:[EMAIL PROTECTED]] Verzonden: vrijdag 8 februari 2002 2:08 Aan: [EMAIL PROTECTED] Onderwerp: RE: [PHP] Images Does dir have aprpriate mod (permisions)? -Original Message- From: B. Verbeek [mailto:[EMAIL PROTECTED]] Sent: ceturtdiena, 2002. gada 7. februârî 7:01 To: Php-General (E-mail) Subject: [PHP] Images Seem to have a problem... I'm creating a form to upload a image to a dir on the webserver. When I fill out the form and submit it (method=post) the variable in the input type=file name=image-field doesn't get sent. I also use enctype multipart/form-data. Does anyone have any suggestions? regards Bart -- 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] How to Configure the MySql Database?
Mr K: Karadamoglou Kostas wrote: I don't know to configure MySql Database On Apache Server in Windows System. What I must do? (step by step) Read my MySQL Basics tutorial: http://www.analysisandsolutions.com/code/mybasic.htm. It's a really straight ahead, step by step explanation on how to setup MySQL on Windows platforms. Enjoy, --Dan PS: fix your email program. First, turn line wrapping on to about 77 characters. Second, make it send pure text/plain documents rather than the silly multipart/alternative format. On this last point, see http://www.geocities.com/CapitolHill/1236/nomime.html. -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: automatic forward URL to other URL
Folks: Baloo :0) wrote: header(Location:www.mydomain2.com); The header funcion really requires a fully qualified URI, and needs a space, so make that header(Location: http://www.mydomain2.com/;); Later, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Differences between PHP, ASP, JSP
Tyler Longren wrote: PHP could be used for online banking. Banks use ASP because there is software already written in ASP for what they need. If that were the case it wouldn't take months of time with dozens of people working on projects to get the barely functional. The software banks use at the ASP level is almost always going to be custom written for them inhouse or outsourced. There aren't standard ASP banking packages. The software on the backend to connect to their legacy systems, perhaps, but there's still going to be much custom integration work. There's no real major time savings between an ASP-proficient person developing a project and a PHP-proficient person developing a project. Also, they use it because it's from Microsoft. Getting warmer. :) Generally, in larger institutions, the people making the technology decisions aren't the same people who have to implement them, so whether or not it's better to use CF or PHP or JSP or ASP, they simply go 'MS' because of the name recognition. I'm not completely discounting issues of inhouse talent, legacy integration issues, etc., but at the end of the day, PHP, ASP, CF, JSP, Perl and others do a couple things: 1. Take information from a browser 2. Process it - usually with database calls 3. Present other information back To say that one technology is vastly superior to another is just silly. Some have neat hooks/shortcuts, some are faster at execution, some are better with memory, some have price benefits, but there's nothing from the list above that you can do with one that you can't do with another. Michael Kimsal http://www.tapinternet.com/php PHP Training Courses -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] copy + chmod problems ...
i just tried a test and it works on MacOS X. even with the space between 'chmod' and '('. what platform are you on? is this a standalone script/app or from a web page? can you perform the chmod from the command-line? what is the entire error message? also, the error doesn't really suggest this, but have you tried using the full path? on 2/7/02 8:07 AM, jeremy rotsztain at [EMAIL PROTECTED] wrote: hello, i'm attempting to copy a file from its original location to a new folder ... $oldfile = files/adamsCampbells.swf; $newfile = photos/adamsCampbells.swf; $test = copy($oldfile, $newfile); however, in doing so, i'm encountering some problems: Warning: Unable to create 'adamsCampbells.swf': Permission denied i've been trying to change permissions so that i can copy the file, but i'm encountering some errors chmod (files, 0777); Badly placed ()'s. does anybody recognize any problems with my approach or have any advice? dnke, jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with PHP global array
Hi all, How can I declare a global array? Can I do this: $global myArray[] would I find out it is an array when I use it in other places? Thanks, Wee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Seams not to be possible
maybe you could use eval(): eval(echo \$ . $field); - Original Message - From: Andy [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 2:57 AM Subject: Seams not to be possible This was just an error in my explenation I ment categories. Meanwhile I tryed var vars, but it does not work for any reason?!?!? My code looks like: $field = $categories[0].[0]; echo $field;// returns glacier[0] echo 'var '.$$field.'br'; // returns bluddy nothing echo $categories[0]; // returns glacier echo $glacier[0];// returns 110 Does anybody know how to get the 110 out of the array? Thanx for any help, Andy Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I have a tricky array question. My app is passing via post a array variable called glacier. Now I am checking for the content of this array. Because there are more of those arrays, I am getting all the names out of a db. How is it possible to get the value and keep the name of the array dynamic? e.g: Array name passed by post is: $glacier // contains e.g. $glacier[0] = testname Array with category names coming out of db is: $category // contains e.g. $category[0] = glacier echo $categories[0]; // returns glacier echo $glacier[0]; // returns testname I tryed $categories[0][0] but it returns only the first letter of glacier (g) Any ideas?? Thanx, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Seams not to be possible
$glacer[0]=test; $category[0]=glacer; echo ${$category[0]}[0]; echo returns test. That is what you wanted to do?? -Original Message- From: Aric Caley [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 4:46 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Seams not to be possible maybe you could use eval(): eval(echo \$ . $field); - Original Message - From: Andy [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 2:57 AM Subject: Seams not to be possible This was just an error in my explenation I ment categories. Meanwhile I tryed var vars, but it does not work for any reason?!?!? My code looks like: $field = $categories[0].[0]; echo $field;// returns glacier[0] echo 'var '.$$field.'br'; // returns bluddy nothing echo $categories[0]; // returns glacier echo $glacier[0];// returns 110 Does anybody know how to get the 110 out of the array? Thanx for any help, Andy Andy [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I have a tricky array question. My app is passing via post a array variable called glacier. Now I am checking for the content of this array. Because there are more of those arrays, I am getting all the names out of a db. How is it possible to get the value and keep the name of the array dynamic? e.g: Array name passed by post is: $glacier // contains e.g. $glacier[0] = testname Array with category names coming out of db is: $category // contains e.g. $category[0] = glacier echo $categories[0]; // returns glacier echo $glacier[0]; // returns testname I tryed $categories[0][0] but it returns only the first letter of glacier (g) Any ideas?? Thanx, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] copy + chmod problems ...
hi mike ... actually, this was my first mistake ... i received this chmod error because i entered the command into the unix terminal window using osx. i tried later to change the permissions using php (a script), but was unable to do so: $chg = chmod (photos, 0777); error message == chmod failed: Operation not permitted in /Library/WebServer/Documents/browsin/copy.ph i'll try using the full path ... thx jeremy i just tried a test and it works on MacOS X. even with the space between 'chmod' and '('. what platform are you on? is this a standalone script/app or from a web page? can you perform the chmod from the command-line? what is the entire error message? also, the error doesn't really suggest this, but have you tried using the full path? on 2/7/02 8:07 AM, jeremy rotsztain at [EMAIL PROTECTED] wrote: hello, i'm attempting to copy a file from its original location to a new folder ... $oldfile = files/adamsCampbells.swf; $newfile = photos/adamsCampbells.swf; $test = copy($oldfile, $newfile); however, in doing so, i'm encountering some problems: Warning: Unable to create 'adamsCampbells.swf': Permission denied i've been trying to change permissions so that i can copy the file, but i'm encountering some errors chmod (files, 0777); Badly placed ()'s. does anybody recognize any problems with my approach or have any advice? dnke, jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simple for you, not for me
Maybe a nl2br() will solve? It converts new lines from .txt documents for example to br, for html documents. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Ramin Berwers [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, A simple question for you, but I can not find the solution. My source: ?php include(http://204.227.127.33/awc/fltfldr/6443.txt;) ? The result: http://www.sportvliegen.nl/test.phtml If you watch the original document: http://204.227.127.33/awc/fltfldr/6443.txt I would like to have the original document in my HTML-code. Does you have the solution? Please, email to [EMAIL PROTECTED] with your answer. Thank you very much, Ramin Berwers -- - Pilotassistance Mail : [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pilotassistance bestaat onder andere uit: www.pilotassistance.com /-.be/-.nl - Algemene site Pilotassistance www.sportvliegen.com /-.be/-.nl- Vluchtvoorbereidingsinformatie www.privevliegen.com /-.be/-.nl- Vluchtvoorbereidingsinformatie www.vliegplan.com /-.be/-.nl - Indienen vliegplannen bij FIO Schiphol www.pilot-logbook.com /-.be/-.nl - De online pilot-logbook voor de vlieger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: help with PHP global array
$array = Array('a'=1); function scope_test() { global $array; echo $array['a']; } Works for me, PHP 4.1.1 with the new .ini file. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Wee Chua [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, How can I declare a global array? Can I do this: $global myArray[] would I find out it is an array when I use it in other places? Thanks, Wee -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] help with PHP global array
Hi all, I have tried: global $myArray[] and it gives me an error 'the array expects semi-colon or comma'. Any helps would be appreciated! Thanks, Wee -Original Message- From: Bjorn Abt [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 10:57 AM To: '[EMAIL PROTECTED]' Subject: AW: [PHP] help with PHP global array I would try: global $myArray[] Greetings Björn -Ursprüngliche Nachricht- Von: Wee Chua [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Gesendet: Donnerstag, 7. Februar 2002 16:35 An: PHP (E-mail) Betreff: [PHP] help with PHP global array Hi all, How can I declare a global array? Can I do this: $global myArray[] would I find out it is an array when I use it in other places? Thanks, Wee -- PHP General Mailing List ( http://www.php.net/ http://www.php.net/ ) To unsubscribe, visit: http://www.php.net/unsub.php http://www.php.net/unsub.php
[PHP] Re: block ctrlaltdel and alttab
shiftf4 or altf4? Anyway, you could try to block with Javascript the alt key, which is common among all your options (or alt and shift). There's a key map on Javascript that references each keyborad key with a variable. Just do something like onKeyPress('var') = ''. I don't remember the exact code but a google search will do fine. PS: I don't know if you know this, but it's impossible to prevent keystrokes with PHP (since it's server side), unless you go really crazy and exec(); a program to do so. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Baloo :0) [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I have a routine to administrate a cybercafe with MySQL, PHP over Win 2K. Does anyone knows how could I programm a routine to request ID and Password wich disables the ctrlaltdel , alttab and shiftf4? Thanks in advance, Alfredo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] force refresh?
can i force a browser to refresh using php. jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Math librarys
Getting error 'Call to undefined function: bcmod() ' cos ISP I am using douse not have maths support enabled. Has anyone got a PHP function that will do mod function so I can use this instead. Ben * Ben Edwards +44 (0)117 9400 636 * * Critical Site Builderhttp://www.criticaldistribution.com * * online collaborative web authoring content management system * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol Indymedia http://bristol.indymedia.org * * Bristol's radical news http://www.bristle.org.uk * * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.320 / Virus Database: 179 - Release Date: 30/01/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Script uid/gid
Hi! I'd like to know why a php script stored at the cgi-bin directory, with the php binary stored outside the webserver tree, runs with the uid/gid of the parent process, even when the setuid/setgid bits set, ignoring them!!! Thanks in advance, Roberto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Preventing Identical Form Fields
Pretty simple question, I think: I'm creating a PHP form and want to prevent users from entering the same response in more than one form field. How can I have the script check for identical fields on POST? Thanks Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Preventing Identical Form Fields
With javascript onSubmit, but that ain't php, so with if($form1==$form2){sendthembackwitherrors()} --- Christopher Wright 303 447 2496 x 107 www.netinfra.com We'll take care of it. Net Infrastructure has definitely helped our company, even though we're not in the US, Net Infrastructure has been a key part in the success of our business. Juan Carlos Saravia -Original Message- From: Dave Rosenberg [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 9:30 AM To: [EMAIL PROTECTED] Subject: [PHP] Preventing Identical Form Fields Pretty simple question, I think: I'm creating a PHP form and want to prevent users from entering the same response in more than one form field. How can I have the script check for identical fields on POST? 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] force refresh?
Probably only by writing javascript to the window using php. --- Christopher Wright 303 447 2496 x 107 www.netinfra.com We'll take care of it. Net Infrastructure has definitely helped our company, even though we're not in the US, Net Infrastructure has been a key part in the success of our business. Juan Carlos Saravia -Original Message- From: Jeff D. Hamann [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 9:02 AM To: [EMAIL PROTECTED] Subject: [PHP] force refresh? can i force a browser to refresh using php. jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.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] Preventing Identical Form Fields
Thanks Chris, but I have about 10 different fields and want to make sure none of those are the same. Dave Chris Wright wrote: With javascript onSubmit, but that ain't php, so with if($form1==$form2){sendthembackwitherrors()} --- Christopher Wright 303 447 2496 x 107 www.netinfra.com We'll take care of it. Net Infrastructure has definitely helped our company, even though we're not in the US, Net Infrastructure has been a key part in the success of our business. Juan Carlos Saravia -Original Message- From: Dave Rosenberg [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 9:30 AM To: [EMAIL PROTECTED] Subject: [PHP] Preventing Identical Form Fields Pretty simple question, I think: I'm creating a PHP form and want to prevent users from entering the same response in more than one form field. How can I have the script check for identical fields on POST? Thanks Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Win32 PHP + PostgreSQL support
Any ideas how to get PHP for win32 with PostgreSql support? Cheers Todor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] probs w/ pass vars as fake directories
I discovered this wonderful article at zend discussing how to pass get parameters as mock directory names . . . ie www.ica.bc.ca/kb.php3?artid=34catid=23 would become www.ica.bc.ca/kb.php3/artid/34/catid/23. Then you retrieve these values from the $PATH_INFO variable. I tried it out on my site by deleting the get parameters and typing the mock directories in on the url. Very cool, my website is still being displayed even with the fake directories. BUT, I noticed that the server was not finding my css page or my images. And when I click on one of the links on the webpage, they get added to the end of my list of fake directories, ie: www.ica.bc.ca/kb.php3/artid/34/catid/23/kb.php3?catid=56artid=23 I also noticed that the server was finding the PHP include files. Does this mean that I need to use absolute links for anything that is being located after PHP is done with the page? I guess the server is looking for the css page and the images relative to the fake directory. Am I missing something here? Has anybody tried this out? Is there any way around using absolute links? I briefly thought of using my config file to create a variable for the absolute link, ie $abs_link=http://www.ica.bc.ca/; and then adding the relative link to it. But my content is all stored in a database with lots of embedded html. I would then end up with embedded php in my database and would need to use eval (or something??) to execute that php. Very messy and slow I presume. I guess I could always use a search and destroy program to change the absolute links when necessary. Sorry I'm starting to babble here I'd better leave now! . . . Just one more thing though, I really love the zend articles. They've really clarified a lot of things, and introduced stuff I'd never thought of before. They have a whole section of articles, tutorials, columns, etc here: http://www.zend.com/zend/art/ Thanks, Rita. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Preventing Identical Form Fields
Hi, I think that you could still use Chris' method, you will just have to do it in a loop. Create an array of all the form fields, and then have a nested for loop which just checks that none of the elements are equal. $numelements = count($fieldarray); for($i = 0; $i $numelements; $i++) { for($j = 0; $j $numelements; $j++) { if($j != $i) { if($fieldarray[$i] == $fieldarray[$j]) { sendbackwitherrors(); } } } } Hope that helps. Jeff At 11:42 AM 2/7/2002 -0500, Dave Rosenberg wrote: Thanks Chris, but I have about 10 different fields and want to make sure none of those are the same. Dave Chris Wright wrote: With javascript onSubmit, but that ain't php, so with if($form1==$form2){sendthembackwitherrors()} --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] force refresh?
You can force the browser to refresh using a meta tag: meta HTTP-EQUIV=Refresh content=180 This will cause the page to refresh every 180 seconds. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED] - Original Message - From: Chris Wright [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 11:34 AM Subject: RE: [PHP] force refresh? Probably only by writing javascript to the window using php. --- Christopher Wright 303 447 2496 x 107 www.netinfra.com We'll take care of it. Net Infrastructure has definitely helped our company, even though we're not in the US, Net Infrastructure has been a key part in the success of our business. Juan Carlos Saravia -Original Message- From: Jeff D. Hamann [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 9:02 AM To: [EMAIL PROTECTED] Subject: [PHP] force refresh? can i force a browser to refresh using php. jeff. -- Jeff D. Hamann Hamann, Donald Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 [EMAIL PROTECTED] www.hamanndonald.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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Formatting a MYSQL time
Hello, Since I'm the only one who uses php at work I run into a little problem and was hoping maybe someone could help me. I've set up a Mysql database that has an event time. I've set the field in the table as: eventtime time DEFAULT 00:00:00. When I go to print the eventtime I'm pulling it out of Mysql with the following code snippet while ($row = mysql_fetch_array($result)) { $dateofevent = $row[dateofevent]; $sponsor = $row[sponsor]; $location = $row[location]; $eventtime = $row[eventtime]; $contact = $row[contact]; All of this works. I connect to Mysql and pull out the data. Then I'm formatting $eventtime with $etime = date(g:i a, $eventtime); The problem is that when I print $etime in an html table all I get is 6:00 pm for all the events. When I print $eventtime I get the correct time that is stored in Mysql. My question is am I doing this correctly or do I need to use another function to format a mysql time. Thanks in advance. Frank Miller Computer Specialist and Webmaster Technology and Distance Education Texas AM University-Texarkana 2600 North Robison Rd Texarkana, Texas 75501 Phone: 903-223-3156 Fax: 903-223-3139 Office: 165 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] error_reporting(E_ALL) and undefined vars
Hi All, I develop with error_reporting(E_ALL). It's a major pain to type everytime if(isset($some_var)) To avoid undefined variable errors. Any tips? If you turn E_ALL on error_reporting, what do you do? -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Preventing Identical Form Fields
With javascript onSubmit, but that ain't php, so with if($form1==$form2){sendthembackwitherrors()} Thanks Chris, but I have about 10 different fields and want to make sure none of those are the same. You could brute force it: $ok = true; if ($field1 == $field2 || $field1 == $field3 || ) $ok = false; if ($field2 == $field3 || $field2 == $field4 || ) $ok = false; if ($ok == false) sendThemBackWithErrors (); Or you could use array_unique: // Substitute $_GET if you're using GET instead of POST ;-) if ($_POST != array_unique ($_POST)) sendThemBackWithErrors (); I'm not sure if this second one would work - I don't know if you can do straight comparisons of arrays - but the idea is to check that the submitted array is the same as the array with all the duplicates removed (if it isn't, there was a duplicate). HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] probs w/ pass vars as fake directories
I tried it out on my site by deleting the get parameters and typing the mock directories in on the url. Very cool, my website is still being displayed even with the fake directories. BUT, I noticed that the server was not finding my css page or my images. You need to exclude certain requests from your parsing of the fake directories. Are you using mod_rewrite to accomplish this, or passing everything through a 404 handler? With mod_rewrite it's a simple task to add an exclusion rule, just stick something like this in your .htaccess or httpd.conf: RewriteRule !\.(gif|jpg|css)$ /usr/local/apache/htdocs/index.php With a 404 handler I can't work out how the problem would arise :-) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] force refresh?
Jeff, can i force a browser to refresh using php. =the issue is PHP's server-side-edness. Consider adding an HTML META tag to the page, to call/renew itself every n-seconds. =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with PHP global array
On Thursday 07 February 2002 23:48, Wee Chua wrote: Hi all, I have tried: global $myArray[] and it gives me an error 'the array expects semi-colon or comma'. Any helps would be appreciated! Thanks, Wee -Original Message- From: Bjorn Abt [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 10:57 AM To: '[EMAIL PROTECTED]' Subject: AW: [PHP] help with PHP global array I would try: global $myArray[] Greetings Björn -Ursprüngliche Nachricht- Von: Wee Chua [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Gesendet: Donnerstag, 7. Februar 2002 16:35 An: PHP (E-mail) Betreff: [PHP] help with PHP global array Hi all, How can I declare a global array? Can I do this: $global myArray[] would I find out it is an array when I use it in other places? Thanks, Wee All variables in PHP are local to the scope in which it is defined. You cannot declare a variable as global (as such). To use a global variable: ? $doodah = 10; test_global(); function test_global() { global $doodah; echo(Doodah should be ten: $doodah); } ? See manual for details. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* A lot of people I know believe in positive thinking, and so do I. I believe everything positively stinks. -- Lew Col */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] error_reporting(E_ALL) and undefined vars
I develop with error_reporting(E_ALL). It's a major pain to type everytime if(isset($some_var)) To avoid undefined variable errors. Any tips? If you turn E_ALL on error_reporting, what do you do? Generally I make sure my variables are defined, and if I can't be sure I use... if (isset ($some_var)) That's the *point* of turning on E_ALL. If you don't like it, bump it up to a higher level. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] error_reporting(E_ALL) and undefined vars
Thanks Jon. But, that's for security, right? Maybe even other reasons. I know close to zero of programming theory, so, why is it bad to have undefined vars on the code? -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with PHP global array
All variables in PHP are local to the scope in which it is defined. You cannot declare a variable as global (as such). To use a global variable: This is true. But I believe that the original question was actually the other way around... Make a local variable into a global one. The way to do that is this: ? myFunc() { $myFuncLocalVar = Hello!; echo $myFuncLocalVar; $GLOBALS[myFuncLocalVar] = $myFuncLocalVar; } myFunc(); echo $myFuncLocalVar; ? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_insert_id() vs LAST_INSERT_ID()
On Thursday 07 February 2002 23:08, Erik Price wrote: I have two questions: I think the php-db list is more appropriate for these. 1. Can anyone tell me whether the following statement is true or false? The PHP function mysql_insert_id() differs from the MySQL function LAST_INSERT_ID() in that the PHP function returns the last auto-incremented value from the current connection, and the MySQL function returns the highest current value in a table's AUTO_INCREMENT column. IIRC they both serve the same function. 2. Secondly, if anyone could answer the following question it would be very helpful... When updating a foreign key (in-between table for many-to-many relationships) using the last auto-incremented value, is it better to write several separate SQL queries and store them in the same variable for mysql_query(), or is it better to write several separate SQL queries and store them in separate variables, and then run separate mysql_query() functions against those variables separately? [snip] In other words, when performing multiple SQL queries simultaneously, is it better to give them their own variable (each SQL statement), or can you lump them all together? I don't think MySQL is able to handle multiple queries in one statement. IOW you would have to perform each separately. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* When childhood dies, its corpses are called adults. -- Brian Aldiss */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] probs w/ pass vars as fake directories
I tried it out on my site by deleting the get parameters and typing the mock directories in on the url. Very cool, my website is still being displayed even with the fake directories. BUT, I noticed that the server was not finding my css page or my images. You need to exclude certain requests from your parsing of the fake directories. Are you using mod_rewrite to accomplish this, or passing everything through a 404 handler? With mod_rewrite it's a simple task to add an exclusion rule, just stick something like this in your .htaccess or httpd.conf: RewriteRule !\.(gif|jpg|css)$ /usr/local/apache/htdocs/index.php With a 404 handler I can't work out how the problem would arise :-) Cheers Jon Oops, I've missed an important step :) I didn't rewrite the url. That makes a lot of sense! I'll see what I can come up with with my 404 handler, and check out mod_rewrite (see if my ISP has given me access to it). Thank you very much! Rita. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function to post data
On Thursday 07 February 2002 22:45, Erik Price wrote: I don't mean to butt in here, I'm just a bit confused. I thought that the poster (obo) was asking how to submit form variables using POST. For the purpose of doing more work with these variables, from a (PHP) script. Is obo asking something different here? I read about posttohost yesterday (someone provided a link) but I didn't see the purpose behind this process. What is it for? It's for server-side posting of form data to (usually) another webpage/website. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* The computer is to the information industry roughly what the central power station is to the electrical industry. -- Peter Drucker */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting a MYSQL time
Here Frank, play with this you'll have to add a bit of code to select your time values, but it will start you down the road. I spent some time playing with this a couple of years ago, this is taken from a file with the grand name of junk.php! Miles Thompson // up here there's code to connect, choose dtabase and select some values. //The value fetched and stored in $dtAuctionStart is timestamp(14). Some messing about with dates br =br ? echo $dtAuctionStart, br; echo date (Y-m-d, $dtAuctionStart ), br; //$strDate = $dtAuctionStart ; echo dtAuctionStart : $dtAuctionStart; $year = substr ($dtAuctionStart, 0, 4); $month =substr( $dtAuctionStart, 4, 2 ); $day = substr ($dtAuctionStart, 6, 2 ); Echo dtAuctionStart in m-d -y : $month-$day-$year br; $workdate = getdate( $dtAuctionStart ); echo Workdate Year:, $workdate[year],br; ? Ereg Stuff br ==br ? if (ereg (([0-9]{4})([0-9]{1,2})([0-9]{1,2}), $dtAuctionStart, $regs)) { echo Auction Start: $regs[1]-$regs[2]-$regs[3] brbr; } else { echo Bad date format. br; } //echo gmdate (Y-m-d, time()), br; echo date (M-d-Y, mktime (0,0,0, $month, $day, $year)); // echo date (M-d-Y, mktime (0,0,0,12,32,1997)); echo brLocal date: br ; echo date (M d Y H:i:s, time()), br; echo date (M d Y H:i:s, time()), br; echo Greenwich date: br; echo gmdate (M d Y H:i:s, time()), br; echo gmdate (YmdHis, time()), br; ? At 11:21 AM 2/7/2002 -0600, Frank Miller wrote: Hello, Since I'm the only one who uses php at work I run into a little problem and was hoping maybe someone could help me. I've set up a Mysql database that has an event time. I've set the field in the table as: eventtime time DEFAULT 00:00:00. When I go to print the eventtime I'm pulling it out of Mysql with the following code snippet while ($row = mysql_fetch_array($result)) { $dateofevent = $row[dateofevent]; $sponsor = $row[sponsor]; $location = $row[location]; $eventtime = $row[eventtime]; $contact = $row[contact]; All of this works. I connect to Mysql and pull out the data. Then I'm formatting $eventtime with $etime = date(g:i a, $eventtime); The problem is that when I print $etime in an html table all I get is 6:00 pm for all the events. When I print $eventtime I get the correct time that is stored in Mysql. My question is am I doing this correctly or do I need to use another function to format a mysql time. Thanks in advance. Frank Miller Computer Specialist and Webmaster Technology and Distance Education Texas AM University-Texarkana 2600 North Robison Rd Texarkana, Texas 75501 Phone: 903-223-3156 Fax: 903-223-3139 Office: 165 -- 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: Writing PHP files from inside a PHP file
yea, evals() exactly what i needed, tanx J Smith [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... include() and require() were suggested, but you may also want to look into eval(), which parses a string as PHP code and returns the parsed PHP. Sounds like what you're looking for. (I.e. storing PHP code in a database, right?) J Georgie Casey wrote: I want to extract information from a database table and create a half-static, half-dynamic PHP page from the info. I want to store the template for the new page in an external file with tags in the places where I want variables to be printed. What;s the best of achieving this?? I tried fread but that just printed ? echo $variable; ? to the static page instead of replacing it with the value. Any suggestions? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting a MYSQL time
I would let mysql do the work: select *,date_format(dateofevent,%H:%i %p) as date_formatted from table... - Mark On Thu, 07 Feb 2002 11:21:13 -0600, Frank Miller wrote: Hello, Since I'm the only one who uses php at work I run into a little problem and was hoping maybe someone could help me. I've set up a Mysql database that has an event time. I've set the field in the table as: eventtime time DEFAULT 00:00:00. When I go to print the eventtime I'm pulling it out of Mysql with the following code snippet while ($row = mysql_fetch_array($result)) { $dateofevent = $row[dateofevent]; $sponsor = $row[sponsor]; $location = $row[location]; $eventtime = $row[eventtime]; $contact = $row[contact]; All of this works. I connect to Mysql and pull out the data. Then I'm formatting $eventtime with $etime = date(g:i a, $eventtime); The problem is that when I print $etime in an html table all I get is 6:00 pm for all the events. When I print $eventtime I get the correct time that is stored in Mysql. My question is am I doing this correctly or do I need to use another function to format a mysql time. Thanks in advance. Frank Miller Computer Specialist and Webmaster Technology and Distance Education Texas AM University-Texarkana 2600 North Robison Rd Texarkana, Texas 75501 Phone: 903-223-3156 Fax: 903-223-3139 Office: 165 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Formatting a MYSQL time
Unless the $eventdate coming being pulled from your database a bonified Unix timestamp the date() function will not work. I don't like MySQL functions so I've always used $timestamp = mktime() to create the timestamp. Then plug that value into a field defined as INT(14). Use $eventdate = date(g:i a, $timestamp) to convert the timestamp into the desired English format. The mktime() function can also be used to convert from English time back into a timestamp.. but it has kind of a weird format. It takes six parameters and if you choose to use them they are all required. $timestamp = mktime($hour, $min, $sec, $month, $day, $year); Hope this helps some. -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com -Original Message- From: Frank Miller [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 10:21 AM To: [EMAIL PROTECTED] Subject: [PHP] Formatting a MYSQL time Hello, Since I'm the only one who uses php at work I run into a little problem and was hoping maybe someone could help me. I've set up a Mysql database that has an event time. I've set the field in the table as: eventtime time DEFAULT 00:00:00. When I go to print the eventtime I'm pulling it out of Mysql with the following code snippet while ($row = mysql_fetch_array($result)) { $dateofevent = $row[dateofevent]; $sponsor = $row[sponsor]; $location = $row[location]; $eventtime = $row[eventtime]; $contact = $row[contact]; All of this works. I connect to Mysql and pull out the data. Then I'm formatting $eventtime with $etime = date(g:i a, $eventtime); The problem is that when I print $etime in an html table all I get is 6:00 pm for all the events. When I print $eventtime I get the correct time that is stored in Mysql. My question is am I doing this correctly or do I need to use another function to format a mysql time. Thanks in advance. Frank Miller Computer Specialist and Webmaster Technology and Distance Education Texas AM University-Texarkana 2600 North Robison Rd Texarkana, Texas 75501 Phone: 903-223-3156 Fax: 903-223-3139 Office: 165 -- 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] curl question
hi. i've been experimenting with curl and it has been working great. i was wondering though if anybody knows why an extra 0 value is being tacked on to the end of the post. here is the example: ? $test=i hope this worked; $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, http://www.mydomain.com/testing.php;); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, v1=$testv2=20v3=30); curl_exec($ch); curl_close($ch); ? and then the testing.php is: ? echo $v1 $v2 $v3; ? the output, however is: i hope this worked 20 30 0 how do i get rid of the extra 0? i'm not sure i need to for my purposes, but i am curious. thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Formatting a MYSQL time
well, from what you show here you are trying to use a MYSQL timestamp format string in a UNIX Timestamp String. what you need to do is add add this to your select statement. SELECT UNIX_TIMESTAMP(replace with column name) From Table; you want to convert the MYSQL timestamp into a UNIX timestamp. then just through that into the date function and if should work. Jim Lucas www.bend.com - Original Message - From: Frank Miller [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 9:21 AM Subject: [PHP] Formatting a MYSQL time Hello, Since I'm the only one who uses php at work I run into a little problem and was hoping maybe someone could help me. I've set up a Mysql database that has an event time. I've set the field in the table as: eventtime time DEFAULT 00:00:00. When I go to print the eventtime I'm pulling it out of Mysql with the following code snippet while ($row = mysql_fetch_array($result)) { $dateofevent = $row[dateofevent]; $sponsor = $row[sponsor]; $location = $row[location]; $eventtime = $row[eventtime]; $contact = $row[contact]; All of this works. I connect to Mysql and pull out the data. Then I'm formatting $eventtime with $etime = date(g:i a, $eventtime); The problem is that when I print $etime in an html table all I get is 6:00 pm for all the events. When I print $eventtime I get the correct time that is stored in Mysql. My question is am I doing this correctly or do I need to use another function to format a mysql time. Thanks in advance. Frank Miller Computer Specialist and Webmaster Technology and Distance Education Texas AM University-Texarkana 2600 North Robison Rd Texarkana, Texas 75501 Phone: 903-223-3156 Fax: 903-223-3139 Office: 165 -- 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] Using functions before they're defined
What happened when you tried? -Original Message- From: Brad Harriger [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 8:22 AM To: [EMAIL PROTECTED] Subject: [PHP] Using functions before they're defined How does PHP 4 locate function definitions if the function is called before it is defined? -- 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] Preventing Identical Form Fields
Thanks y'all! Everything's workin great now. Jon Haworth wrote: With javascript onSubmit, but that ain't php, so with if($form1==$form2){sendthembackwitherrors()} Thanks Chris, but I have about 10 different fields and want to make sure none of those are the same. You could brute force it: $ok = true; if ($field1 == $field2 || $field1 == $field3 || ) $ok = false; if ($field2 == $field3 || $field2 == $field4 || ) $ok = false; if ($ok == false) sendThemBackWithErrors (); Or you could use array_unique: // Substitute $_GET if you're using GET instead of POST ;-) if ($_POST != array_unique ($_POST)) sendThemBackWithErrors (); I'm not sure if this second one would work - I don't know if you can do straight comparisons of arrays - but the idea is to check that the submitted array is the same as the array with all the duplicates removed (if it isn't, there was a duplicate). HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamic form fields
hey.. anyone got any suggestions on how to have a form build dynamically? where a user can define his fields and store the form data in mysql? Regards, Kunal Jhunjhunwala Minds think with ideas, not information. No amount of data, bandwidth, or processing power can substitute for inspired thought. - Clifford Stoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Formatting a MYSQL time
On Thu, 2002-02-07 at 10:47, Kevin Stone wrote: Unless the $eventdate coming being pulled from your database a bonified Unix timestamp the date() function will not work. I don't like MySQL functions so I've always used $timestamp = mktime() to create the timestamp. Then plug that value into a field defined as INT(14). Use $eventdate = date(g:i a, $timestamp) to convert the timestamp into the desired English format. The mktime() function can also be used to convert from English time back into a timestamp.. but it has kind of a weird format. It takes six parameters and if you choose to use them they are all required. Minor correction: http://www.php.net/mktime Arguments may be left out in order from right to left; any arguments thus omitted will be set to the current value according to the local date and time. Torben $timestamp = mktime($hour, $min, $sec, $month, $day, $year); Hope this helps some. -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php static or dynamic?
I have redhat 7.1, apache 1.3.22, php 4.1.1 I have installed php and other apache modules as static. I have installed all php modules static. I also installed java module as static (--with-java=..) But I cannot enable java in php.ini Also, lib_phpjava.so library is not created. Only lib_phpjava.a is created. Can I use both static and dynamic modules together? How can I make lib_phpjava.so from lib_phpjava.a? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Formatting a MYSQL time
Ah.. much appreciated. :) -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] On Behalf Of Lars Torben Wilson Sent: Thursday, February 07, 2002 12:43 PM To: Kevin Stone Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Formatting a MYSQL time On Thu, 2002-02-07 at 10:47, Kevin Stone wrote: The mktime() function can also be used to convert from English time back into a timestamp.. but it has kind of a weird format. It takes six parameters and if you choose to use them they are all required. Minor correction: http://www.php.net/mktime Arguments may be left out in order from right to left; any arguments thus omitted will be set to the current value according to the local date and time. Torben $timestamp = mktime($hour, $min, $sec, $month, $day, $year); Hope this helps some. -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need XML info for PHP -- XML Newbie
Hello everyone, I'm a newbie when it comes to XML. I need to know if there's an easy-to-understand documentation/tutorial online that will help me understand how PHP and XML work together, what software technologies PHP uses to parse XML/XSLT documents, and how to actually build PHP to have support of these parsers available on the Win32 platform. Can anyone help me find some resources? I went to www.php.net and they assume too much about their audience, and therefore it's hard to understand their documentations sometimes. Thanks in advance. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need XML info for PHP -- XML Newbie
On Thursday, February 7, 2002, at 03:03 PM, Navid Yar wrote: Hello everyone, I'm a newbie when it comes to XML. I need to know if there's an easy-to-understand documentation/tutorial online that will help me understand how PHP and XML work together, what software technologies PHP uses to parse XML/XSLT documents, and how to actually build PHP to have support of these parsers available on the Win32 platform. Can anyone help me find some resources? I went to www.php.net and they assume too much about their audience, and therefore it's hard to understand their documentations sometimes. Thanks in advance. Ready for a page that has over ten tutorials on the subject? They range in difficulty from Intro to XML to Setting up SOAP/RPC datasystems (or something like that). http://www.devshed.com/Server_Side/XML I just got that in the mail from DevShed a few seconds ago. 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
[PHP] array variable passing in session.
Hi, I am running into a problem that I can't figure out the solution to. So I'm hoping that someone can give me some pointers here. I have two files (see below): verify.php and edit.php The job of verify.php is basically to verify that a user is in the database before allowing him/her to edit the information. The information retrieved is saved to arrary varaiable $row. I do a session_register() to $row and that information should be passed to subsequent pages that has session_start(), right? However, when I tried to print out the information again in edit.php, it doesn't seem to register it in. At first I thought it was the array problem, so I put the array variable $dummy to test it out and that can be reigstered and retrieved correctly. What am I doing wrong??? Also, how do I redirect to a page automatically once the user is verfied (right now I have to ask the user to click on a link to redirect). Thanks in advance, Peter /*** verify.php / ?php session_start(); include(config.php); mysql_connect($host_name, $user_name, $passwd) or die(Unable to connect to $hostname.); // select database on MySQL server mysql_select_db($db_name) or die(Unable to select databse.); // formulate the query $sql_statement = SELECT * FROM $table_name WHERE user_id = '$user_id' AND password = '$password'; $result = mysql_query($sql_statement) or die(Unable to execute query.); $num_of_rows = mysql_num_rows($result); /* XXX: test array variable...take out later */ $dummy = array(one, two, three); session_register(dummy); if (!$num_of_rows) { echo h3User ID and password missmatch, try again!/h3; } else { while ($row = mysql_fetch_array($result)) { session_register(row); // register information retrieved from MySQL } printf(Successfully Logged In! a href=\edit.php\Click Here/a); echo br; } ? /* edit.php */ ?php session_start(); foreach ($dummy as $val) { echo $val . br; } foreach ($row as $data) { echo $data . br; } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to Configure the MySql Database?
Hi, I recommend using a nice program call PHPTriad. It's painless and you don't have to worry about anything. The only downside is that it cofigures PHP as CGI module only. -Peter Karadamoglou Kostas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I don't know to configure MySql Database On Apache Server in Windows System. What I must do? (step by step) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating Tab-Delimited Text File
Greetings All, What I want to do is create a tab-delimited text file for download from records in a database. I am not sure on how to do this. So what I want to do is as follows. ON a page a button is clicked. Script is activated that pulls records from a database. From these records a tab-delimited text file is created. A save dialogue box appears so the user to save the text file to his harddrive. Thanks Phillip Those who give up essential liberty for a little safety, deserve neither liberty nor safety. - Ben Franklin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail stopped working - Somewhat Urgent
All of a sudden Mail through PHP just stopped working, we can do it through the command line, but refuses to work in PHP. Any ideas? Thanks, Bryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to keep form inputs from being cleared
I posted about this a few days ago. I received several responses but none of them were very helpful (thanks for the effort though). I finally figured out what it was by process of elimination. At the top of my registration form, I put session_start() just like I did for all my other scripts. Well it turns out that by doing this, for some reason, it clears the form. I have a hunch that the cookie request by session_start() has something to do with it. Well, the only reason someone would be at the registration form would be if he/she was not a member, therefore the session ID would be pointless. This is the major flaw of PHP's built in sessions imho: If a user disables cookies, the session functions assign the session ID to the constant SID. However, if the SID is not passed on religiously, a new session will be made. In an instance like this where session_start() cannot be used, you can't pass on the SID. It seems like I'm just going to resort to requiring that my users enable session cookies. The hastle of making the code to use both SID and/or cookies just doesn't seem worth it. If anyone has any ideas of a resolution to this problem, feel free to post here or email me.
RE: [PHP] Need XML info for PHP -- XML Newbie
Thanks, Erik! This will do nicely. :) -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:07 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Need XML info for PHP -- XML Newbie On Thursday, February 7, 2002, at 03:03 PM, Navid Yar wrote: Hello everyone, I'm a newbie when it comes to XML. I need to know if there's an easy-to-understand documentation/tutorial online that will help me understand how PHP and XML work together, what software technologies PHP uses to parse XML/XSLT documents, and how to actually build PHP to have support of these parsers available on the Win32 platform. Can anyone help me find some resources? I went to www.php.net and they assume too much about their audience, and therefore it's hard to understand their documentations sometimes. Thanks in advance. Ready for a page that has over ten tutorials on the subject? They range in difficulty from Intro to XML to Setting up SOAP/RPC datasystems (or something like that). http://www.devshed.com/Server_Side/XML I just got that in the mail from DevShed a few seconds ago. 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] question about switch function
Hello, I am trying to find out if a string is in a line being read from a file. I should use strstr for this I am pretty sure. I want to do something like this: switch(strstr($line, case argument)) but I don't know if it is possible. For example, I am looking for Zip in a line but it will not find it using the code below. Any suggestions? I know I am being as clear as mud on this :) $fd = fopen(mls1.txt, r); while(!feof($fd)) { $line=fgets($fd, 4096); switch($line) { case Zip: echo found zip; //$line2=fgets($fd,4096); $zip=$line; break; case Remarks: //$line2=fgets($fd,4096); $neighborhood=$line; break; case Taxes: //$line2=fgets($fd,4096); $address=$line; break; } } fclose($fd); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] odbc_connect vs. DB2 (Connection speed varies)
Hi! Have anyone ever have problem with the connection speed using PHP and DB2? I'm a little puzzled by the odbc_connect reaction. There were very many people using the DB2 on the website. The most I can have is from 5 to 10 people. For some people, they get quick result from the database using PHP and for some other, it take longer and get the connection timeout saying Unable to connect to Database!!!. What's up with that? Here's the PHP code I use for the odbc_connect to IBM DB2 (database). Would include the SQL_CUR_USE_ODBC help? I read that part on the PHP website under the odbc_connect. -- clip here -- $database = TEST_DB; $user = db2inst1; $pass = ibmdb2; $cid = @odbc_connect($database,$user,$pass) or die(Unable to connect to Database !!!) ; if ($cid == 0) { exit(brbrfont color='red'bUnable to connect to Database !!!/b/fontbrbr); } -- clip end -- Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question about switch function
try it like this: switch(true){ case strstr($line,zip): echo found zip; break; } On Thu, 7 Feb 2002 14:29:45 -0600, Chuck Barnett wrote: Hello, I am trying to find out if a string is in a line being read from a file. I should use strstr for this I am pretty sure. I want to do something like this: switch(strstr($line, case argument)) but I don't know if it is possible. For example, I am looking for Zip in a line but it will not find it using the code below. Any suggestions? I know I am being as clear as mud on this :) $fd = fopen(mls1.txt, r); while(!feof($fd)) { $line=fgets($fd, 4096); switch($line) { case Zip: echo found zip; //$line2=fgets($fd,4096); $zip=$line; break; case Remarks: //$line2=fgets($fd,4096); $neighborhood=$line; break; case Taxes: //$line2=fgets($fd,4096); $address=$line; break; } } fclose($fd); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Win32 PHP + PostgreSQL support
Doesn't php for windows come with pgsql already? extension=php_pgsql.dll Gary Todor Stoyanov wrote: Any ideas how to get PHP for win32 with PostgreSql support? Cheers Todor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] opening a ssl socket...
hi. i need to be able to open an ssl 'plus' socket (authorize.net told me this) to post data. i can use curl to post data, but how do i use curl to open an ssl 'plus' socket? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] some doubts on telnet
okay, i'm new in PHP developing and i'm having a few problems with a script i'm building... i work at an ISP what i need is a script that will add users to the company database. what i can't get is my PHP server (IP 18) to connect to the RAS server (IP 21). i've checked all the documentation i have and found nothing that would help so i hope i can get some clues in here. Thanks, Aderson Schroder [EMAIL PROTECTED] http://www.creativenet.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpinfo
can I limit the information shown in phpinfo function? the info it gives is a little risky for me thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Web Hosts and PHP 4.10 +
I know the subject of web hosts that support PHP comes up frequently - but here's a twist: After going through the archives, and checking out many, many hosts, I haven't found a web host that is up to PHP 4.10 or better. Most seem stuck at 4.04 or, at best, 4.06. Since 4.10 made some important changes/improvments, (and most of my code already takes advantage of this), I'd like to find a host supporting 4.10 and MySQL. I understand I could run a dedicated server, but I'm trying to save that as a last resort right now. Any recommendations? Thanks. -- Ed Marczak [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cron Job
Hi, How do i set cron job on Red Hat Linux. Looking forward for yours response. karthikeyan.
Re: [PHP] Creating Tab-Delimited Text File
Phillip S. Baker wrote: Greetings All, What I want to do is create a tab-delimited text file for download from records in a database. Construct then execute the desired query http://www.php.net/manual/en/function.mysql-query.php Loop through each record, putting each row into an array, then implode the array with tabs. http://www.php.net/manual/en/function.mysql-fetch-row.php http://www.php.net/manual/en/function.implode.php The user can then save the resulting output manually. Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Creating Tab-Delimited Text File
Which part are you having trouble with, specifically? The task as you've described it is very straightforward, almost pseudo-code. :) -Andy -Original Message- From: Phillip S. Baker [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:32 PM To: PHP Email List Subject: Creating Tab-Delimited Text File Greetings All, What I want to do is create a tab-delimited text file for download from records in a database. I am not sure on how to do this. So what I want to do is as follows. ON a page a button is clicked. Script is activated that pulls records from a database. From these records a tab-delimited text file is created. A save dialogue box appears so the user to save the text file to his harddrive. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cron Job
This is an inappropriate question for this list. I would suggest either a book on learning Unix (almost any flavor will do) or seeking any number of Linux mailing lists for questions concerning the OS. -Original Message- From: karthikeyan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:32 PM To: [EMAIL PROTECTED] Subject: [PHP] Cron Job Hi, How do i set cron job on Red Hat Linux. Looking forward for yours response. karthikeyan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: Creating Tab-Delimited Text File
At 01:42 PM 2/7/2002, Andrew Chase wrote: Which part are you having trouble with, specifically? The task as you've described it is very straightforward, almost pseudo-code. :) -Andy I know very well how to do the Db query and then loop through the results to display the info on an HTML page. However I have not done the part about actually creating a new file in the text format make sure the results are tab-delimited and then make it available for download. Can you help me with that part specifically? Thanks Phillip -Original Message- From: Phillip S. Baker [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:32 PM To: PHP Email List Subject: Creating Tab-Delimited Text File Greetings All, What I want to do is create a tab-delimited text file for download from records in a database. I am not sure on how to do this. So what I want to do is as follows. ON a page a button is clicked. Script is activated that pulls records from a database. From these records a tab-delimited text file is created. A save dialogue box appears so the user to save the text file to his harddrive. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Blessings Phillip Those who give up essential liberty for a little safety, deserve neither liberty nor safety. - Ben Franklin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Quote in input tag value?
If there is a quote mark in an input tags value what is the correct way to print the quote? input type=text value=quotMy Quotequot or input type=text value=\My Quote\ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Quote in input tag value?
I prefer: print input type=text value=\My Quote\; -Original Message- From: Nathan Cassano [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 3:54 PM To: [EMAIL PROTECTED] Subject: [PHP] Quote in input tag value? If there is a quote mark in an input tags value what is the correct way to print the quote? input type=text value=quotMy Quotequot or input type=text value=\My Quote\ -- 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