[PHP] Inclusion error
> Failed opening '/var/www/html/BOOKS/newbooks.php' for inclusion > (include_path='.:/php/includes:/usr/share/php') in Unknown on line 0 > > I am getting the following error, when the file newbooks.php is invoked. > The first lines in this entire file starts with the 4 lines of comments. What could be the problem here. > > Thanks in advance, > Sachin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem on file_exists()
Jack, try using forward slashes instead of backslashes;eg $fp = fopen("//nedcoraa/pdf_reports/dealing/filename.ext", "r+"); Cheers -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 16 July 2002 5:02 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Problem on file_exists() Dear all I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing room\report) it stores a lot of PDF reports in there. I'm trying to use the file_exists() function to detect if a specific file exist in this folder, but i got a problem is : It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go through (dealing room) folder. i had made test on it, i moved a file into (\\nedcoraa\pdf_reports), then php can detect it, but if i move it to (\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why? I'm using php in windows NT IIS environment! Please help me! -- Thx a lot! Jack [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] Problem on file_exists()
Dear all I had a folder which the path is : (\\nedcoraa\pdf_reports\dealing room\report) it stores a lot of PDF reports in there. I'm trying to use the file_exists() function to detect if a specific file exist in this folder, but i got a problem is : It seems that php can go through (\\nedcoraa\pdf_reports) but it can't go through (dealing room) folder. i had made test on it, i moved a file into (\\nedcoraa\pdf_reports), then php can detect it, but if i move it to (\\nedcoraa\pdf_reports\dealing room), then it can't detect the file! why? I'm using php in windows NT IIS environment! Please help me! -- Thx a lot! Jack [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit code
The Snoopy class would do this nicely. http://snoopy.sourceforge.net/ That may be too complicated of class as you mentioned, but it's probably the best solution for you, and once setup, your task will be very easy to do with this class. I had a similar situation where I needed to do a simple form post, and found some very basic code, but it slowed by app down so much it had to be replaced eventually anyway. HTH, Peter Janett New Media One Web Services New Upgrades Are Now Live!!! Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1 Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25, Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43 PostgreSQL coming soon! http://www.newmediaone.net [EMAIL PROTECTED] (303)828-9882 - Original Message - From: "Martin Towell" <[EMAIL PROTECTED]> To: "'MindHunter'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, July 16, 2002 12:33 AM Subject: RE: [PHP] Submit code > three methods that I can think of: > 1. header("location: url"); > 2. > 3. Hidden form + JavaScript > > -Original Message- > From: MindHunter [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 16, 2002 4:33 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Submit code > > > I am looking for PHP code that will submit (post) a form automaically to a > ANOTHER php page. I do not want to press a submit button. I have found a > class at PHPClasses but it is too complicated for my needs. What is the > simplest way of doing this? What is the theoretical approach? > > The reason I need this is that I have a table output from a database after > one submits 'n list of variables (form inputs). I want to update a graph in > another Iframe automatically without clicking on another submit button. > > Tx > MH > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] integrating usenet into http? how is this done???
Hello andy, Well i do work on the same project. Now i got little lost with headers. If anyone can help me I'll be glad. as for all othe issues like updating databases they are solved :) With now cron job :) Monday, July 15, 2002, 7:27:19 PM, you wrote: >> It would be relatively straight-forward to have a PHP script run a> periodically, >> read from an NNTP server .. a> ok sounds logical. Don't have any experiance on doing anything nntp related a> in php. a> There are some questions I am wondering about: a> - do I have to compile php with a special flag to do this? a> - how is it possible to run a php script periodicly? a> - can you mak a short example how to read from a nntp server? a> Thanx for your help, a> Andy a> "Stuart Dallas" <[EMAIL PROTECTED]> schrieb im Newsbeitrag a> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> On Monday, July 15, 2002, 2:42:24 PM, Stuart Dallas wrote: >> > On Monday, July 15, 2002, 1:55:44 PM, "Andy" wrote: >> >> Has anybody an idea how they do this. >> >> It would be relatively straight-forward to have a PHP script run a> periodically, >> read from an NNTP server and add new posts into the forum database. This a> is how >> I would guess that they do it. >> >> -- >> Stuart >> -- Best regards, Latexmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit code
three methods that I can think of: 1. header("location: url"); 2. 3. Hidden form + JavaScript -Original Message- From: MindHunter [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 4:33 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit code I am looking for PHP code that will submit (post) a form automaically to a ANOTHER php page. I do not want to press a submit button. I have found a class at PHPClasses but it is too complicated for my needs. What is the simplest way of doing this? What is the theoretical approach? The reason I need this is that I have a table output from a database after one submits 'n list of variables (form inputs). I want to update a graph in another Iframe automatically without clicking on another submit button. Tx MH -- 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] Submit code
I am looking for PHP code that will submit (post) a form automaically to a ANOTHER php page. I do not want to press a submit button. I have found a class at PHPClasses but it is too complicated for my needs. What is the simplest way of doing this? What is the theoretical approach? The reason I need this is that I have a table output from a database after one submits 'n list of variables (form inputs). I want to update a graph in another Iframe automatically without clicking on another submit button. Tx MH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Complex session issue
I have a situation where I have one browser window open for lets say web application 'x'. Now I want my user to goto application 'y' on the same domain in a new browser window by passing the authentication information from application 'x' to application 'y'. I obviously donot want my session variables to be continued in application 'y'. But at the same time I donot want to destroy the session of my application 'x' Since they r in two COMPLETELY separate browser windows, both sessions should logically be separate. But for some reason IE & netscape take a new window in the same Instance. Is there any way I can open a new browser instance, such that the same session is not continued and a new session in created leaving the old session as it is? Or is there any other work around for the same? - Divyank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DEV] OOH Forms ?
Hello, There is such a library, you can find it in PEAR. It needs some cleanup and improvements though. Arnaud. > Hi there > > I came across with some reference indicating there was a library called OOH > forms, wondering if anyone knows about the status of that lib, or has those > features been incorporated into some others? OR simply, Is there any > similar one, thanks. > > /dl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP and Jigsaw
>With Jigsaw's debug facility Enabled, I get two lines on the page and the >same two lines (without html tags of any sort) in "view source" display: >X-Powered-By: PHP/4.2.1 >Content-type: text/html If these two lines are showing up in the BROWSER, then something is pretty wrong... They're supposed to be headers... So something could be sending out a blank line or something before these, somehow... If they are just showing up in debugging output, and they *ARE* headers, then PHP *IS* getting invoked, and then dying when it tries to execute your code. Try using *JUST* this in your PHP document: It's pretty hard to screw up something that short, so you'll know the PHP is valid :-) And, if it works, you get a wonderfully long HTML document spewed out. It's so fun to type so little and get so much :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Multi-Part PostToHost?
> fputs($fp, "Content-Type: multipart/form-data; boundary=AaB03x\n"); > fputs($fp, "--AaB03x\n"); > fputs($fp, "Content-Disposition: form-data; name="variable1"\n"); > fputs($fp, "\n"); > fputs($fp, "Variable 1 Data\n"); > fputs($fp, "--AaB03x\n"); > fputs($fp, "Content-Disposition: form-data; name="files"; >filename="myFile.xml"\n"); > fputs($fp, "Content-Type: text/plain\n"); > fputs($fp, "\n"); > fputs($fp, "... contents of myFile.xml ...\n"); > fputs($fp, "--AaB03x--\n"); That looks quite reasonable, EXCEPT: It's *POSSIBLE* that "Aa03x" will be *IN* the document... I'd choose a longer and more random boundary, and maybe even be 100% sure by using something like this: $myfile = file('/full/path/to/myFile.xml') or die("Could not open myFile.xml"); $myfile = implode('', $myfile); $boundary = md5(uniqid('')); # Hey, the odds are one in a zillion, but why not? while (strstr($myfile, $boundary)){ $boundary = md5(uniqid('')); } And I think you need a different boundary for *EACH* part of the multipart stuff... But maybe that's just me thinking wrongly... Other than that, I'm guessing that you *MIGHT* need to somehow "escape" the contents of the data... I dunno if browsers and web-servers expect that data to be uuencoded, or base64 encoded, or anything like that... But if they do, and you don't do that, well, it ain't gonna work. PHP has the functions for doing it, I just don't know if you need them or which one... But you're definitely on the right track, and you're down to minutia at this point. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Installing MYSQL on Windows
>Can anyone tell me steps for installing MYSQL on >windows ?? 1. Download from http://mysql.com 2. Follow the instructions in the download. If you get stuck, you've *GOT* to say which *VERSION* of Windows, since they are all too damn different. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Solaris 8 + php 4.2.1 setup problem
>I am trying to get PHP 4.2.1 installed on Solaris 8 with apache 1.3.22. >It installed ok, but when I restart apache I get the follow error in my >error_log file. > >/usr/local/apache/logs/error_log >[Thu Jul 11 13:13:11 2002] [notice] Apache/1.3.22 (Unix) PHP/4.2.1 >configured -- resuming normal operations >[Thu Jul 11 13:13:11 2002] [notice] Accept mutex: fcntl (Default: fcntl) >[Thu Jul 11 13:13:11 2002] [alert] Child 20902 returned a Fatal error... > >Any ideas of what to try next. Didja search the archives and http://bugs.php.net for "Accept mutex: fcntl"?... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: newbie: mysql statement
>I want to update the most recent record (based on the timestamp in field >posted) where the parent field == a specified value (in a table called >header). > >I tried the following mysql statement: > >"UPDATE header WHERE parent = '$this->postid' ORDER by posted SET >parent='$this->parent' LIMIT1"; > >but apparently you can't use ORDER in an UPDATE statement. If I take order >out, the statement works. That being true (and please correct me if its >not) how can I ensure that the newest record is the one being acted upon? Perhaps: where posted = max(posted) assuming no *TWO* are ever posted within the same second, which is a very dangerous assumption for a busy site... Can't you just pass in the ID of the actual header you want changed, instead of only its parent? -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: outputting a pdf file to IE browser? POST/GET method bug or not?
>this is fine under netscape but IE has problems. > >consider the following code: >but this code which only has the difference of using the POST method >instead of the GET metod results in a "file is corrupt" message! Assuming there's not something more subtle going on... My best rationalization is that Microsoft somehow thinks that the only valid response to a POST is an HTML document... Maybe try using Keep-Alive or whatever and sending out some HTML as well as the PDF, just to see... Or, just live with GET and move on with life :-) Actually... Is the *NAME* of the ACTION= file ending in .pdf? If it's not, make it be .pdf, and use ForceType to force PHP to parse it. Perhaps IE is just upset that you told it to expect an HTML file with the URL, but then sent a PDF. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP 4.3.x..
>One of the threads above Speak of PHP 4.3 I was not >aware that it existed... Is it still in its Testing stages? >How come its not on the PHP Website? Are there any >great modifications to it? If other need to look even farther ahead, http://cvs.php.net is a safe bet for the most recent developments for 'way in the future. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Detecting network connections
>Is there any way I can set up a php script so that it will detect the >login of the current Netware user on a PC and use that user's >information to customize a greeting for the user? Almost for sure, no. But, to be 100% sure, do this: And surf from that Netware box to it. If Netware is telling PHP something useful (unlikely), PHP will spew it out there. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: dio_seek, dio_tell
>Hi, >I have two questions: >what is the meaning of (int type) return value of dio_seek() function in PHP ? >second question: >how can I get the position in file, pointed by file descriptor (dio_*() )? >In C/C++ language, this is implemented in ftell function. http://php.net/fseek http://php.net/ftell -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: fputs - need help!
> >Hi > >I use this line > >fputs ($sysname_log, "$time - SystemName: $sysname\n"); > >I would like to get a log file, and everytime I refresh this page it will >make a new line and write >$the local time - SystemName: $sysname >So after a while it will look like this > >$the local time - SystemName: $sysname >$the local time - SystemName: $sysname >$the local time - SystemName: $sysname > >BUT, this is not working, I don´t get a new line, everything is on the same >line. Why?? >I use WIN2K and IIS. The Windows newline characters are "\r\n" not just "\n" -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: ignore_user_abort question
>Hi, got a question. > >What happend if ignore_user_abort is true, and the user closes the window? > >Also, i tried, but i push the stop button, and the script stops, shouldn >ignore that?. I *THINK* ignore_user_abort() is only useful with some browsers... Or, perhaps, it relies on Apache figuring out that the connection is dead, and reporting back to PHP, and there's a fair amount of time-lag in that process... Or, perhaps, it never really worked very well... All I now for sure is that I have this vague idea in my head that it's just not something you can really rely on. It's still convenient to kill lengthy processes, but not for mission-critical knowledge of the HTTP status. If you *NEED* to be sure, I think you're stuck with Java applet/servelet setup, from what I hear. (Strictly heresay.) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: IF inside LOOP?
>Ive been fooling around with a LOOP which should show one or more text >string stored in separate rows in a DB. The trick would we to separate >them with commas (,) when theres another string to show or end it with >a period (.) if no other row is found according to the SELECT criteria. >This is what I have so far: > >for ($m=0; $m<$num_rows2; $m++) >{ >$row2 = mysql_fetch_array($result2); > >echo $row2[devlanguage]; > >if ($m < $num_rows2) >{ >echo ", "; >} >else >{ >echo "."; >} >} > >The problem is that the LOOP stops as its told to do, keeping the ELSE >statement from doing its work, resulting in comma separated string as >it should, but also add an extra comma at the end of it instead of a >period. What approach should I use? This is a case where doing echo as you go is not so good, because you can't take it back :-) $output = ''; while (list($devlanguage) = mysql_fetch_row($result2)){ $output .= "$devlanguage, "; } # Strip off final comma: $output = substr($output, 0, -2); $output .= "."; echo $output; -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: DOM XML : experimental ?
>I am planning to use PHP to develop some scripts that will need to >create and manipulate html pages. One of the things that will be >created is a DOM tree of the html. > >After reading the manual I've found that php supports the event-driven >and dom xml, but with the latter tagged as EXPERIMENTAL. I've also >noticed that as of 4.3.0-dev (which I am using) the api has changed. > >So I'd like to know how "experimental" (also stable) this support is and >suggestions regarding this issue and DOM itself. > >One of the main issues is that I'll need to cope with html (not xml) and >mostly not "well-formed". Disclaimer: The following statements are based strictly on heresay: I don't think the DOM in PHP lets you have any "hooks" for mal-formed XML. It either is well-formed, or DOM pukes all over your pretty blue suede shoes. I think you may be better off writing a SAX parser-based XML algorithm. You'll be able to deal with the idiosyncracies of your HTML-coders better, and to recover with more flexibility from the errors. I think DOM will give you a line number and column (character within the line) number, and maybe even an XML error message. But you won't be able to convince it to just "accept" the HTML and move on with life as it is. You'll be forced to "fix" the HTML to match XML specs, which, like is just wrong, since HTML isn't XML. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Training / Courses in Australia
>Would anyone know of any PHP training or courses in Australia... Luke and Laura :-) run a fabulous PHP program through the Royal Mumble Iblle T-something... Royal Melbourne Institute of Technology? >Also for the devolopers... > >Is there at present, or a future plan for a PHPCE >A certified engineer :) > >Just a thought since everyone else has them Enh. I mean, to me, an MCSE proves nothing of any value, really. That's just my opinion, though. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Creating an PHP program and C program
>I wrote some times ago an library to draw graphics in 2 and 3 D, but >this sources are write in C, whats the procedures I need to use this rotines >in PHP. You need to create a PHP "extension" library. Samples are in Rasmus' talks at http://conf.php.net They are Un*x .so files on steroids -- IE, with some PHP wrappers to make the PHP-callable. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: hello the list
>i'm new and i'm trouble with this code :'( can U help me please ?? This would be much easier if you told us what was going wrong... I'll point out the ones I see, but it's just a guessing game (not a very fun guessing game). >while ($cd_tbl = mysql_fetch_array ($result)) >{ >if(is_int("$cd_id") = TRUE) This will never be TRUE... "$cd_id" *FORCES* $cd_id to be a string. And, actually, you want == here, not = The = is used to store a value in something. The == is used to test for equality Since it comes from the database, $cd_id will probably always be a string anyway... You can't do this: >echo "$cd_id"; ^^^ ^ ^ ||\ | | PHP seesAnd \ Way too confused by now... this as the this \ beginning is the \ of a string.*END* of\ that This is junk... string. You want: echo "$cd_id"; Or, since HTML accepts ' as well as ", so long as they are 'matched' echo "$cd_id"; Or, if you only care about browsers working, and not some pie-in-the-sky W3C proclamation of style: echo "$cd_id"; You should, however, realize that many, many, many people will *NOT* have Verdana font installed. They will see that icky Times font. You can list multiple fonts: echo "$cd_id"; 'Course, if you start putting spaces in the font, you *NEED* the quotes: echo "$cd_id"; You may also want to tack \n at the end of every string, so when you do "View Source" in your browser, you can see something intelligible. echo "$cd_id\n"; -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: is_null question
>It looks like I should be using is_null(), but I'm not sure how to use it, >especially since all of this is embedded in a print statement. Disclaimer: is_null() is new-fangled, and while I assume it matches up with SQL NULL, it's *POSSIBLE* that PHP's NULL is for something entirely different than SQL NULL. Read the docs. >Instead of just printing Email: $row[1], I'd like to test whether it's null >first--maybe something like this? > >if (is_null($row[1])) print " " else print ("Email: $row[0]") > >but can I put that line inside of another print statement? if so, do I have >to escape the quotation marks? Please forgive my confusion--I'm new to >programming in general and PHP in particular. Several options are available. In all cases, I've replaced the if/else with the trinary ? : operator. Less clunky. $email = is_null($row[0]) ? 'NULL' : $email; # Didja know you could just hit TAB instead of that funky \t stuff? Way prettier, IMNSHO. print("$email..."); print("" . is_null($row[0]) ? 'NULL' : $email . ""; #echo will take as many arguments as you like. echo "", is_null($row[0]) ? 'NULL' : $email, "..."; -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Gainesville, Florida PHP Users? (Re: [PHP-WIN] PHP meetup [CROSS-POST] Meet other PHP Developers in Your Area)
> >Well I don't see a user group listed for Gainesville, FL... and we could >have a cool acronym too > > PUGG > >(php users group of gainesville) > >ok, that's a first attempt, but anyway > >So are there other Gainesville, Florida folks around? If so please drop >me a link and maybe we can form a local UG. Some of the listings at http://phpusergroups.org are nothing more than a single person trying to form a group... I would assume, then, that such additions are welcome, and more likely to be effective in the long run than just posting here. Not saying you shouldn't have posted, just that your odds will increase a lot if you go "on record" permanently as desiring to form a User Group. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP codes and variables
>Anyone know how to do have a variable equal the contents of a file? I tried >the include function, but it just prints the file out on the screen rather >than including the contents in the variable itself. I need help with this >ASAP. Thanks. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Multiple Tables -add, edit, delete
>Problem: How do I display all the tblCountriesOfOperation for one >tblContacts record SO THAT MULTIPLE COUNTRIES CAN BE ADDED OR DELETED FOR >THAT RECORD? create table contacts( contact_id int(11) unsigned auto_increment unique not null primary key, name text ); create table countries( country_code char(2) unique not null primary key, name text ); create table contact_countries( contact_id int(11) unsigned, country_code char(2), unique key contact_country_key(contact_id, country_code) ); This last table is a "lookup" table, or cross-join table, or ... Lots of names for it. Basic idea is to just have a running list of contacts and countries "matched up" by their IDs. Sample Data: insert into contacts(name) values('Rasmus Lerdorf'); insert into contacts(name) values('Ze\'ev Suraski'); insert into contacts(name) values('Andi Gutman); insert into countries(country_code, name) values('US', 'United States'); insert into countries(country_code, name) values('CA', 'Canada'); insert into countries(country_code, name) values('IL', 'Israel'); insert into contact_countries(1, 'US'); # I think Rasmus is still in Silicon Valley somewhere insert into contact_countries(1, 'CA'); # But he used to work in Canada insert into contact_countries(2, 'US'); # Zeev and Andi are mostly in Israel, but insert into contact_countries(2, 'IL'); # but come to the US for conferences frequently. insert into contact_countries(3, 'US'); insert into contact_countries(3, 'IL'); The above assumes that your table was empty, so Rasmus is 1, Ze'ev is 2, and Andi is 3... This "middle" table, contact_countries, lets you associate as many, or as few, people with countries as you need. The display code could be something like this: METHOD=POST> $name\n\n"; # Now to display current country selections: # Crucial: ' order by name ' lets me run through $contact_countries and $countries "in parallel" $query = "select countries.country_code from contact_countries, countries "; $query .= " where contact_id = $contact_id "; $query .= " and countries.country_code = contact_countries.country_code "; $query .= " order by name "; $contact_countries = mysql_query($query) or error_log(mysql_error()); $query = "select country_code, name from countries order by name "; $all_countries = mysql_query($query) or error_log(mysql_error()); $contact_country_row = 0; while (list($code, $name) = mysql_fetch_row($all_countries)){ if ($code == mysql_result($contact_countries, 0, 0)){ $selected = 'SELECTED'; $contact_country_row++; } else{ $selected = ''; } echo " $name\n"; } ?> This code is untested, but should be okay other than typos... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how can I log to my cvs in php.net and translate files
Hi I want to use my cvs to log to php.net servers and get the manual files and translate it to arabic .. How can I log to cvs and what the important setting and info for that ? How can I log using Wincvs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Installing MYSQL on Windows
you might want a phptriad (apache,mysql,php) find it in sourceforge On Tuesday 16 July 2002 06:15 am, Analysis & Solutions wrote: > On Mon, Jul 15, 2002 at 02:12:47PM -0700, Varsha Agarwal wrote: > > Can anyone tell me steps for installing MYSQL on windows ?? > > Very simple, step by step, instructions: > > http://www.analysisandsolutions.com/code/mybasic.htm > > --Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sorting getmxrr()
Lo all, if (getmxrr($DomainPart, $DomainMX, $Weight)) { for ($Counter = 0; $Counter < count($DomainMX); $Counter++) { echo "$DomainMX[$Counter] ($Weight[$Counter]) "; } } How can I manage to sort $DomainMX from the lowest $Weight to the highest, while still preserving the proper $Weight to the $DomainMX? Thankies :-) -- me -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] OOH Forms ?
> I came across with some reference indicating there was a library called > OOH > forms, wondering if anyone knows about the status of that lib, or has > those > features been incorporated into some others? OR simply, Is there any > similar one, thanks. http://www.google.com/search?sourceid=navclient&q=OOH+forms ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OOH Forms ?
Hi there I came across with some reference indicating there was a library called OOH forms, wondering if anyone knows about the status of that lib, or has those features been incorporated into some others? OR simply, Is there any similar one, thanks. /dl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Free PHP Books in PDF or HTML Format
try out http://www.informit.com -Original Message- From: Chris Carlson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 11:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Free PHP Books in PDF or HTML Format Hey guys, I was wondering if anyone on the list could recommend web sites to visit to find free PHP books available on the 'net in either PDF or HTML format. Thanks, CHRIS(.deletedscenes.org) -- 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] Free PHP Books in PDF or HTML Format
Hey guys, I was wondering if anyone on the list could recommend web sites to visit to find free PHP books available on the 'net in either PDF or HTML format. Thanks, CHRIS(.deletedscenes.org) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Online Document
I hate to say it, but the easiest way to maintain this might just be to do all of the hyperlinking from within Word, with its own function/buttons, etc, and then save the Word document as HTML. Yeah, it'll be bloated and crappy HTML, but it'll load into a browser. Then, when she needs to update it, she just updates the word document, and resaves it as HTML format in the web root... ---John Holmes... > -Original Message- > From: Glenn Antoine [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 15, 2002 5:19 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Online Document > > We are currently looking to put a very sizable document on a website so > that it will be easily. The document is currently maintained by a > single user in a MS Word format. Ideally it would be very nice if the > index would take the user to the index of the appropriate section of the > document, which would then drill down to the exact contents of that > section. The document should also be easily updateable, via her web > browser, by the user that has been tasked with maintaining the manual. > Any suggestions for the design of such a project would be greatly > appreciated. > > TIA > Glenn > > > -- > 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] Date () Help please
You could use mktime() with date, too... $first_day = date("w",mktime(0,0,1,$month,1,$year)); Set your $month and $year accordingly. ---John Holmes... > -Original Message- > From: Attila [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 15, 2002 8:07 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Date () Help please > > OK thought I should share in case any needs it but got it to work. Here > is > what it looks like and thanks to Richard Baskett for the help. > > $yr= date (Y); > $mnth = date (F); > $dy= 1; > $string = "$dy $mnth $yr"; > $today = date("w",strtotime($string)); > > Thanks for the help > Attila > http://www.glorynaspiration.com > > > "Attila" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Ok your way works and thanks for the help but still struggling a little > bit > > here is what I have. > > > > $year = date (Y); //This gets me the current year 2002 > > $month = date (m); //This gets me the current month 07 > > $day= 1; //always looking for the 1st day of the > month > > $string = "$year $month $day"; > > $today = date("w",strtotime($string)); > > echo $today; > > > > My result is: 3 > > > > What am I doing wrong should this work > > > > Thanks for the help > > attila > > http://www.glorynaspiration.com > > > > > > > > > > "Richard Baskett" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > $today = date("w"); // $today will result in '1' > > > $today = date("D"); // $today will result in 'Mon' > > > $today = date("l"); // $today will result in 'Monday' > > > > > > Now if you wanted to feed the script something like this: > > > > > > $string = "01 Jul 2002"; > > > $today = date("l",strtotime($string)); > > > > > > This will result in the long textual day of '01 Jul 2002', so 'Monday' > or > > if > > > you interchange the "l" in the first part of the date function with > "w" > > you > > > will get the the day of the week, numeric, i.e. "0" (Sunday) to "6" > > > (Saturday) or if you use "D" you will get the short textual day so > 'Mon' > > > > > > I hope all of that makes sense to you. Check out the php manual for > the > > > function date and strtotime. > > > > > > http://www.php.net/date > > > http://www.php.net/strtotime > > > > > > Rick > > > > > > "Trust in the Lord with all your heart, And lean not on your own > > > understanding; In all your ways acknowledge Him, And he shall direct > your > > > paths." - Proverbs 3:5-6 > > > > > > > > > > From: "Attila" <[EMAIL PROTECTED]> > > > > Date: Mon, 15 Jul 2002 16:44:39 -0600 > > > > To: [EMAIL PROTECTED] > > > > Subject: [PHP] Date () Help please > > > > > > > > Hello all, > > > > I am very new to PHP and I have added some minor PHP to my > website. > I > > > > would like to make a PHP calander to keep track of things going on. > > Could > > > > someone tell me how I can get the first day of every month. > > > > > > > > For Example: > > > > 01 Jul 2002 was a Monday. > > > > 01 Mar 2002 will be a Thursday > > > > > > > > I need the dates to start my tables so they insert the numbers in > the > > right > > > > day. > > > > > > > > Thanks, > > > > Attila > > > > > > > > > > > > > > > > -- > > > > 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] Installing MYSQL on Windows
> Hi, > Can anyone tell me steps for installing MYSQL on > windows ?? Umm...download, unzip, run the setup program. How hard is that? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: NMTP server and db
> > - how is it possible to run a php script periodicly? > > Depends on your OS. If you're on Linux or similar then use cron. If you're > on > Windows NT/2k, use AT. If you're on Windows 9x IIRC there is a scheduler > in the > control panel. AT seemed flaky when I tried to use it. You can use the Program Scheduler and have it open up IE with an address. The command line would be something like C:\whatever\path\iexplore.exe http://www.yourpage.com/script.php And somewhere in the config you can tell it to "End this program after X minutes". Set that at whatever and IE will shutdown after that many minutes. Seems to work well if you can't get AT working... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Editing files by line
On Mon, Jul 15, 2002 at 08:46:14PM -0400, Onaje Johnston wrote: > > I've written a script that edits a specific line in a text file and saves > the changes to the file for that specific line. I've noticed though that I > can't edit the first line in the file Without seeing the script, it'd be hard for us to say. So, post the _relevant parts_ of the script to the list. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Editing files by line
-Original Message- From: Analysis & Solutions Sent: Friday, July 12, 2002 9:57 AM To: PHP List Subject: Re: [PHP] Re: Editing files by line >Unfortunately, if a file is opened for appending via fopen('name', 'a'), >the manual says the data is put at the end of the file regardless of using >fseek(). > > --Dan I've written a script that edits a specific line in a text file and saves the changes to the file for that specific line. I've noticed though that I can't edit the first line in the file, which would be zero in the array created by the file() function. When I write the edited data back to the file I am using "w+" as the mode. Is this related to the array or to the file mode? -- Onaje Johnston -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Jigsaw
I've been trying to get a simple php page to produce any output through a Jigsaw server. I've got past the problem of cgi.redirect and now my server launches php and returns a "page" but it's blank. There is no evidence of my html or php code having been seen by the server. I've run the php script from the command line and I get the html code I'd expect. With Jigsaw's debug facility DISabled for the cgi scripts I get the following html served to the browser: which produces a totally empty, white page. With Jigsaw's debug facility Enabled, I get two lines on the page and the same two lines (without html tags of any sort) in "view source" display: X-Powered-By: PHP/4.2.1 Content-type: text/html At this point, my php script file contains only php commands - no html. Any clues? Murray Nicholas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date () Help please
OK thought I should share in case any needs it but got it to work. Here is what it looks like and thanks to Richard Baskett for the help. $yr= date (Y); $mnth = date (F); $dy= 1; $string = "$dy $mnth $yr"; $today = date("w",strtotime($string)); Thanks for the help Attila http://www.glorynaspiration.com "Attila" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok your way works and thanks for the help but still struggling a little bit > here is what I have. > > $year = date (Y); //This gets me the current year 2002 > $month = date (m); //This gets me the current month 07 > $day= 1; //always looking for the 1st day of the month > $string = "$year $month $day"; > $today = date("w",strtotime($string)); > echo $today; > > My result is: 3 > > What am I doing wrong should this work > > Thanks for the help > attila > http://www.glorynaspiration.com > > > > > "Richard Baskett" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > $today = date("w"); // $today will result in '1' > > $today = date("D"); // $today will result in 'Mon' > > $today = date("l"); // $today will result in 'Monday' > > > > Now if you wanted to feed the script something like this: > > > > $string = "01 Jul 2002"; > > $today = date("l",strtotime($string)); > > > > This will result in the long textual day of '01 Jul 2002', so 'Monday' or > if > > you interchange the "l" in the first part of the date function with "w" > you > > will get the the day of the week, numeric, i.e. "0" (Sunday) to "6" > > (Saturday) or if you use "D" you will get the short textual day so 'Mon' > > > > I hope all of that makes sense to you. Check out the php manual for the > > function date and strtotime. > > > > http://www.php.net/date > > http://www.php.net/strtotime > > > > Rick > > > > "Trust in the Lord with all your heart, And lean not on your own > > understanding; In all your ways acknowledge Him, And he shall direct your > > paths." - Proverbs 3:5-6 > > > > > > > From: "Attila" <[EMAIL PROTECTED]> > > > Date: Mon, 15 Jul 2002 16:44:39 -0600 > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] Date () Help please > > > > > > Hello all, > > > I am very new to PHP and I have added some minor PHP to my website. I > > > would like to make a PHP calander to keep track of things going on. > Could > > > someone tell me how I can get the first day of every month. > > > > > > For Example: > > > 01 Jul 2002 was a Monday. > > > 01 Mar 2002 will be a Thursday > > > > > > I need the dates to start my tables so they insert the numbers in the > right > > > day. > > > > > > Thanks, > > > Attila > > > > > > > > > > > > -- > > > 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] Date () Help please
Ok your way works and thanks for the help but still struggling a little bit here is what I have. $year = date (Y); //This gets me the current year 2002 $month = date (m); //This gets me the current month 07 $day= 1; //always looking for the 1st day of the month $string = "$year $month $day"; $today = date("w",strtotime($string)); echo $today; My result is: 3 What am I doing wrong should this work Thanks for the help attila http://www.glorynaspiration.com "Richard Baskett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > $today = date("w"); // $today will result in '1' > $today = date("D"); // $today will result in 'Mon' > $today = date("l"); // $today will result in 'Monday' > > Now if you wanted to feed the script something like this: > > $string = "01 Jul 2002"; > $today = date("l",strtotime($string)); > > This will result in the long textual day of '01 Jul 2002', so 'Monday' or if > you interchange the "l" in the first part of the date function with "w" you > will get the the day of the week, numeric, i.e. "0" (Sunday) to "6" > (Saturday) or if you use "D" you will get the short textual day so 'Mon' > > I hope all of that makes sense to you. Check out the php manual for the > function date and strtotime. > > http://www.php.net/date > http://www.php.net/strtotime > > Rick > > "Trust in the Lord with all your heart, And lean not on your own > understanding; In all your ways acknowledge Him, And he shall direct your > paths." - Proverbs 3:5-6 > > > > From: "Attila" <[EMAIL PROTECTED]> > > Date: Mon, 15 Jul 2002 16:44:39 -0600 > > To: [EMAIL PROTECTED] > > Subject: [PHP] Date () Help please > > > > Hello all, > > I am very new to PHP and I have added some minor PHP to my website. I > > would like to make a PHP calander to keep track of things going on. Could > > someone tell me how I can get the first day of every month. > > > > For Example: > > 01 Jul 2002 was a Monday. > > 01 Mar 2002 will be a Thursday > > > > I need the dates to start my tables so they insert the numbers in the right > > day. > > > > Thanks, > > Attila > > > > > > > > -- > > 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] Apache 2.0 + PHP
I dont think Apache 2 or php 4.3.x are meant for production boxes.. My opinion, the latest verion of apache 1.3.x and php 4.1.2 (my test box is 4.2.1 but thats ok) Michael Hall wrote: >I've had a hunt through the mail archives but can't find a definite >answer: > >Is Apache 2.0.x and PHP 4.2.x/4.3.x on Linux a viable proposition yet in a >production environment? > >I guess the diversity of experiences described in the archives probably >means no, but what is the current opinion? Some of the archive messages >I read are quite old now. > > > >Michael Hall [EMAIL PROTECTED] > > > > > -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date () Help please
$today = date("w"); // $today will result in '1' $today = date("D"); // $today will result in 'Mon' $today = date("l"); // $today will result in 'Monday' Now if you wanted to feed the script something like this: $string = "01 Jul 2002"; $today = date("l",strtotime($string)); This will result in the long textual day of '01 Jul 2002', so 'Monday' or if you interchange the "l" in the first part of the date function with "w" you will get the the day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday) or if you use "D" you will get the short textual day so 'Mon' I hope all of that makes sense to you. Check out the php manual for the function date and strtotime. http://www.php.net/date http://www.php.net/strtotime Rick "Trust in the Lord with all your heart, And lean not on your own understanding; In all your ways acknowledge Him, And he shall direct your paths." - Proverbs 3:5-6 > From: "Attila" <[EMAIL PROTECTED]> > Date: Mon, 15 Jul 2002 16:44:39 -0600 > To: [EMAIL PROTECTED] > Subject: [PHP] Date () Help please > > Hello all, > I am very new to PHP and I have added some minor PHP to my website. I > would like to make a PHP calander to keep track of things going on. Could > someone tell me how I can get the first day of every month. > > For Example: > 01 Jul 2002 was a Monday. > 01 Mar 2002 will be a Thursday > > I need the dates to start my tables so they insert the numbers in the right > day. > > Thanks, > Attila > > > > -- > 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] Date () Help please
Hello all, I am very new to PHP and I have added some minor PHP to my website. I would like to make a PHP calander to keep track of things going on. Could someone tell me how I can get the first day of every month. For Example: 01 Jul 2002 was a Monday. 01 Mar 2002 will be a Thursday I need the dates to start my tables so they insert the numbers in the right day. Thanks, Attila -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Installing MYSQL on Windows
On Mon, Jul 15, 2002 at 02:12:47PM -0700, Varsha Agarwal wrote: > > Can anyone tell me steps for installing MYSQL on windows ?? Very simple, step by step, instructions: http://www.analysisandsolutions.com/code/mybasic.htm --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encoding problem ONLY with _command line_ PHP.exe
On Fri, Jul 12, 2002 at 11:02:54PM +0100, Emile Axelrad wrote: > Hello - My problem is as follows (I am trying to migrate from a mssql > server to a mysql server) OH! > The data in the MSSQL table is: Æã > > IF I call this PHP code from my browser (IE6) it results in the > following output: Æã and it also places into the MySQL database the > value: Æã > > However, if I call this PHP code from the command line, using "php.exe > test.php" it also results in the following output: Æã but it places into > the MySQL database: Æ This _could_ be happening because you're viewing the data using different systems and software. Each has it's own character sets. This could throw things off, making the output LOOK different, even when it's the same. > I am sure it is a character set issue, but for the life of me I cannot > work out why the command-line does not run the exact same script in the > same way as a browser would? The website could be running PHP as an Apache module (or some other binary) while the command line uses a standalone binary. They could be using different php.ini files. They could be different versions. --Dan A: No. Q: Is top posting okay? -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Online Document
I would recommend applying a simple templating system to the file. Anything that needs to be extracted out of the page for navigation purposes will be enclosed in special characters such as a chapter title.. [:chapter = "CHAPTER 2: Beating a Dead Horse":]. A very simple script parses the file and extracts these strings to build an interactive Table of Contents. -Kevin - Original Message - From: "Glenn Antoine" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 3:19 PM Subject: [PHP] Online Document > We are currently looking to put a very sizable document on a website so > that it will be easily. The document is currently maintained by a > single user in a MS Word format. Ideally it would be very nice if the > index would take the user to the index of the appropriate section of the > document, which would then drill down to the exact contents of that > section. The document should also be easily updateable, via her web > browser, by the user that has been tasked with maintaining the manual. > Any suggestions for the design of such a project would be greatly > appreciated. > > TIA > Glenn > > > -- > 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] Multi-Part PostToHost?
First, thanks to the people who've helped me so far. I'm a UI designer who's suddenly found himself responsible for a very large website that integrates services from no less than four different providers, and I've been dumped into learning PHP on my own under a heavy deadline. Anyway, I'm catching data from a form post and writing an XML document out of it. That's done, the server can process the XML correctly. But, from there, I need that file to be appended to a POST to a script on another server for processing. I've tried looking up how this is accomplished, and Richard Lynch was kind enough to point me in the direction of PostToHost, which got me off to a jump start on how to find more information. So now I'm at a point where I need help. After opening the socket, can I declare a multi-part POST and then start sending the data? Such as: fputs($fp, "Content-Type: multipart/form-data; boundary=AaB03x\n"); fputs($fp, "--AaB03x\n"); fputs($fp, "Content-Disposition: form-data; name="variable1"\n"); fputs($fp, "\n"); fputs($fp, "Variable 1 Data\n"); fputs($fp, "--AaB03x\n"); fputs($fp, "Content-Disposition: form-data; name="files"; filename="myFile.xml"\n"); fputs($fp, "Content-Type: text/plain\n"); fputs($fp, "\n"); fputs($fp, "... contents of myFile.xml ...\n"); fputs($fp, "--AaB03x--\n"); And again, I've only been doing PHP a week, so if I'm following a totally wrong track here, feel free to smack me around. As always, any help is greatly appreciated. ~Steve-o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Installing MYSQL on Windows
Have a look at http://www.mysql.com/doc/W/i/Windows_installation.html Cheers Lee. - Original Message - From: "Varsha Agarwal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 10:12 PM Subject: [PHP] Installing MYSQL on Windows > Hi, > Can anyone tell me steps for installing MYSQL on > windows ?? > -Varsha > > __ > Do You Yahoo!? > Yahoo! Autos - Get free new car price quotes > http://autos.yahoo.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] Online Document
We are currently looking to put a very sizable document on a website so that it will be easily. The document is currently maintained by a single user in a MS Word format. Ideally it would be very nice if the index would take the user to the index of the appropriate section of the document, which would then drill down to the exact contents of that section. The document should also be easily updateable, via her web browser, by the user that has been tasked with maintaining the manual. Any suggestions for the design of such a project would be greatly appreciated. TIA Glenn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installing MYSQL on Windows
Hi, Can anyone tell me steps for installing MYSQL on windows ?? -Varsha __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ^k ? -- how do I match that?
Just try eregi_replace("\^k[.+]", "", $container); Regular expressions are the MASTERS of the INTARWEB! :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> Jimmy Brake <[EMAIL PROTECTED]> 07/15/02 04:32PM >>> Hi! I keep getting that evil little character ... ^k from mac users (pre X) and I need to remove it. Does anyone know how to remove? This site has that character as a vertical tab. This character is what is used in MS Excel when people hit return inside a cell. If they copy and paste that into a form its ok, but when I export that data to a csv it gets ugly. http://www.robelle.com/smugbook/ascii.html Thanks in advance! Jimmy -- 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] cleaning HTML TAGS (headed)
Sorry.. I screwed up my preg_match string. It should have $file as the second parameter and also included an 'i' after the closing delimeter for a case-insensitive search. preg_match('/(.*)<\/title>/i', $file, $result); - Original Message - From: "Kevin Stone" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Juan Pablo Aqueveque" <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 2:33 PM Subject: Re: [PHP] cleaning HTML TAGS (headed) > This isn't any more effective but it is fewer lines of code.. > > $file = implode('', file("file.html")); > preg_match('/(.*)<\/title>/', $result); > $title = $result[1]; > > -Kevin > > - Original Message - > From: "Juan Pablo Aqueveque" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, July 15, 2002 8:07 AM > Subject: [PHP] cleaning HTML TAGS (headed) > > > > Hi everyone. > > Sorry for the trivial question. > > > > I want insert a .html inside of one .php file but without and > > tags. > > > > I built a routine (shown it down) it's running OK but show me the title > > () of my html. > > > > somebody can help with a routine a little me more effective than mine? > > > > Thanks in advance. > > > > --jp > > > > > My Routine: > > > > if ($myFile = fopen("html.html","r")) > > { > > while(!feof($myFile)) > > { > > $myLine = fgetss($myFile, 256,""); > > $myLine = ereg_replace("\n","",$myLine); > > print($myLine); > > > > > > } > > } > > else > > { > > echo "file no found "; > > > > } > > > > > > > > > > Juan Pablo Aqueveque <[EMAIL PROTECTED]> > > Ingeniero de Sistemas > > Departamento de Redes y Comunicaciones http://www.drc.uct.cl > > Universidad Católica de Temuco. > > Tel:(5645) 205 630 Fax:(5645) 205 628 > > > > > > -- > > 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] ^k ? -- how do I match that?
Hi! I keep getting that evil little character ... ^k from mac users (pre X) and I need to remove it. Does anyone know how to remove? This site has that character as a vertical tab. This character is what is used in MS Excel when people hit return inside a cell. If they copy and paste that into a form its ok, but when I export that data to a csv it gets ugly. http://www.robelle.com/smugbook/ascii.html Thanks in advance! Jimmy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cleaning HTML TAGS (headed)
This isn't any more effective but it is fewer lines of code.. $file = implode('', file("file.html")); preg_match('/(.*)<\/title>/', $result); $title = $result[1]; -Kevin - Original Message - From: "Juan Pablo Aqueveque" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 8:07 AM Subject: [PHP] cleaning HTML TAGS (headed) > Hi everyone. > Sorry for the trivial question. > > I want insert a .html inside of one .php file but without and > tags. > > I built a routine (shown it down) it's running OK but show me the title > () of my html. > > somebody can help with a routine a little me more effective than mine? > > Thanks in advance. > > --jp > > > My Routine: > > if ($myFile = fopen("html.html","r")) > { > while(!feof($myFile)) > { > $myLine = fgetss($myFile, 256,""); > $myLine = ereg_replace("\n","",$myLine); > print($myLine); > > > } > } > else > { > echo "file no found "; > > } > > > > > Juan Pablo Aqueveque <[EMAIL PROTECTED]> > Ingeniero de Sistemas > Departamento de Redes y Comunicaciones http://www.drc.uct.cl > Universidad Católica de Temuco. > Tel:(5645) 205 630 Fax:(5645) 205 628 > > > -- > 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] outputting a pdf file to IE browser? POST/GET method bug or not?
> From: gilles [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 15, 2002 1:19 PM > Subject: [PHP] outputting a pdf file to IE browser? POST/GET > method bug or not? > error_reporting(E_ALL); > > session_start(); > if (!isset($_SESSION['download'])) { > @$_SESSION['download'] = $_POST['download']; > } > > if(isset($_POST["download"])){ > $file_name=$_SESSION['download']; > header("Content-type:application/pdf"); > header("Content-Disposition: inline;filename=\"mypdf.pdf\""); > header("Content-length:".(string)(filesize($file_name))); > header("location: $file_name"); > exit; > } > ?> > > > Your code runs fine on my freebsd box running php 4.2.1 and apache. I'd try changing the header into an echo, and see what you're sending to the browser. Are you meaning to only set the session var one time? You only set it when it's not set, so if you change the value of $_POST['download', the session var will still hold the first name. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Credit Card Processing - Take Two
You might check out http://www.hotscripts.com/PHP/Scripts_and_Programs/E-Commerce/ Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Daniel Guerrier [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 12:53 PM To: [EMAIL PROTECTED] Subject: [PHP] Credit Card Processing - Take Two Can anyone recommend a good and cheap shopping cart and credit card processing combo. Based on PHP of course. Thanks __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card Processing - Take Two
www.x-cart.com looks like a good and inexpensive option - I will be implementing it soon, but I have not tried it yet. Anyone used x-cart? Thanks, olinux --- Daniel Guerrier <[EMAIL PROTECTED]> wrote: > > Can anyone recommend a good and cheap shopping cart > and credit card processing combo. > > Based on PHP of course. > > Thanks > > > __ > Do You Yahoo!? > Yahoo! Autos - Get free new car price quotes > http://autos.yahoo.com > ATTACHMENT part 2 message/rfc822 > Date: Mon, 15 Jul 2002 08:58:39 -0700 (PDT) > From: Daniel Guerrier <[EMAIL PROTECTED]> > Subject: Credit Card Processing > To: [EMAIL PROTECTED] > > Can anyone recommend a good and cheap shopping cart > and credit card processing combo. > > Based on PHP of course. > > Thanks > > __ > Do You Yahoo!? > Yahoo! Autos - Get free new car price quotes > http://autos.yahoo.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cleaning HTML TAGS (headed)
Hi everyone. Sorry for the trivial question. I want insert a .html inside of one .php file but without and tags. I built a routine (shown it down) it's running OK but show me the title () of my html. somebody can help with a routine a little me more effective than mine? Thanks in advance. --jp > My Routine: if ($myFile = fopen("html.html","r")) { while(!feof($myFile)) { $myLine = fgetss($myFile, 256,""); $myLine = ereg_replace("\n","",$myLine); print($myLine); } } else { echo "file no found "; } Juan Pablo Aqueveque <[EMAIL PROTECTED]> Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Credit Card Processing - Take Two
Can anyone recommend a good and cheap shopping cart and credit card processing combo. Based on PHP of course. Thanks __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com --- Begin Message --- Can anyone recommend a good and cheap shopping cart and credit card processing combo. Based on PHP of course. Thanks __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com --- End Message --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] newbie: mysql statement
I like this form better but it's not clear to me if this would only update the row for parent='$this->parent' if it were the last row "posted" to the table. Depends on whether the max function in the where clause is bound to the max in the table or the max in the sequence set (I tend to think it might be max in the table). Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Andrew Brampton [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 12:23 PM To: Martin Clifford; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] newbie: mysql statement Shouldn't this be "UPDATE header SET parent='$this->parent' WHERE posted = max(posted)" Otherwise the max(posted) = max(posted) is true for all records (therefore all records get updated) Andrew - Original Message - From: "Martin Clifford" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 8:11 PM Subject: Re: [PHP] newbie: mysql statement I would rewrite the query as: "UPDATE header SET parent='$this->parent' WHERE max(posted) = max(posted)" -- 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] newbie: mysql statement
You're right Andrew, got a little ahead of myself :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> "Andrew Brampton" <[EMAIL PROTECTED]> 07/15/02 03:23PM >>> Shouldn't this be "UPDATE header SET parent='$this->parent' WHERE posted = max(posted)" Otherwise the max(posted) = max(posted) is true for all records (therefore all records get updated) Andrew - Original Message - From: "Martin Clifford" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 8:11 PM Subject: Re: [PHP] newbie: mysql statement I would rewrite the query as: "UPDATE header SET parent='$this->parent' WHERE max(posted) = max(posted)" -- 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] [PHP-DB] RE: PHP meetup [CROSS-POST] Meet other PHP Developersin Your Area
Yes, everyone please join up! I would love to find more developers in the Maryland area, and I'm sure others would in their areas as well! Let's do the great american get togeth... err... the great php get together! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> "Jay Blanchard" <[EMAIL PROTECTED]> 07/15/02 03:20PM >>> [snip] No, it's not a dating service :) Want to meet other PHP developers in your area? Check out: http://php.meetup.com/ Pretty nifty idea... especially given the lack of user groups in the U.S. I thought for others who had not seen this I would post this. There is probably already a user group in your area if you live near a major city. According to the PHPusergroups.org web site [http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP user groups in 52 countries. [/snip] I have seen some users groups mentioned, which is outstanding. PHP Meetup is gaining lots of ground with 105 members at last check. Top 5 cities are... Manhattan (below 42nd St) (5 members) London, England (4 members) Ann Arbor, MI (3 members) Melbourne (3 members) Washington DC (3 members) [actually tied with Philadelphia, PA and Orange County, CA] And I finally saw another San Antonio member. Just want to keep this fresh in everyone's mind. If you know of other developer lists where php is discussed please forward this along. Thanks! Jay "Do not meddle in the affairs of dragons-for you are crunchy and good with ketchup" -- PHP Database 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] newbie: mysql statement
Shouldn't this be "UPDATE header SET parent='$this->parent' WHERE posted = max(posted)" Otherwise the max(posted) = max(posted) is true for all records (therefore all records get updated) Andrew - Original Message - From: "Martin Clifford" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 8:11 PM Subject: Re: [PHP] newbie: mysql statement I would rewrite the query as: "UPDATE header SET parent='$this->parent' WHERE max(posted) = max(posted)" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: PHP meetup [CROSS-POST] Meet other PHP Developers in Your Area
[snip] No, it's not a dating service :) Want to meet other PHP developers in your area? Check out: http://php.meetup.com/ Pretty nifty idea... especially given the lack of user groups in the U.S. I thought for others who had not seen this I would post this. There is probably already a user group in your area if you live near a major city. According to the PHPusergroups.org web site [http://www.phpusergroups.org/groups.phtml?menu=groups] there 189 PHP user groups in 52 countries. [/snip] I have seen some users groups mentioned, which is outstanding. PHP Meetup is gaining lots of ground with 105 members at last check. Top 5 cities are... Manhattan (below 42nd St) (5 members) London, England (4 members) Ann Arbor, MI (3 members) Melbourne (3 members) Washington DC (3 members) [actually tied with Philadelphia, PA and Orange County, CA] And I finally saw another San Antonio member. Just want to keep this fresh in everyone's mind. If you know of other developer lists where php is discussed please forward this along. Thanks! Jay "Do not meddle in the affairs of dragons-for you are crunchy and good with ketchup" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] newbie: mysql statement
If you could retrieve the max(posted) prior to doing the update you could; SELECT max(posted) from header WHERE parent = '$this->postid' and substitute the value in the following query; Update header SET parent='$this->parent' WHERE parent = '$this->postid' AND posted = $retrieved_posted A subselect would work great here by not in MySQL. Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Alexander Ross [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 11:56 AM To: [EMAIL PROTECTED] Subject: [PHP] newbie: mysql statement I want to update the most recent record (based on the timestamp in field posted) where the parent field == a specified value (in a table called header). I tried the following mysql statement: "UPDATE header WHERE parent = '$this->postid' ORDER by posted SET parent='$this->parent' LIMIT1"; but apparently you can't use ORDER in an UPDATE statement. If I take order out, the statement works. That being true (and please correct me if its not) how can I ensure that the newest record is the one being acted upon? 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] newbie: mysql statement
I would rewrite the query as: "UPDATE header SET parent='$this->parent' WHERE max(posted) = max(posted)" I would think this to work, though I don't have the facilities to test it, and have never needed to do a query such as this. In theory, it should update ONLY the row where the maximum value of the posted column equals itself, thereby being the latest date. Just an idea. Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ >>> "Alexander Ross" <[EMAIL PROTECTED]> 07/15/02 02:56PM >>> I want to update the most recent record (based on the timestamp in field posted) where the parent field == a specified value (in a table called header). I tried the following mysql statement: "UPDATE header WHERE parent = '$this->postid' ORDER by posted SET parent='$this->parent' LIMIT1"; but apparently you can't use ORDER in an UPDATE statement. If I take order out, the statement works. That being true (and please correct me if its not) how can I ensure that the newest record is the one being acted upon? 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] newbie: mysql statement
Oops, looks like I missed your Set after the ORDER BY. I've never seen it there, usually I see it immediately after the update. Seem to me some things in SQL are positional, but could be wrong here. Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Alexander Ross [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 11:56 AM To: [EMAIL PROTECTED] Subject: [PHP] newbie: mysql statement I want to update the most recent record (based on the timestamp in field posted) where the parent field == a specified value (in a table called header). I tried the following mysql statement: "UPDATE header WHERE parent = '$this->postid' ORDER by posted SET parent='$this->parent' LIMIT1"; but apparently you can't use ORDER in an UPDATE statement. If I take order out, the statement works. That being true (and please correct me if its not) how can I ensure that the newest record is the one being acted upon? 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] newbie: mysql statement
On Mon, 15 Jul 2002, Alexander Ross wrote: >I want to update the most recent record (based on the timestamp in field >posted) where the parent field == a specified value (in a table called >header). > >I tried the following mysql statement: > >"UPDATE header WHERE parent = '$this->postid' ORDER by posted SET >parent='$this->parent' LIMIT1"; > >but apparently you can't use ORDER in an UPDATE statement. If I take order >out, the statement works. That being true (and please correct me if its >not) how can I ensure that the newest record is the one being acted upon? >Thanks. By using a where clause to identify the postid in the table, something like this perhaps: UPDATE header SET parent='$this->parent' where postid='$this->postid'; -- --- Greg Donald http://destiney.com/public.key --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] newbie: mysql statement
not only that, but you seem to be missing any SET field = value to cause updates to occur. I suspect the reason that the ORDER BY is rejected is be cause the database wants to use an index determined from your where clause to optimize the update process. Keep in mind that no rows are returned to you from an update (which is where the ORDER BY is important). Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -Original Message- From: Alexander Ross [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 11:56 AM To: [EMAIL PROTECTED] Subject: [PHP] newbie: mysql statement I want to update the most recent record (based on the timestamp in field posted) where the parent field == a specified value (in a table called header). I tried the following mysql statement: "UPDATE header WHERE parent = '$this->postid' ORDER by posted SET parent='$this->parent' LIMIT1"; but apparently you can't use ORDER in an UPDATE statement. If I take order out, the statement works. That being true (and please correct me if its not) how can I ensure that the newest record is the one being acted upon? 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] Solaris 8 + php 4.2.1 setup problem
I am trying to get PHP 4.2.1 installed on Solaris 8 with apache 1.3.22. It installed ok, but when I restart apache I get the follow error in my error_log file. /usr/local/apache/logs/error_log [Thu Jul 11 13:13:11 2002] [notice] Apache/1.3.22 (Unix) PHP/4.2.1 configured -- resuming normal operations [Thu Jul 11 13:13:11 2002] [notice] Accept mutex: fcntl (Default: fcntl) [Thu Jul 11 13:13:11 2002] [alert] Child 20902 returned a Fatal error... Any ideas of what to try next. Thanks, Mark. _ Mark McCulligh, Application Developer / Analyst Sykes Canada Corporation www.SykesCanada.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] newbie: mysql statement
I want to update the most recent record (based on the timestamp in field posted) where the parent field == a specified value (in a table called header). I tried the following mysql statement: "UPDATE header WHERE parent = '$this->postid' ORDER by posted SET parent='$this->parent' LIMIT1"; but apparently you can't use ORDER in an UPDATE statement. If I take order out, the statement works. That being true (and please correct me if its not) how can I ensure that the newest record is the one being acted upon? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 4.3.x..
You could have found the answer to this question right on the front page of php.net. 4.3.x is indeed the current development version. -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Mon, 15 Jul 2002 14:00:26 -0230 "Kondwani Spike Mkandawire" <[EMAIL PROTECTED]> wrote: > One of the threads above Speak of PHP 4.3 I was not > aware that it existed... Is it still in its Testing stages? > How come its not on the PHP Website? Are there any > great modifications to it? > > > > -- > 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] Any sites like www.webcron.org?
On Monday, July 15, 2002, 6:49:06 PM, Leif K-Brooks wrote: > I'm making a web site with a friend. For now, we're stuck on a free > host with no cron. We need it, and I tried www.webcron.org, but it > seems to be down. Does anyone here know of similar services? Thanks > for any help. I don't know of any others (besides getting a "real" host). But webcron.org seems alive and kicking from here. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Any sites like www.webcron.org?
I'm making a web site with a friend. For now, we're stuck on a free host with no cron. We need it, and I tried www.webcron.org, but it seems to be down. Does anyone here know of similar services? Thanks for any help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] paid consultant need
I need someone to help me compile the c-client library for IMAP and re-compile PHP to support it, ASAP. Please contact me with your background and rate. Thanks, Jeff __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] outputting a pdf file to IE browser? POST/GET method bug or not?
hi, i've run in to a strange problem, i'm trying to output a pdf file from disk to the browser. this is fine under netscape but IE has problems. consider the following code: --- -- the above code runs fine on NS and IE, IE immediately loads and opens the pdf file inline. but this code which only has the difference of using the POST method instead of the GET metod results in a "file is corrupt" message! -- -- can anyone explain to me why you can't use the POST method? is this a bug or is this as expected (i didn't). tnx, gilles i'm running php 4.2.1 on win2000 with IIS5 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Self Modifying PHP Code Working on IIS
On Mon, 15 Jul 2002, Kondwani Spike Mkandawire wrote: >Am I the only one who seems to be irritated by the tremendous amount >of settings you have to do on the IIS Server if testing a PHP Script... You are not alone, I am irritated by IIS everytime I am forced develop for it. >I am testing a Self modifying Script runs perfectly on Apache 1.3 /PHP4.2.1 >However it is meant to sick Chunks of code at the beginning of my File... >Hence with NewLine Characters and everything else... It kind of messes >up and sticks chunks of code in the wrong places generating errors... > >Any advice?! Use apache if possible. -- --- Greg Donald http://destiney.com/public.key --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: NMTP server and db
On Monday, July 15, 2002, 6:00:44 PM, I wrote: > You can do it 2 ways: either using the sockets or with the IMAP functions. I'm > not too sure about sockets, but the IMAP function require the IMAP module to be > loaded. D'oh, forgot the link: http://www.php.net/manual/en/ref.imap.php -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: NMTP server and db
Please don't contact me privately unless you want to hire me. On Monday, July 15, 2002, 5:13:35 PM, "andy" wrote: > ok sounds logical. Don't have any experiance on doing anything nntp related > in php. > > There are some questions I am wondering about: > > - do I have to compile php with a special flag to do this? You can do it 2 ways: either using the sockets or with the IMAP functions. I'm not too sure about sockets, but the IMAP function require the IMAP module to be loaded. > - how is it possible to run a php script periodicly? Depends on your OS. If you're on Linux or similar then use cron. If you're on Windows NT/2k, use AT. If you're on Windows 9x IIRC there is a scheduler in the control panel. There are 2 ways to run PHP scripts from the command line. The first (and my personal choice since it's cleaner) is to install the CGI version of PHP. The second is to use something like lynx or wget to run the script via the standard http interface in which case you need to consider the security aspects of this carefully. > - can you mak a short example how to read from a nntp server? I've never done it so I don't have any examples to hand, but I'm sure there are some examples out there. 'Ave a Google. Google is everyones best friend. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] replacing multiple spaces with one
On Tuesday 16 July 2002 00:15, David Russell wrote: > Hi all > > (easy one - I think) > > I need to replace all instances of multiple spaces in a string with a > single space. > > I tries the following: >$ArticleText = str_replace(' ', ' ', $ArticleText); > but if I have four spaces, I am left with two - this is wrong... > > I am sure that I am really looking for a ereg_replace or preg_replace, > but having no c/perl programming background, I do not know either perl > or standard regex syntax. > > Could someone tell me what the correct ereg/preg expression for this > would be? $ArticleText = preg_replace('/ +/', ' ', $ArticleText); This replaces instances of one or more space with a single space. > I would also like a pointer to regex syntax, if someone knows > offhand. The manual? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Standards are crucial. And the best thing about standards is: there are so many to choose from! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4.3.x..
One of the threads above Speak of PHP 4.3 I was not aware that it existed... Is it still in its Testing stages? How come its not on the PHP Website? Are there any great modifications to it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] replacing multiple spaces with one
Hellorgh !! $ArticleText = ereg_replace("[[:space:]].*", " ", $ArticleText); Should be fine... But AFAIK, using preg_replace should be faster, but I don't know the exact syntax to solve your probem :-( -- Nayco - Original Message - From: David Russell <[EMAIL PROTECTED]> To: php-general <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 6:15 PM Subject: [PHP] replacing multiple spaces with one > Hi all > > (easy one - I think) > > I need to replace all instances of multiple spaces in a string with a > single space. > > I tries the following: >$ArticleText = str_replace(' ', ' ', $ArticleText); > but if I have four spaces, I am left with two - this is wrong... > > I am sure that I am really looking for a ereg_replace or preg_replace, > but having no c/perl programming background, I do not know either perl > or standard regex syntax. > > Could someone tell me what the correct ereg/preg expression for this > would be? I would also like a pointer to regex syntax, if someone knows > offhand. > > Thanks > > David R > > > -- > 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] replacing multiple spaces with one
Hi all (easy one - I think) I need to replace all instances of multiple spaces in a string with a single space. I tries the following: $ArticleText = str_replace(' ', ' ', $ArticleText); but if I have four spaces, I am left with two - this is wrong... I am sure that I am really looking for a ereg_replace or preg_replace, but having no c/perl programming background, I do not know either perl or standard regex syntax. Could someone tell me what the correct ereg/preg expression for this would be? I would also like a pointer to regex syntax, if someone knows offhand. Thanks David R -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MSSQL and NT
Not sure if this helps, but if you turn on NT-Authentication in IIS, then you'll have a variable $_SERVER['LOGGED_ON'] or something similar that'll hold the username of the person that's logged on. Check a phpinfo() page in a NT-Authenticated directory to see which variables are available. ---John Holmes... > -Original Message- > From: Gabor Niederlaender [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 15, 2002 8:39 AM > To: [EMAIL PROTECTED] > Subject: [PHP] MSSQL and NT > > Hi all! > > > I went after my problem with the NT authentification and I found out, > that if you want to make a NT-based Authentification (f.ex for an > ODBC-Connection) the I_USR will be seen as the actual user... > > I granted then rights to the I_USR in the DB, but this way, I cannot > distinguish which user is actually working in the DB. > > IS there a way to use NT-Authentification in connection with php & > MSSQL ??? > > Please Help, > > Gabor > > > > -- > 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] Credit Card Processing
Can anyone recommend a good and cheap shopping cart and credit card processing combo. Based on PHP of course. Thanks __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Self Modifying PHP Code Working on IIS
Am I the only one who seems to be irritated by the tremendous amount of settings you have to do on the IIS Server if testing a PHP Script... I am testing a Self modifying Script runs perfectly on Apache 1.3 /PHP4.2.1 However it is meant to sick Chunks of code at the beginning of my File... Hence with NewLine Characters and everything else... It kind of messes up and sticks chunks of code in the wrong places generating errors... Any advice?! Kondwani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Alley-OOP! ... or not?
Building off of what Jay said... I'm a hardcore OOP developer but agree that you must use it judiciously. Used in the correct way it makes maintaining/extending your applications much easier. There are times though when you don't want it. I usually find myself coding pages that have PHP in them. However, whenever I can abstract a task from the page and move it into an object that can be reused, I do. ALMOST ALL of my database interaction goes through objects. (I do some quickies where I'll code a mysql_query line in the page, but not often.) If it is a discrete task (database interaction) or an abstraction of a physical object (Person, Invoice, Order) then I use object. The code in the page mainly creates objects and manipulates them. HTH, =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Martin Clifford [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 10:05 AM To: [EMAIL PROTECTED] Subject: [PHP] Alley-OOP! ... or not? Hey all, I've seen quite a few programs that seem to greatly favor Object Orienting Programming (OOP) in their code. I don't mean to start a holy war or anything of the sort, but as a burgeoning PHP developer, I would like the opinions of my peers. So how about it, ladies and gents? Tell me about the Pros and Cons to OOP, and why you prefer to use it/not use it! Personally, I've always used regular functions to accomplish my repetetive tasks, and OOP seems rather daunting for me, but I'm always open to new (and hopefully, more efficient) ideas! Thanks! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ -- 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] integrating usenet into http? how is this done???
> It would be relatively straight-forward to have a PHP script run periodically, > read from an NNTP server .. ok sounds logical. Don't have any experiance on doing anything nntp related in php. There are some questions I am wondering about: - do I have to compile php with a special flag to do this? - how is it possible to run a php script periodicly? - can you mak a short example how to read from a nntp server? Thanx for your help, Andy "Stuart Dallas" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Monday, July 15, 2002, 2:42:24 PM, Stuart Dallas wrote: > > On Monday, July 15, 2002, 1:55:44 PM, "Andy" wrote: > >> Has anybody an idea how they do this. > > It would be relatively straight-forward to have a PHP script run periodically, > read from an NNTP server and add new posts into the forum database. This is how > I would guess that they do it. > > -- > Stuart > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Alley-OOP! ... or not?
[snip] I've seen quite a few programs that seem to greatly favor Object Orienting Programming (OOP) in their code. I don't mean to start a holy war or anything of the sort, but as a burgeoning PHP developer, I would like the opinions of my peers. So how about it, ladies and gents? Tell me about the Pros and Cons to OOP, and why you prefer to use it/not use it! Personally, I've always used regular functions to accomplish my repetetive tasks, and OOP seems rather daunting for me, but I'm always open to new (and hopefully, more efficient) ideas! Thanks! [/snip] OOP, selectively (emphasis on that) used in PHP can yield untold benefits, depending on the application. I have found it very handy to create classes that can be used with a myriad of processes. I use classes for customer and other objects within our business that can be readily defined. Saves a ton of coding when something new comes up. If need be new modules or applications can derive the customer class as it is going to be used. I have seen folks report that PHP OOP is slow, bullcocka...with today's processors it is not noticeable (unless your OOP style is bad). Also, PHP OOP is not true OOP, it lacks some of the rules needed to make it so. Again, when used selectively I have found it to be a bonus rather than a hinderance. Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Alley-OOP! ... or not?
Why not try it for yourself? If it seems helpful then use it, if not then don't. Henning Sittler www.inscriber.com -Original Message- From: Martin Clifford [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 11:05 AM To: [EMAIL PROTECTED] Subject: [PHP] Alley-OOP! ... or not? Hey all, I've seen quite a few programs that seem to greatly favor Object Orienting Programming (OOP) in their code. I don't mean to start a holy war or anything of the sort, but as a burgeoning PHP developer, I would like the opinions of my peers. So how about it, ladies and gents? Tell me about the Pros and Cons to OOP, and why you prefer to use it/not use it! Personally, I've always used regular functions to accomplish my repetetive tasks, and OOP seems rather daunting for me, but I'm always open to new (and hopefully, more efficient) ideas! Thanks! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ -- 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] Alley-OOP! ... or not?
Hey all, I've seen quite a few programs that seem to greatly favor Object Orienting Programming (OOP) in their code. I don't mean to start a holy war or anything of the sort, but as a burgeoning PHP developer, I would like the opinions of my peers. So how about it, ladies and gents? Tell me about the Pros and Cons to OOP, and why you prefer to use it/not use it! Personally, I've always used regular functions to accomplish my repetetive tasks, and OOP seems rather daunting for me, but I'm always open to new (and hopefully, more efficient) ideas! Thanks! Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache 2.0 + PHP
> Is Apache 2.0.x and PHP 4.2.x/4.3.x on Linux a viable proposition yet in a > production environment? Nope -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fputs - need help!
On Mon, 15 Jul 2002, MAAS wrote: Try adding a \r. fputs ($sysname_log, "$time - SystemName: $sysname\r\n"); -- --- Greg Donald http://destiney.com/public.key --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Detecting network connections
Is there any way I can set up a php script so that it will detect the login of the current Netware user on a PC and use that user's information to customize a greeting for the user? Thanks, Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] integrating usenet into http? how is this done???
On 15 Jul 2002 at 14:55, Andy wrote: > I just found a site where they have integrated a usenet forum into > their own forum. I am wondering how this is technicaly done? The > postings seem to be pretty up to date ( I did compare them with the > usenet ones) Here is the link: > Has anybody an idea how they do this. I think the forum software is > phpbb. But they do not provide such a function as far as I know. All > the data inside phpbb comes out of a db usually. How is this done with > copyrights anyway? Think about the datamodel for a usenet post. Each has a unique id and from there you are good to go. http://www.workbrazil.com/admin/kb.php That's a copy of a site I'm working on. I happen to use a Perl script that is run by cron and connects to a few newsgroups and uses filters to select messages (essentially email) and store them in a mysql table. That script could easily be written in PHP I guess. So you get the message and you re-arrange to fit the datamodel of your database and insert it. About the copyrights. I looked into this a bit and I'm not lawyer but I found nothing that said what I was doing would be wrong. I certainly reject any copyrighted material which is often posted but all that guy seems to be doing is to be reposting. In my case I'm actually culling data to repurpose and if I use chunks of posts from someone I give them credit. Here is the table I use to store data. I did this quickly and need to pare this down to the essentials. CREATE TABLE news ( Content_Disposition varchar(20) default NULL, Content_Transfer_Encoding varchar(20) default NULL, Content_Type varchar(50) default NULL, Reply_To varchar(50) default NULL, Subject varchar(100) default NULL, X_Accept_Language varchar(20) default NULL, X_Admin varchar(20) default NULL, X_Complaints_To varchar(20) default NULL, X_MSMail_Priority varchar(20) default NULL, X_Mailer varchar(20) default NULL, X_MimeOLE varchar(20) default NULL, X_Newsreader varchar(20) default NULL, X_No_Archive varchar(20) default NULL, X_Priority varchar(20) default NULL, X_Received_Date varchar(20) default NULL, X_Server_Date varchar(20) default NULL, X_Trace varchar(20) default NULL, X_UserInfo1 varchar(20) default NULL, Xref varchar(20) default NULL, MIME_Version varchar(20) default NULL, Message_ID varchar(20) NOT NULL default '', NNTP_Posting_Date varchar(20) default NULL, NNTP_Posting_Host varchar(20) default NULL, XFrom varchar(200) default NULL, Born varchar(20) default NULL, Distribution varchar(20) default NULL, XLines varchar(20) default NULL, Newsgroups varchar(50) default NULL, Organization varchar(20) default NULL, XReferences varchar(100) default NULL, body text, article_id int(11) default NULL, mysql_born date default NULL, tz char(3) default NULL, hour timestamp(14) NOT NULL, Name varchar(50) default NULL, this_group varchar(50) default NULL, visibility tinyint(4) default NULL, editor int(11) default NULL, PRIMARY KEY (Message_ID) ) TYPE=MyISAM; Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php