[PHP] $this-db-Record[WLPcountry.name]
Hello, I'm using phplib to add functionality to my bibliography app. However I'm not sure how to deal with selected data from different tables with the same field name. The example I provided in the signature was: $this-db-Record[WLPcountry.name] Which needs to be differentiated from: $this-db-Record[WLPpublisher.name] Ive added the table name (WLPpublisher WLPcountry) as a prefix assuming that this will carry over. Seems to wrok in some instances but not others. Any suggestions would be useful... The table is as follows: SELECT WLPbib.bibID, WLPbib.title, WLPbib.publicationDate, WLPbib.URL, WLPpublisher.name, WLPaddress.city, WLPaddress.state, WLPaddress.countryID, WLPcountry.name, WLPprofile.firstName, WLPprofile.middleName, WLPprofile.lastName, WLPprofile.organization FROM WLPbib LEFT JOIN WLPpublisher USING(publisherID), WLPaddress LEFT JOIN WLPcountry USING(countryID), WLPprofile LEFT JOIN WLPbib2profile USING(profileID) WHERE WLPpublisher.addressID = WLPaddress.addressID AND WLPbib2profile.bibID = WLPbib.bibID I'm making progress on this app. Thanks to the assistance of a lot of good folks. Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] $this-db-Record[WLPcountry.name]
- Original Message - From: Mike Gifford [EMAIL PROTECTED] Hello, I'm using phplib to add functionality to my bibliography app. However I'm not sure how to deal with selected data from different tables with the same field name. The example I provided in the signature was: $this-db-Record[WLPcountry.name] Which needs to be differentiated from: $this-db-Record[WLPpublisher.name] Any suggestions would be useful... You can use the AS keyword to rename the fields to whatever you want, for example: SELECT WLPbib.bibID, WLPbib.title, WLPbib.publicationDate, WLPbib.URL, WLPpublisher.name AS publisher_name, WLPaddress.city, WLPaddress.state, WLPaddress.countryID, WLPcountry.name AS country_name, WLPprofile.firstName, WLPprofile.middleName, WLPprofile.lastName, WLPprofile.organization FROM WLPbib So then, you'd have: $this-db-Record[country_name] and $this-db-Record[publisher_name] Hope this helps! Cheers - -- - - - Philip Murray - [EMAIL PROTECTED] http://www.open2view.com - Open2View.com - - -- - - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR Integrated Template Class
Dear Power Jessie (I just had to write that..): This is a bit to the side of your question, but if you are asking this question because you are trying to do what every web developer is trying to do today, namely, reach that holy grail of separating layout from content, you might look at binarycloud, found at http://www.binarycloud.com/. We looked at the dozen of YATS now a-building, nearly rolled our own (like you must be doing?), but finally settled on binarycloud for its other many elegant features. In any case, you can see in binarycloud how you can wrap up groups of PHP files within multiple layout templates and then the final generated HTML in a master template with the CSS et cetera. _jef - power jessie wrote: Hi! Anyone using this? Can someone point me to a link on how to use this class. Thanks in advance! ~{{}}~ jessie .o0O()O0o. -- j e s s i e @ p o w e r - j e s s i e . n e t -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 33 Need A Vacation? Let Us Take You On One for FREE...
You have been specially selected to qualify for the following: Premium Vacation Package and Pentium PC Giveaway To review the details of the please click on the link with the confirmation number below: http://www.1chn.com/wintrip
RE: [PHP] 33 Need A Vacation? Let Us Take You On One for FREE...
Whew! They're giving away a lot of vacations if we -all- qualify... :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 4:06 PM To: [EMAIL PROTECTED] Subject: [PHP] 33 Need A Vacation? Let Us Take You On One for FREE... You have been specially selected to qualify for the following: Premium Vacation Package and Pentium PC Giveaway To review the details of the please click on the link with the confirmation number below: http://www.1chn.com/wintrip
[PHP] Sending PDF-Doc as mail
Hello! I want to send a PDF-file as a mail. The problem: I want, that the user get's the PDF-document as soon as he clicks on the mail. That means: No text-part of the mail, the user should not have to click on the attachment-button of his mail-client. I tried: 1.) Set the header to something like: $header = From: [EMAIL PROTECTED]\n; $header .= Content-Type: application/pdf\n; $header .= Content-Transfer-Encoding: base64\n; $header .= Content-Desciption: My PDF-Doc; Works in: StarOffice Doesn't work in Netscape and M$-Outlook 2.) Use a multipart-message: Works in: StarOffice Doesn't work in Netscape and M$-Outlook Any idea, how this is done? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 22 Jul 2001 11:01:26 -0000 Issue 770
php-general Digest 22 Jul 2001 11:01:26 - Issue 770 Topics (messages 59034 through 59052): Image color quality problems 59034 by: Kurt Lieber 59035 by: Seb Frost 59037 by: Kurt Lieber 59038 by: Seb Frost 59039 by: Kurt Lieber PHP, Excel, CSV and Problems! 59036 by: Jeff Lacy netBIOS, Windows, Sockets, fsockopen help 59040 by: ReDucTor 59041 by: Chris Schneck 59043 by: Chris Schneck 59044 by: ReDucTor Re: PHP based statistics/Graphs 59042 by: Joe Conway 59045 by: eschmid+sic.s.netic.de $this-db-Record[WLPcountry.name] 59046 by: Mike Gifford 59047 by: Philip Murray Re: PEAR Integrated Template Class 59048 by: Justin Farnsworth 33 Need A Vacation? Let Us Take You On One for FREE... 59049 by: travelincentives.hotmail.com 59050 by: Matthew Loff Sending PDF-Doc as mail 59051 by: Martin IMAP Administration API? 59052 by: Christopher Cheng Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- I have the following code that takes an existing image, creates a new one from it and writes some white text on top of that image: ?php header(Content-type: image/png); $startingImage = leftphoto_01.png; $image = imageCreateFromPNG($startingImage); //$white = imageColorAt($image, 30, 215); $white = imageColorAllocate($image, 255, 255, 255); imageTTFText($image, 24, 0, 10, 25, $white, arialbd.ttf, This is a test); imagePNG($image); imagedestroy($image); ? Problem is, the white text isn't white -- it's a dingy gray color. From reading around, I thought maybe if I took an existing white pixel in the image and used that to set white, that might help (hence the commented out //$white = imageColorAt... line in my code above) That didn't help either. (and the pixel I sampled is exactly the shade of white I want) I am almost completely unfamiliar with color pallettes and how to manipulate them. Can someone shed some light on how I can get some clean, bright white text on my image? Thanks. --kurt Not an answer I'm afraid but does PHP has the ability to do this with JPEGs? Would be VERY useful to me if it does! - seb -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: 21 July 2001 23:27 To: [EMAIL PROTECTED] Subject: [PHP] Image color quality problems I have the following code that takes an existing image, creates a new one from it and writes some white text on top of that image: ?php header(Content-type: image/png); $startingImage = leftphoto_01.png; $image = imageCreateFromPNG($startingImage); //$white = imageColorAt($image, 30, 215); $white = imageColorAllocate($image, 255, 255, 255); imageTTFText($image, 24, 0, 10, 25, $white, arialbd.ttf, This is a test); imagePNG($image); imagedestroy($image); ? Problem is, the white text isn't white -- it's a dingy gray color. From reading around, I thought maybe if I took an existing white pixel in the image and used that to set white, that might help (hence the commented out //$white = imageColorAt... line in my code above) That didn't help either. (and the pixel I sampled is exactly the shade of white I want) I am almost completely unfamiliar with color pallettes and how to manipulate them. Can someone shed some light on how I can get some clean, bright white text on my image? Thanks. --kurt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Yes, it does, through the use of the GD and freetype libraries. (the freetype library is required for the imageTTFText function I used below) www.php.net/imagecreatefromjpeg -Original Message- From: Seb Frost [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 21, 2001 3:59 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Image color quality problems Not an answer I'm afraid but does PHP has the ability to do this with JPEGs? Would be VERY useful to me if it does! - seb -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: 21 July 2001 23:27 To: [EMAIL PROTECTED] Subject: [PHP] Image color quality problems I have the following code that takes an existing image, creates a new one from it and writes some white text on top of that image: ?php header(Content-type: image/png); $startingImage = leftphoto_01.png; $image = imageCreateFromPNG($startingImage); //$white = imageColorAt($image, 30, 215); $white = imageColorAllocate($image, 255, 255, 255); imageTTFText($image, 24, 0, 10, 25, $white, arialbd.ttf, This is a test); imagePNG($image); imagedestroy($image); ?
[PHP] mySQL query grief
Hi all, newbie to MySQL... I get this error: Supplied argument is not a valid MySQL result resource in /usr/local/ blah blah blah From this query: $username = juddy2; $sql = SELECT * FROM staff WHERE id=.$username; $result = mysql_query($sql); However, this works okay: $username = juddy2; $sql = SELECT * FROM staff; $result = mysql_query($sql); So, I guess my WHERE... stuff is wrong. I just want to retrieve the whole row of information relating to a certain user (eg juddy2). The usernames are unique in the table, contained in a column called id. Many Thanks in advance Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mySQL query grief
Justin - there's an error in your query. I think it should be: $sql = SELECT * FROM staff WHERE id='$username'; Anyway, to see which is the problem just ? print mysql_error(); ? after $result = mysql_query($sql); HTH Gianluca JF newbie to MySQL... JF I get this error: JF Supplied argument is not a valid MySQL result resource in /usr/local/ JF blah blah blah JF From this query: JF $username = juddy2; JF $sql = SELECT * FROM staff WHERE id=.$username; JF $result = mysql_query($sql); JF However, this works okay: JF $username = juddy2; JF $sql = SELECT * FROM staff; JF $result = mysql_query($sql); JF So, I guess my WHERE... stuff is wrong. I just want to retrieve the JF whole row of information relating to a certain user (eg juddy2). The JF usernames are unique in the table, contained in a column called id. JF Many Thanks in advance JF Justin French -- ALBASOFTWARE C/ Mallorca 186 - 3º 1ª 08036 Barcelona (Spain) Tel. +34 93454009 - +34 934549324 Fax. +34 934541979 @@ ICQ 47323154 @@ [EMAIL PROTECTED] http://www.albasoftware.com http://www.phpauction.org http://www.gianlucabaldo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Php4 with oracle
Please help me... !! How to install PHP4 with oracle function support ? , I use Windows 98, PWS Thanks Dhanie Angel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DEV] Re: IMAP/POP3 Administration API?
Christopher Cheng wrote: Have looked through it already. None of them allows me to add/delete users then you might be looking for something like webmin (http://www.webmin.com/webmin/), as MTAs usually use the systems user database instead of making up their own ... -- Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de +49-711-99091-77 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Mysterious MYSQL Error..
I'm stumped on this one.. I set up PHP 4.04/Apache/Mysql 3.23 on my Windows 98 box for development purpouses. Its been working flawlessly for 2-3 years now (using the same configuration files, etc). However, as of 3 days ago, i can't get it to execute a simple select * from table query. Here's the code I'm using: $query = select * from $this-table where $this-primary_key='$record_id'; $result = mysql_query($this-database, $query); echo mysql_errno().: .mysql_error().BR; and the query that it sends to the mysql database is select * from article where article_id='1'; However, mysql fails to execute the query. Result returns nothing and the echo command returns: errno: 0 mysql_error_text: ??!? I've tried everything to get it to display any more information as to why its breaking but nothing works. I even uninstalled and reinstalled all of the packages, thinking it had something to do with a windows dll file or something annoying like that but no luck. Any ideas? Anyone encountered a problem like this? Thanks, Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Mysterious MYSQL Error..
Never mind this one.. :) I figured out that it was because I'm using mysql_query, but declaring the database which means that the mysql_query command will fail and of course won't return a mysql_error code. Geeez... Another classic case of figuring out the problem in the process of trying to explain it to a colleague. I should 'pretend' to send a letter to php-general next time :p -greg -Original Message- From: Greg Schnippel [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 9:48 AM To: [EMAIL PROTECTED] Subject: [PHP] Mysterious MYSQL Error.. I'm stumped on this one.. I set up PHP 4.04/Apache/Mysql 3.23 on my Windows 98 box for development purpouses. Its been working flawlessly for 2-3 years now (using the same configuration files, etc). However, as of 3 days ago, i can't get it to execute a simple select * from table query. Here's the code I'm using: $query = select * from $this-table where $this-primary_key='$record_id'; $result = mysql_query($this-database, $query); echo mysql_errno().: .mysql_error().BR; and the query that it sends to the mysql database is select * from article where article_id='1'; However, mysql fails to execute the query. Result returns nothing and the echo command returns: errno: 0 mysql_error_text: ??!? I've tried everything to get it to display any more information as to why its breaking but nothing works. I even uninstalled and reinstalled all of the packages, thinking it had something to do with a windows dll file or something annoying like that but no luck. Any ideas? Anyone encountered a problem like this? Thanks, Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP]logic question
hey- I'm in the process of writing a links page for a website. I want to have all the links seperated by category, and those categories would be placed in different columns. This means also that different categories of links could be on the same row in the table used to lay it all out. i'm pulling the category out of the mysql db, does anyone have an example i can look at on how I might go about doing this?? chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with php and htmldoc
I am currently having a problem with php and htmldoc. I have a php script that queries a myql database and creates a series of tables each with a 800 x 600 product screenshot. The file is then sent to htmldoc to be converted into a pdf file. Here is my problem, if I request ten records (screenshots) or less everything works fine, however, if I request more than ten nothing happens (the php script creates the tables but the pdf file is not created). I have run htmldoc on the command line with the php created html file and it works without any problems regardless of the amount of tables(records). I have tried increasing the max script time and memory usage but it still doesn't work. Any ideas? thanks, Luis R. Lebron [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem with php and htmldoc
It is not exactly clear what you are doing. Are you buffering up the HTML file with ob_start, and then flushing the buffer after you run the buffer through htmldoc, that is, are you processing everything before into html before you flush out the page? If you are not buffering, then you probably have a side effect that you are blaming on a red herring, namely, more than ten records. Though I cannot know with the information supplied, it seems that you are not buffering, and ten records just happens to be the amount when the Apache buffer fills and sends the first packet. Then, what is left at the end of the built-up HTML, is a fragment in any case of illegal HTML that htmldoc will break on... Just what are you doing?? _jef Luis Lebron wrote: I am currently having a problem with php and htmldoc. I have a php script that queries a myql database and creates a series of tables each with a 800 x 600 product screenshot. The file is then sent to htmldoc to be converted into a pdf file. Here is my problem, if I request ten records (screenshots) or less everything works fine, however, if I request more than ten nothing happens (the php script creates the tables but the pdf file is not created). I have run htmldoc on the command line with the php created html file and it works without any problems regardless of the amount of tables(records). I have tried increasing the max script time and memory usage but it still doesn't work. Any ideas? thanks, Luis R. Lebron [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Referencing file?
OK so I have a number of different pages calling header.php4 as required. How can I set php in header.php4 to reflect the name of the document that called it? - seb -Original Message- From: Greg Schnippel [mailto:[EMAIL PROTECTED]] Sent: 22 July 2001 14:48 To: [EMAIL PROTECTED] Subject: [PHP] Mysterious MYSQL Error.. I'm stumped on this one.. I set up PHP 4.04/Apache/Mysql 3.23 on my Windows 98 box for development purpouses. Its been working flawlessly for 2-3 years now (using the same configuration files, etc). However, as of 3 days ago, i can't get it to execute a simple select * from table query. Here's the code I'm using: $query = select * from $this-table where $this-primary_key='$record_id'; $result = mysql_query($this-database, $query); echo mysql_errno().: .mysql_error().BR; and the query that it sends to the mysql database is select * from article where article_id='1'; However, mysql fails to execute the query. Result returns nothing and the echo command returns: errno: 0 mysql_error_text: ??!? I've tried everything to get it to display any more information as to why its breaking but nothing works. I even uninstalled and reinstalled all of the packages, thinking it had something to do with a windows dll file or something annoying like that but no luck. Any ideas? Anyone encountered a problem like this? Thanks, Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 0 is not a Sybase link index in /home/httpd/html/sy.php4 on
Hello PHP people, London is quite dark and bit cold :( a quick question, a)-what does this means? Warning: 0 is not a Sybase link index in /home/httpd/html/sy.php4 on line 3 - ia m writing the following code $link=sybase_connect(SYBASE,sa, ); $dbase=sybase_select_db_(pubs2,$link); please help Nelson _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP.... i suck at it
Ok this may sound really pathetic but how do i add a new line (like a space) to a code like this ?php echo IP ADDRESS; echo $remote_admin; ? cause when i try the code out it looks like IPADDRESS127.0.0.1 and i want it to look like IP ADDRESS 127.0.0.1 or IP ADDRESS 127.0.0.1 so what do i put in? Thanks for your time :)
[PHP] Control Structure Problem
This is driving me nuts. I couldn't sleep much last night trying to figure this out. This code assigns rooms to kids signing up for Sunday school at a very large church. Each subsequent registration is put into the next room on the list. It looks up in the MySQL database the room the last person in that age category and hour was assigned and assigns the current person the next one. If someone is the first person they get assigned the first room. However if they are the first person ${newroom.$x} doesn't get assigned to anything. But thereafter it works fine. I've had a couple other problems and am wondering if there is a better way to do this or if I have any syntax problems. Thanks. Jeff Oien $x = 1; while ($x = $Number_Children) { if (${category.$x} == 'SS KidZone - Kindergarten') { if ((${Grade.$x}) == 'K' (${selection.$x}) == '2nd Hour') { $sql = SELECT * FROM $table_name WHERE Category = 'SS KidZone - Kindergarten' Element1 = '2nd Hour' ORDER by ID desc; $result = @mysql_query($sql,$connection) or die(Couldn't execute query); if ($row = mysql_fetch_array($result)) { $room = $row['Element2']; if ($room == 'C143 Pink Check') { ${newroom.$x} = 'C143 Pink Dot'; } if ($room == 'C143 Pink Dot') { ${newroom.$x} = 'C148 Teal Check'; } if ($room == 'C148 Teal Check') { ${newroom.$x} = 'C148 Teal Dot'; } if ($room == 'C148 Teal Dot') { ${newroom.$x} = 'C143 Pink Check'; } } else { ${newroom.$x} = 'C143 Pink Check'; } } do database insertion } $x++; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Control Structure Problem
I forgot to say I deleted tabs so that the width might fit in a typical mail reader. Jeff Oien This code assigns rooms to kids signing up for Sunday school at a very large church. Each subsequent registration is put into the next room on the list. It looks up in the MySQL database the room the last person in that age category and hour was assigned and assigns the current person the next one. If someone is the first person they get assigned the first room. However if they are the first person ${newroom.$x} doesn't get assigned to anything. But thereafter it works fine. I've had a couple other problems and am wondering if there is a better way to do this or if I have any syntax problems. Thanks. Jeff Oien $x = 1; while ($x = $Number_Children) { if (${category.$x} == 'SS KidZone - Kindergarten') { if ((${Grade.$x}) == 'K' (${selection.$x}) == '2nd Hour') { $sql = SELECT * FROM $table_name WHERE Category = 'SS KidZone - Kindergarten' Element1 = '2nd Hour' ORDER by ID desc; $result = @mysql_query($sql,$connection) or die(Couldn't execute query); if ($row = mysql_fetch_array($result)) { $room = $row['Element2']; if ($room == 'C143 Pink Check') { ${newroom.$x} = 'C143 Pink Dot'; } if ($room == 'C143 Pink Dot') { ${newroom.$x} = 'C148 Teal Check'; } if ($room == 'C148 Teal Check') { ${newroom.$x} = 'C148 Teal Dot'; } if ($room == 'C148 Teal Dot') { ${newroom.$x} = 'C143 Pink Check'; } } else { ${newroom.$x} = 'C143 Pink Check'; } } do database insertion } $x++; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] $this-db-Record[WLPcountry.name]
That did the trick Philip! Thanks for your help. Mike Philip Murray wrote: - Original Message - From: Mike Gifford [EMAIL PROTECTED] Hello, I'm using phplib to add functionality to my bibliography app. However I'm not sure how to deal with selected data from different tables with the same field name. The example I provided in the signature was: $this-db-Record[WLPcountry.name] Which needs to be differentiated from: $this-db-Record[WLPpublisher.name] Any suggestions would be useful... You can use the AS keyword to rename the fields to whatever you want, for example: SELECT WLPbib.bibID, WLPbib.title, WLPbib.publicationDate, WLPbib.URL, WLPpublisher.name AS publisher_name, WLPaddress.city, WLPaddress.state, WLPaddress.countryID, WLPcountry.name AS country_name, WLPprofile.firstName, WLPprofile.middleName, WLPprofile.lastName, WLPprofile.organization FROM WLPbib So then, you'd have: $this-db-Record[country_name] and $this-db-Record[publisher_name] Hope this helps! Cheers - -- - - - Philip Murray - [EMAIL PROTECTED] http://www.open2view.com - Open2View.com - - -- - - -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Automatic survey
I have made a small page containing the following PHP ?php echo Ip addressBR; echo $REMOTE_ADDR; echo BRBRPort numberBR; echo $REMOTE_PORT; echo BRBRSystem infoBR; echo $HTTP_USER_AGENT; echo BRBRLast page visited in this windowBR; echo $HTTP_REFERER; ? is there any way i can make the PHP file email me the info above without revealing the users address, if so, what should i add to the code? (dont worry im only using the code above as a tester, as you can tell im not a hacker) -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
RE: [PHP] PHP.... i suck at it
I think you want this: ?php echo IP ADDRESS \n; echo $remote_admin; ? \n is the newline code. so a double newline will look like: echo IP ADDRESS \n\n; Kees Hoekzema -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 2:47 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP i suck at it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP.... i suck at it
Well, there are a few ways to do it. The secret is to know a little bit of HTML. Another poster suggested using the br (line break) tag. The paragraph tag would also work nicely: ?php echo pIP ADDRESS/p; echo p$remote_admin/p; ? Or you could start to get fancy by doing it with a table: ?php echo table; echo trtdIP ADDRESS/td/tr; echo trtd$remote_admin/td/tr; echo /table; ? When I'm writing code such as the above, though, I usually do something more like this: p IP ADDRESSbr ?php echo $remote_admin; ? /p Hope that helps! Matt On Sun, Jul 22, 2001 at 05:46:30PM -0700, Kyle Smith wrote: Ok this may sound really pathetic but how do i add a new line (like a space) to a code like this ?php echo IP ADDRESS; echo $remote_admin; ? cause when i try the code out it looks like IPADDRESS127.0.0.1 and i want it to look like IP ADDRESS 127.0.0.1 or IP ADDRESS 127.0.0.1 so what do i put in? Thanks for your time :) -- Matt Garman, [EMAIL PROTECTED] I'll tip my hat to the new constitution, Take a bow for the new revolution Smile and grin at the change all around, Pick up my guitar and play Just like yesterday, Then I'll get on my knees and pray... -- Pete Townshend/The Who, Won't Get Fooled Again -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP shell scripting..
I have some questions about using PHP as a shell scripting language... mainly how you pass arguments to a script on the command line. Say I'm using: -- #!/usr/local/bin/php -q ? print I am: $name\n; ? -- How do I define test from the command line (as an argument while executing the script)? Thanks in advance for the help! - Ryan Christensen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP shell scripting..
Hello Ryan, You can use environment variables for that, like: echo $HOME; /* Shows the HOME environment variable, if set. */ You can also use getenv() en putenv() see also: http://nl.php.net/manual/en/language.variables.external.php hope it works :) - Kees -Original Message- From: Ryan Christensen [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 8:19 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP shell scripting.. I have some questions about using PHP as a shell scripting language... mainly how you pass arguments to a script on the command line. Say I'm using: -- #!/usr/local/bin/php -q ? print I am: $name\n; ? -- How do I define test from the command line (as an argument while executing the script)? Thanks in advance for the help! - Ryan Christensen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Automatic survey
Hey Ryan Look at this :) http://nl.php.net/manual/en/function.mail.php so a thing like: mail([EMAIL PROTECTED], My Own Subject, \ IP:\n$REMOTE_ADDR\n \ Port Number:\n$REMOTE_PORT\n \ System info:\n$HTTP_USER_AGENT\n \ Last page visited in this window\nHTTP_REFERER\n); should do the trick :) Hope it helps, -Kees -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 3:44 AM To: [EMAIL PROTECTED] Subject: [PHP] Automatic survey I have made a small page containing the following PHP ?php echo Ip addressBR; echo $REMOTE_ADDR; echo BRBRPort numberBR; echo $REMOTE_PORT; echo BRBRSystem infoBR; echo $HTTP_USER_AGENT; echo BRBRLast page visited in this windowBR; echo $HTTP_REFERER; ? is there any way i can make the PHP file email me the info above without revealing the users address, if so, what should i add to the code? (dont worry im only using the code above as a tester, as you can tell im not a hacker) -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP shell scripting..
Hello Ryan, Let me give you an example :) Lets use your script, #!/usr/local/bin/php -q ? print I am: $name\n; ? i called it echo-name.php and chmod 755 it. Next, im going to call it: -- Athena:~$ name=kees Athena:~$ ./echo-naam I am: kees -- So the trick is to set the variable BEFORE you call the script you can see all variables already used by linux with set you'll get something like this: -- Athena:~$ set BASH=/bin/bash BASH_VERSINFO=([0]=2 [1]=03 [2]=0 [3]=1 [4]=release [5]=i386-slackware-linux-gnu) BASH_VERSION='2.03.0(1)-release' COLUMNS=80 DIRSTACK=() (...snip...) TERM=xterm UID=1034 USER=kees _=./echo-naam file=/etc/profile.d/tetex.sh ignoreeof=10 name=kees - As you can see, our variable name is there, and it is set. to set a variable, simply type this at the commandline (or script) - variable=value --- where variable is your variable and value your value :) Good luck :) -Kees -Original Message- From: Ryan Christensen [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 8:30 PM To: 'Kees Hoekzema' Subject: RE: [PHP] PHP shell scripting.. I'm slightly confused as to how I would run this from a shell though.. what would I enter in the command line then? - Ryan Christensen (mail) [EMAIL PROTECTED] (cell) 360-808-1506 -Original Message- From: Kees Hoekzema [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 11:27 AM To: Ryan Christensen; [EMAIL PROTECTED] Subject: RE: [PHP] PHP shell scripting.. Hello Ryan, You can use environment variables for that, like: echo $HOME; /* Shows the HOME environment variable, if set. */ You can also use getenv() en putenv() see also: http://nl.php.net/manual/en/language.variables.external.php hope it works :) - Kees -Original Message- From: Ryan Christensen [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 8:19 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP shell scripting.. I have some questions about using PHP as a shell scripting language... mainly how you pass arguments to a script on the command line. Say I'm using: -- #!/usr/local/bin/php -q ? print I am: $name\n; ? -- How do I define test from the command line (as an argument while executing the script)? Thanks in advance for the help! - Ryan Christensen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Whats wrong with this code?
$message = $IP, $PORT, $SYSTEM, $PAGE; what should i change in the $message code so that it contains the words assigned to the variables? -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
RE: [PHP] PHP shell scripting..
Thanks.. that helps out a lot. Next question.. is there a way I can prompt for input? For example.. have a prompt Name: .. that waits for the user to enter their name.. and then assignes whatever they enter to a variable. Think you can help? :) Thanks... - Ryan Christensen -Original Message- From: Kees Hoekzema [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 22, 2001 11:41 AM To: Ryan Christensen Cc: [EMAIL PROTECTED] Subject: RE: [PHP] PHP shell scripting.. Hello Ryan, Let me give you an example :) Lets use your script, #!/usr/local/bin/php -q ? print I am: $name\n; ? i called it echo-name.php and chmod 755 it. Next, im going to call it: -- Athena:~$ name=kees Athena:~$ ./echo-naam I am: kees -- So the trick is to set the variable BEFORE you call the script you can see all variables already used by linux with set you'll get something like this: -- Athena:~$ set BASH=/bin/bash BASH_VERSINFO=([0]=2 [1]=03 [2]=0 [3]=1 [4]=release [5]=i386-slackware-linux-gnu) BASH_VERSION='2.03.0(1)-release' COLUMNS=80 DIRSTACK=() (...snip...) TERM=xterm UID=1034 USER=kees _=./echo-naam file=/etc/profile.d/tetex.sh ignoreeof=10 name=kees - As you can see, our variable name is there, and it is set. to set a variable, simply type this at the commandline (or script) - variable=value --- where variable is your variable and value your value :) Good luck :) -Kees -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Whats wrong with this code?
do you mean.. $message = $IP. $PORT. $SYSTEM . $PAGE; . not , $message = $IP, $PORT, $SYSTEM, $PAGE; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP shell scripting..
In article 001c01c112da$b8c0d420$0d6fa8c0@local, Ryan Christensen wrote: I have some questions about using PHP as a shell scripting language... mainly how you pass arguments to a script on the command line. Say I'm using: -- #!/usr/local/bin/php -q ? print I am: $name\n; ? -- How do I define test from the command line (as an argument while executing the script)? The script arguments are in an array ($argv). Get them by using something like: ?php print I am . $argv[1]; ? Regards, Hans -- http://phpreview.nl.linux.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] regex for cleaning up username
Am partially successfull after taking a further look into things. the following (while ugnly) correctly catches everything except the \ character for some reason. ideas? if(preg_match(/['.' ,!@#$%\^*()+=\/\\:;?|]/',$MyString)){ # echo error, character found } -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Try searching for anything that's not a word character: if(preg_match(/\W/,$mystring)) that should return true if it matches anything except for a letter, number, or _... Will likely switch to that syntax for brevity sake. your regex didn't work because you didn't use /'s at the beginning and end of your regex... caught this one after further review of the regex documentation -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP]logic question
try: http://php.resourceindex.com/Complete_Scripts/Link_Management/ you should be able to find some examples here. __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Mysterious MYSQL Error..
Do you know if you've even made a valid database connection? Try echoing $this-database as well. If that is null, you haven't connected to your database; perhaps the username, password and or permissions were changed, so that you're unable to connect from your PHP program. - steve At 9:47 AM -0400 7/22/01, Greg Schnippel wrote: I'm stumped on this one.. I set up PHP 4.04/Apache/Mysql 3.23 on my Windows 98 box for development purpouses. Its been working flawlessly for 2-3 years now (using the same configuration files, etc). However, as of 3 days ago, i can't get it to execute a simple select * from table query. Here's the code I'm using: $query = select * from $this-table where $this-primary_key='$record_id'; $result = mysql_query($this-database, $query); echo mysql_errno().: .mysql_error().BR; and the query that it sends to the mysql database is select * from article where article_id='1'; However, mysql fails to execute the query. Result returns nothing and the echo command returns: errno: 0 mysql_error_text: ??!? I've tried everything to get it to display any more information as to why its breaking but nothing works. I even uninstalled and reinstalled all of the packages, thinking it had something to do with a windows dll file or something annoying like that but no luck. Any ideas? Anyone encountered a problem like this? Thanks, Greg -- +-- Factoid: Of the 100 largest economies in the world, 51 are --+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +--- corporations -- http://www.ips-dc.org/reports/top200text.htm ---+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] exec() and memory consumption
Hi all, I am trying to execute a shell command from PHP. This command consumes a lot of memory and execution time, so I changed max_execution_time = 120 and memory_limit = 25600 in my php.ini. Still, under PHP, the command stops after some time (every time at the same point). When I execute the command from the command line, it finishes okay. By the way, I am executing : 'fop file.xml file.xsl file.pdf | logger' so I can monitor the output in /var/log/messages. Fop is the (Java) PDF generator from the Apache XML group. Can anyone tell me if there is a built in memory limit in PHP (e.g. 16 meg), or does anyone have had the same phenomenon when running something similar ? Any comments are greatly appreciated... Thx, Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: regex for cleaning up username
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Dave) wrote: Cannot seem to get a regex to check a string for the following space tab ' ! @ # $ % ^ * ( ) + = : ; / \ if(preg_match('[\' ,!@#$%\^*()+=:;/\\]',$mystring)) You need pattern delimiters with preg_* expressions. Right now it's using your square brackets at the delimiters, so instead of a character class (match on any of these), you're trying to match a string matching the entire sequence of characters between the square brackets. Try: if(preg_match('|[\' ,!@#$%\^*()+=:;/\\]|',$mystring)) -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] regex for cleaning up username
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Dave) wrote: Am partially successfull after taking a further look into things. the following (while ugnly) correctly catches everything except the \ character for some reason. ideas? if(preg_match(/['.' ,!@#$%\^*()+=\/\\:;?|]/',$MyString)){ # echo error, character found } Try four backslashes instead of two: preg_match(/['.' ,!@#$%\^*()+=\/:;?|]/',$MyString) -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Guaranteed to work, please give this a chance....
Dear [EMAIL PROTECTED], AS SEEN ON NATIONAL TELEVISION Making over 500,000.- US$ from your home for a one time investment of only 25 United States Dollars! THANK'S TO THE COMBINATION OF THE SPEED, THE LOW COST PER CONTACT AND THE POTENTIAL OF MULTI-LEVEL-MARKETING BY E-MAIL! __ Before you say ''Bull..'', please read the following. This is the letter you have been hearing about on the TV-NEWS lately. Due to the popularity of this letter on the Internet, a national weekly news program recently devoted an entire show to the investigation of this program described below. This to see, if it really makes people money. The show also investigated whether or not the program was legal. Their findings proved once and for all times, that there are absolutely no Laws prohibiting the participation in the program and if people can follow the simple instructions, they are bound to make a lot of bucks with 25.- US$ out of your pocket only. DUE TO THE RECENT INCREASE OF POPULARITY RESPECT THIS PRO- GRAM HAS ATTAINED, IT IS CURRENTLY WORKING BETTER THAN EVER ! _ This is what one had to say: Thanks to this profitable opportunity. I was approached many times before but each time deleted it. I am so glad I finally joined, just to see what one could expect in return for the minimal effort and money required. To my astonish- ment, I received a total of: 610,470.- US$ in 21 weeks, with money still coming in. Pamela Hedland, Fort Lee, New Jersey. _ Here is another testimonial: This program has been around for a long time but I never believed in it. But one day when I received this again in the mail I decided to gamble my 25.- US$ on it. I followed the simple instructions and 3 weeks later the money started to come in. First month I only made 240.- US$ but the next 2 months after that I made a total of 290,000.- US$ ! So far, in the past 8 months by re-entering the program, I have made over 710,000.- US$ and I am playing it again. The key to success in this program is to follow the simple steps and do not change anything. ===PRINT THIS NOW FOR YOUR FUTURE REFERENCE === If you would like to make at least 500,000.- US$ every 4 to 5 months easily and comfortably, please read the following and read it again and again !!! FOLLOW THE SIMPLE INSTRUCTION BELOW AND YOUR FINANCIAL DREAMS WILL COME TRUE, GUARANTEED! ==ORDER ALL 5 REPORTS SHOWN ON THE LIST BELOW== For each report, send 5.- $ cash. Do not forget to mention (write): - THE NAME NUMBER OF THE REPORT YOU ARE ORDERING - YOUR E-MAIL ADDRESS Send all together in an envelope to the person whose name appears on the list below next to the report. MAKE SURE YOUR RETURN ADDRESS IS ON THE ENVELOPE !! This just in case of any mail problems. When you place your orders, make sure that you order each (all) of the 5 reports. You will need all 5 reports to save them on your computer and resell them. YOUR TOTAL EXPENSES WILL BE: 5 X 5.-US$ = 25.-US$ plus mailing fees! Within a few days you will receive, vie e-mail, each of the 5 reports from these 5 different individuals. Save them on your computer so they will be accessible for you to send to the 1,000's of people who will order them from you. Also make a floppy of these reports and keep it on your desk in case something happen to your computer. IMPORTANT ! Do not change the names of the people who are listed next to each report! Do also not change their sequence on the list, in another way than it is instructed below in step 1 to 6! If you do, you will lose a majority of your future profits. Because you would damage not only yours but the performance of others as well, you at least for politness do better not try to make changes other than instructed, it would be very unfair, without giving yourself any better performance. Once you understand the way this works, you will also see how it does not work if you change it. Remember, this method has been tested, and if you make changes, it will NOT work !!! People have tried to put their friends/relatives names on all five thinking they could get all the money. But it does not work this way. Believe us, we all have tried to be greedy and then nothing happened. So Do Not try to change anything other than what is instructed. Because if you do, it will not work for you and for others as well. Remember, honesty reaps the reward !!! __ Steps 1 6 1. After you have ordered all 5 reports, take this e-mail and REMOVE the name and the address of the person near to REPORT # 5. This person has made it through the cycle and is no doubt counting their fortune. 2. Move the name address near REPORT
[PHP] PHP Imagemagick
Does anyone know if there are PHP specific bindings for ImageMagick out there? If not, anyone want to work on them... :) Thanks, Wes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Imagemagick
How do you mean bindings? I've used PHP and Imagemagick.. but only from the point of view of exec Do you mean building them into PHP functions? - Original Message - From: Weston Houghton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 22, 2001 11:05 PM Subject: [PHP] PHP Imagemagick Does anyone know if there are PHP specific bindings for ImageMagick out there? If not, anyone want to work on them... :) Thanks, Wes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SESSIONS FILES
Hi all, I just started to work with SESSIONS in PHP. Its turning out to be a great way to keep user info alive across multiple pages. My question is, how long does a session temp file stored on the server exists for? Is it just for the current session? If the user shuts down their browser an turn is on again can I still call the original session? I just need to know that I am not creating multiple session files and cluttering up a server. New to this news group! is there a thread with rules? please post link... thx DRB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Imagemagick
Yup, a native PHP module for ImageMagick that accesses their API. This would allow one to actually pass parameters a bit easier and test for success or failure more consistently, at least, I think it would... Wes How do you mean bindings? I've used PHP and Imagemagick.. but only from the point of view of exec Do you mean building them into PHP functions? - Original Message - From: Weston Houghton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 22, 2001 11:05 PM Subject: [PHP] PHP Imagemagick Does anyone know if there are PHP specific bindings for ImageMagick out there? If not, anyone want to work on them... :) Thanks, Wes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Imagemagick
So sprach »Weston Houghton« am 2001-07-22 um 15:14:54 -0700 : Yup, a native PHP module for ImageMagick that accesses their API. This would allow one to actually pass parameters a bit easier and test for success or failure more consistently, at least, I think it would... Hmm, don't know about ImageMagick, but have a look at php_imlib. Find the URL yourself! :) Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 0 hours 41 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sleep() function question
just wanted to make sure I was not doing anything incorrectly. I want to return some values to the screen and then sleep(), then return more values. It seems that nothing is returned till the sleep is over and then all the values are returned at once. Is this the natural function of sleep(); thanks, DRB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Web Site Alert: Not Responding
There appears to be a problem in reaching your Web site at http://www.e-gineer.com/articles/php-hackers-paradise-revisited.phtml. Time of Error: 2001-07-22 18:27:57 Error Type: Time Out InternetSeer, a Web site monitoring company, is conducting an ongoing study of the true connectivity of the Web. As recommended by the Robots Guidelines, this email is being sent to explain our research activities and to let you know about the difficulty in connecting to your site. If you would like InternetSeer to continue to alert you at no charge whenever there is a problem reaching your Web site, click here: http://scclick.internetseer.com/sitecheck/clickthrough.jsp?I5s57j5d5i5g53M5pyQN5aLGeu1IMw6uI5sCSzPW5ayQN5byVP55P5qQxPz5m5c5eTUK5aR5cDLyVRP5a_wC5c_wPS6vCMz5czMy5cM6uRQRPz5az6tz__LWV5aPVTSzLTVV5dNXTCC55x5q5g=e3 InternetSeer does not store or publish the content of your pages, but rather uses availability and link information for our research. Click here to learn more about InternetSeer. http://scclick.internetseer.com/sitecheck/clickthrough.jsp?I5s57j5d5i5g53M5pyQN5aLGev1IMw6uI5sCSzPW5ayQN5byVP55P5qQxPz5m5c5eTUK5aR5cDLyVRP5a_wC5c_wPS6vCMz5czMy5cM6uRQRPz5az6tz__LWV5aPVTSzLTVV5dNXTCC55x5q5h=e3 Mike Dever President [EMAIL PROTECTED] Note: If you prefer not to receive these occasional alerts regarding the availability of your Web site, reply to this email with Cancel in the subject line. Please leave a full copy of this message in the body of your reply email. ##[EMAIL PROTECTED]##
[PHP] Your Web Site is Now Responding
We are pleased to inform you that Your Web site is back up and is no longer on error. URL: http://www.e-gineer.com/articles/php-hackers-paradise-revisited.phtml Time: 2001-07-22 19:19:25 As mentioned in the first alert, InternetSeer is conducting an ongoing study of the true connectivity of the Web. As recommended by the Robots Guidelines, this email is being sent to explain our research activities and to let you know about the difficulty in connecting to your site. If you would like InternetSeer to continue to alert you at no charge whenever there is a problem reaching your Web site, click here: http://scclick.internetseer.com/sitecheck/clickthrough.jsp?I5s57j5e5h5k53M5pyQN5aLGf21IMw6uI5sCSzPW5ayQN5byVP55P5qQxPz5m5c5eTUK5aR5cDLyVRP5a_wC5c_wPS6vCMz5czMy5cM6uRQRPz5az6tz__LWV5aPVTSzLTVV5dNXTCC55x5q5g=e3 InternetSeer does not store or publish the content of your pages, but rather uses availability and link information for our research. Click here to learn more about InternetSeer. http://scclick.internetseer.com/sitecheck/clickthrough.jsp?I5s57j5e5h5k53M5pyQN5aLGf31IMw6uI5sCSzPW5ayQN5byVP55P5qQxPz5m5c5eTUK5aR5cDLyVRP5a_wC5c_wPS6vCMz5czMy5cM6uRQRPz5az6tz__LWV5aPVTSzLTVV5dNXTCC55x5q5h=e3 Mike Dever President [EMAIL PROTECTED] Note: If you prefer not to receive these occasional alerts regarding the availability of your Web site, reply to this email with Cancel in the subject line. Please leave a full copy of this message in the body of your reply email. ##[EMAIL PROTECTED]##
[PHP] One2Many Logic Problem - phpMySQL bibliography
Hello, I'm not sure if anyone else as the need for a php/MySQL based bibliography, but the application that I am developing (which is basically a module for phpSlash) is coming along fairly well. If anyone is interested in seeing the code I can bundle it up and send it out to them (still a long way from finished mind). The draft version of it is up and running here: http://openconcept.ca/WLP/biblio/index.php3 I'm running into a couple problems though that I don't have the logic language for and I was hoping folks here could help me (as you have done in the past). The problem is that I've set up a many to many table to ensure that I can have an author be listed as writing many books and a book be written by many authors. However in listing the books as a bibliography (as the URL above), I want to be able to list multiple authors, and do so in a different format for the first author than for all subsequent ones. I'm hoping to be able to produce output like this: Young, D. and N. Dixon. Helping Leaders Take Effective Action: A Program Evaluation. Greensboro, North Carolina: Center for Creative Leadership, 1996. So, I think the first challenge should be to calculate which books have multiple authors by doing something like this (It's using phplib structures, sorry): $q2 = SELECT * FROM WLPbib2profile ORDER BY bibID; $this-db-query($q2); // Performs above query while ($this-db-next_record()) { if ($this-db-Record[bibID] != $last_bibID) { echo br . $this-db-Record[bibID] . : . $this-db-Record[profileID]; } else { // Multiple Authors echo , . $this-db-Record[profileID]; $multiple_profileID .= array ($this-db-Record[bibID] = $this-db-Record[profileID]); $multiple_profileID .= array($this-db-Record[bibID] = yes); } $last_bibID = $this-db-Record[bibID]; } } With this I can then use the value $multiple_profileID to determine if this record has duplicates or not and use something like this to include both authors and not repeat the bibliography item: if ($multiple_profileID[$bibID]==yes) { while (list($key, $val) = each($multiple_profileID)) { $written_by = $key . : . $val . br; if ($this-db-Record[firstName]) { $written_by .= stripslashes($this-db-Record[firstName]) . ; } if($this-db-Record[lastName]) { $written_by .= stripslashes($this-db-Record[lastName]); } } } else { if($this-db-Record[lastName]) { $written_by .= stripslashes($this-db-Record[lastName]) . , ; } if ($this-db-Record[firstName]) { $written_by .= stripslashes($this-db-Record[firstName]); } } But this seems really awkward (at the best of times) and (worst of all) it isn't working. I've got another related problem in that I've set up the following fields in one table: firstName lastName organization and I need to be able to order them by a combination of lastName organization. I could list the organization field simply as the lastName, but that seems like it would be confusing the data types... Must be a way around this.. I suspect it is limited by my logic not PHP's. Any ideas would be appreciated. Mike -- Mike Gifford, OpenConcept Consulting, http://openconcept.ca Offering everything your organization needs for an effective web site. Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ It is a miracle that curiosity survives formal education. - A Einstein -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] removing lines from array
I an trying to figure out how to remove lines from a text file from within an array. I fill the array with this $recordsarray = file (../auto/records); The lines I what to remove have this in them $remove = schopf.net ; What I need is how to loop through this array and pull out the lines that have what is in the $remove variable. Then I will write the array to a temp file and thin copy it back to the records file This is a small sample of the file I what two remove lines from mx - schopf.net High www.schopf.net ptr - readinggenius.tv 207.200.75.55 24 a - time-management-by-higher-productivity.com 207.252.75.55 24 ptr www speedreading123.com 207.200.75.55 24 ptr - mindbodyspirit123.com 207.200.75.247 24 a www schopf.net 207.252.75.242 24 soa - schopf.net dns1.northwesthost.com:dns2.northwesthost.com:[EMAIL PROTECTED]:10800:3600:604800:86400 - Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] magic quotes
how do i get around this?i have a script works great for me, but the clients php config has this set magic_quotes_gpc on. isnt there a varible i can change to eliminate this for my script? if so how do you use it? Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0
[PHP] bitwise AND is acting strange
The users on my website all have an access number that is used to give them access to different parts of the site. Each bit represents a different part of the site. So, if a user has an access of 10, which is 1010 in binary, they have access to the parts of the site that are represented by the second and fourth bit. You know, standard bit masking stuff. So the part of the site that is represented by the second bit has a value of 2 (0010), and the part that is represented by the fourth bit has a value of 8 (1000) BUT, for some reason when I do (2 10) its giving me a result of zero, when I believe it should be doing (0010 1010) and giving me an answer of 0010 which is 2 in decimal. With users with an access other than 10, say 9, or 8, or 7, it seems to behave normally. What is going on? Is it treating the 10 as a binary 2? These access values are stored in a mysql table as a standard INT, and they are not UNSIGNED or BINARY. Am I missing something? Jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] HTTP Authentication and PHP
Hi all, I've been playing around with PHP authentication via HTTP. I'm using apache, and when i use the header('WWW_Auth...) headers i get a username/password dialog pop up (as i wanted). How do i get those values unset in the browser, so that i can get a user to re authenticate ? I need to get a user to re-auth part way through the use of the app i'm writing becasue they are deleting files from a file system. Also how would i allow them to logout and let someone else log in. The docs seemed to imply that the headers command should have repopped the auth box. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php
Sir, What do I do with my php? how can I compile my php with mysql support? my problem is I already compile my php what do I do do? I will remove it? axel
[PHP] Replace ANYTHING between TAG /TAG
I've been trying this one for a bit and Im in a twist. I need to replace ANYTHING or even nothing between two tags with the contents of a variable and just havent been able to get the expression right for all cases. As an example concept follows: TAG/TAG Nothing between the tags variable is $varname=some junk so after the function TAGsome junk/TAG run it again after making variable $varname=some completly different junk so now the tags would be TAGsome completly different junk/TAG and so on and so on. One other breaker Ive had, it needs to always replace no matter whats between the tags, whats not between the tags or even if its 1000s of characters. My code kept breaking when it was alot of characters. Any funtions or even just the right regex would be appreciated Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sleep() function question
I know very little about PHP, but in other languages, what u describe happens because the webserver doesn't send the output until the excution is done... But you can make it write your output as its generated... check out the function flush also after 20seconds of looking, I found ob_implicit_flush that may help as well.. Hope I could help Andrew - Original Message - From: drb [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 22, 2001 11:25 PM Subject: [PHP] sleep() function question just wanted to make sure I was not doing anything incorrectly. I want to return some values to the screen and then sleep(), then return more values. It seems that nothing is returned till the sleep is over and then all the values are returned at once. Is this the natural function of sleep(); thanks, DRB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php.ini and mod_php4
I'm having a bit of a prob... I'm new to Linux and restarting apache isn't acting right, in Win I had no problems. I edit php.ini, restart apache, but the changes are not taking effect. I installed the ming and pdflib .so's but they are not being incorporated. Hell, I edited the ini to turn the php engine off but even that had no effect after a restart. BTW, I'm using Webmin. Any help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Replace ANYTHING between TAG /TAG
?php $tagname = tag; $somevar = text; echo .$tagname..nl2br(htmlspecialchars(stripslashes($somevar)))./.$tagna me.; ? - Original Message - From: Dan Krumlauf [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 2:36 PM Subject: [PHP] Replace ANYTHING between TAG /TAG I've been trying this one for a bit and Im in a twist. I need to replace ANYTHING or even nothing between two tags with the contents of a variable and just havent been able to get the expression right for all cases. As an example concept follows: TAG/TAG Nothing between the tags variable is $varname=some junk so after the function TAGsome junk/TAG run it again after making variable $varname=some completly different junk so now the tags would be TAGsome completly different junk/TAG and so on and so on. One other breaker Ive had, it needs to always replace no matter whats between the tags, whats not between the tags or even if its 1000s of characters. My code kept breaking when it was alot of characters. Any funtions or even just the right regex would be appreciated Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Clarify: SEARCH AND replace between TAG /TAG
Sorry I wasn't clear. I need to search for the TAG/TAG combo in an html file. Thats why I asked for a regex. So I need to load in the html SEARCH for the tags and anything in between the tags throw out and REPLACE with the contents of a variable and then rewrite the file. My orginal message follows: I've been trying this one for a bit and Im in a twist. I need to replace ANYTHING or even nothing between two tags with the contents of a variable and just havent been able to get the expression right for all cases. As an example concept follows: TAG/TAG Nothing between the tags variable is $varname=some junk so after the function TAGsome junk/TAG run it again after making variable $varname=some completly different junk so now the tags would be TAGsome completly different junk/TAG and so on and so on. One other breaker Ive had, it needs to always replace no matter whats between the tags, whats not between the tags or even if its 1000s of characters. My code kept breaking when it was alot of characters. Any funtions or even just the right regex would be appreciated Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php 4.0.6
Hi Rasmus, I did a phpinfo() and gives me the following output: PHP Version 4.0.6 System Linux pcs.pcsadvt.com 2.2.16-22 #1 Tue Aug 22 16:16:55 EDT 2000 i586 unknown Build Date Jul 20 2001 Configure Command './configure' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--disable-static' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-track-vars' '--enable-ftp' '--with-mysql' '--with-xml' '--enable-trans-sid' '--with-sockets' '--with-readline' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /etc ZEND_DEBUG disabled Thread Safety disabled I did a make install and restarted my httpd. Lets forget the readline() what about sockets? Why does that not work? Adrian On Sat, 21 Jul 2001, Rasmus Lerdorf wrote: No idea. You haven't said whether you checked your phpinfo() output to see if you are actually running the latest version of PHP you just compiled. Perhaps you forgot a make install, perhaps you forgot to restart your httpd. Perhaps your configure didn't find libreadline. Any number of things could be wrong. You will have to do a little bit of digging on your own. -Rasmus Hi, I have now compiled php --with-readline and --with-sockets but I still get the call to undefined function socket() what could be wrong. Adrian On Thu, 19 Jul 2001, Rasmus Lerdorf wrote: Did you compile php using --with-readline ? On Thu, 19 Jul 2001, Adrian D'Costa wrote: Hi, I am trying to use the socket or readline functions but get a message: call to undefined function readline(). Why? Is this not implemented in 4.0.6. Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] formatting host output
On Sat, 21 Jul 2001 06:32, Tyler Longren wrote: $data = exec(host $lookup); printf(pre%s/pre, $data); How can I format the output of that properly? Sometimes, it's all on one line, and it's fine. Other times, there's more than one line...like if there was an alias. Any way to format it like it is on the command line? Thanks, Tyler $data = exec(host $lookup, $ary); while(list(,$val) = each($ary)) { echo $val . 'BR'; } You need to assign the output of exec to an array if you want to capture multiple lines of output. Check the manual for more detail. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Try our NEW *SOLAR POWERED* tanning salon! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] formatting host output
If $lookup is passed from the client, then you should be careful with that exec() call... http://www.php.net/manual/en/ref.exec.php Use one of the escape...() functions, perhaps? -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Monday, July 23, 2001 12:47 AM To: Tyler Longren; php-general Subject: Re: [PHP] formatting host output On Sat, 21 Jul 2001 06:32, Tyler Longren wrote: $data = exec(host $lookup); printf(pre%s/pre, $data); How can I format the output of that properly? Sometimes, it's all on one line, and it's fine. Other times, there's more than one line...like if there was an alias. Any way to format it like it is on the command line? Thanks, Tyler $data = exec(host $lookup, $ary); while(list(,$val) = each($ary)) { echo $val . 'BR'; } You need to assign the output of exec to an array if you want to capture multiple lines of output. Check the manual for more detail. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Try our NEW *SOLAR POWERED* tanning salon! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] reg exp help
hi all, two quick reg exp problems: one: $username must only contain a-z lowercase, 0-9, no spaces, no other characters. what would the regexp be? if(ereg(, $username)) { $valid = yes } else { $valid = no) two: i want to do a really small email validation, just to make sure the email probably right, as in: [EMAIL PROTECTED] what's the best reg exp to use. i'm aware there are email validating script out there, but I want to learn for myself many thanks in advance justin french -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] need help w/ variables
when i use this script: ?php session_start(); if ($op == ds) { if (($username != admin) ||($password != admin)) { $msg = pfont color=\#FF\strongBad Login - Try Again/strong/font/p; $show_form = yes; } else { session_register('valid'); $valid = yes; $show_menu = yes; } } else { if ($valid == yes) { $show_menu = yes; } else { $show_form = yes; } } $form_block = h1Login/h1 form method=post action=\$PHP_SELF\$msg p strongLogin Name:/strong br input type=\text\ name=\username\ size =15 maxlength=25 /p p strongPassword:/strong br input type=\password\ name=\password\ size=15 maxlength=25 /p input type=\hidden\ name=\op\ value=\ds\ br p input type=\submit\ name=\submit\ value=\Login\ /p /form ; $menu_block = h1Contact Administration System/h1 p strongAdministration/strong ul lia href=\add_contact.php\Add Contact/a lia href=\mod_contact.php\Modify Contact/a lia href=\del_contact.php\Delete Contact/a /ul p strongView Records/strong ul lia href=\show_contacts.php\Show Contacts/a /ul ; if ($show_form == yes) { $display_block = $form_block; } else if ($show_menu == yes) { $display_block = $menu_block; } ? html head title.My contact Management System/title /head body p ? echo $display_block; ? /p /body /html i would get this error: Warning: Undefined variable: op in c:\inetpub\wwwroot\.php on line 3 Warning: Undefined variable: valid in c:\inetpub\wwwroot\.php on line 13 Warning: Undefined variable: msg in c:\inetpub\wwwroot\.php on line 23 my variables are clearly defined in the script please help this is happening in all my scripts win2000 iis 5 most recent php4 and mysql installed phpinfo.php = http://24.165.118.187/phpinfo.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need help w/ variables
add to the top of the script error_reporting(E_ALL ~E_NOTICE); - Original Message - From: Virgil Claritt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 2:57 PM Subject: [PHP] need help w/ variables when i use this script: ?php session_start(); if ($op == ds) { if (($username != admin) ||($password != admin)) { $msg = pfont color=\#FF\strongBad Login - Try Again/strong/font/p; $show_form = yes; } else { session_register('valid'); $valid = yes; $show_menu = yes; } } else { if ($valid == yes) { $show_menu = yes; } else { $show_form = yes; } } $form_block = h1Login/h1 form method=post action=\$PHP_SELF\$msg p strongLogin Name:/strong br input type=\text\ name=\username\ size =15 maxlength=25 /p p strongPassword:/strong br input type=\password\ name=\password\ size=15 maxlength=25 /p input type=\hidden\ name=\op\ value=\ds\ br p input type=\submit\ name=\submit\ value=\Login\ /p /form ; $menu_block = h1Contact Administration System/h1 p strongAdministration/strong ul lia href=\add_contact.php\Add Contact/a lia href=\mod_contact.php\Modify Contact/a lia href=\del_contact.php\Delete Contact/a /ul p strongView Records/strong ul lia href=\show_contacts.php\Show Contacts/a /ul ; if ($show_form == yes) { $display_block = $form_block; } else if ($show_menu == yes) { $display_block = $menu_block; } ? html head title.My contact Management System/title /head body p ? echo $display_block; ? /p /body /html i would get this error: Warning: Undefined variable: op in c:\inetpub\wwwroot\.php on line 3 Warning: Undefined variable: valid in c:\inetpub\wwwroot\.php on line 13 Warning: Undefined variable: msg in c:\inetpub\wwwroot\.php on line 23 my variables are clearly defined in the script please help this is happening in all my scripts win2000 iis 5 most recent php4 and mysql installed phpinfo.php = http://24.165.118.187/phpinfo.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need help w/ variables
i dont quite get it what your saying it is clearly defined at the top $op is equal to ds $valid is equal to yes $msg is equal to Bad Login Reductor [EMAIL PROTECTED] wrote in message 002701c11335$ac5dafe0$0200a8c0@ReDucTor">news:002701c11335$ac5dafe0$0200a8c0@ReDucTor... add to the top of the script error_reporting(E_ALL ~E_NOTICE); - Original Message - From: Virgil Claritt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 2:57 PM Subject: [PHP] need help w/ variables when i use this script: ?php session_start(); if ($op == ds) { if (($username != admin) ||($password != admin)) { $msg = pfont color=\#FF\strongBad Login - Try Again/strong/font/p; $show_form = yes; } else { session_register('valid'); $valid = yes; $show_menu = yes; } } else { if ($valid == yes) { $show_menu = yes; } else { $show_form = yes; } } $form_block = h1Login/h1 form method=post action=\$PHP_SELF\$msg p strongLogin Name:/strong br input type=\text\ name=\username\ size =15 maxlength=25 /p p strongPassword:/strong br input type=\password\ name=\password\ size=15 maxlength=25 /p input type=\hidden\ name=\op\ value=\ds\ br p input type=\submit\ name=\submit\ value=\Login\ /p /form ; $menu_block = h1Contact Administration System/h1 p strongAdministration/strong ul lia href=\add_contact.php\Add Contact/a lia href=\mod_contact.php\Modify Contact/a lia href=\del_contact.php\Delete Contact/a /ul p strongView Records/strong ul lia href=\show_contacts.php\Show Contacts/a /ul ; if ($show_form == yes) { $display_block = $form_block; } else if ($show_menu == yes) { $display_block = $menu_block; } ? html head title.My contact Management System/title /head body p ? echo $display_block; ? /p /body /html i would get this error: Warning: Undefined variable: op in c:\inetpub\wwwroot\.php on line 3 Warning: Undefined variable: valid in c:\inetpub\wwwroot\.php on line 13 Warning: Undefined variable: msg in c:\inetpub\wwwroot\.php on line 23 my variables are clearly defined in the script please help this is happening in all my scripts win2000 iis 5 most recent php4 and mysql installed phpinfo.php = http://24.165.118.187/phpinfo.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need help w/ variables
did u try what i said??? - Original Message - From: Virgil Claritt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 3:13 PM Subject: Re: [PHP] need help w/ variables i dont quite get it what your saying it is clearly defined at the top $op is equal to ds $valid is equal to yes $msg is equal to Bad Login Reductor [EMAIL PROTECTED] wrote in message 002701c11335$ac5dafe0$0200a8c0@ReDucTor">news:002701c11335$ac5dafe0$0200a8c0@ReDucTor... add to the top of the script error_reporting(E_ALL ~E_NOTICE); - Original Message - From: Virgil Claritt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 2:57 PM Subject: [PHP] need help w/ variables when i use this script: ?php session_start(); if ($op == ds) { if (($username != admin) ||($password != admin)) { $msg = pfont color=\#FF\strongBad Login - Try Again/strong/font/p; $show_form = yes; } else { session_register('valid'); $valid = yes; $show_menu = yes; } } else { if ($valid == yes) { $show_menu = yes; } else { $show_form = yes; } } $form_block = h1Login/h1 form method=post action=\$PHP_SELF\$msg p strongLogin Name:/strong br input type=\text\ name=\username\ size =15 maxlength=25 /p p strongPassword:/strong br input type=\password\ name=\password\ size=15 maxlength=25 /p input type=\hidden\ name=\op\ value=\ds\ br p input type=\submit\ name=\submit\ value=\Login\ /p /form ; $menu_block = h1Contact Administration System/h1 p strongAdministration/strong ul lia href=\add_contact.php\Add Contact/a lia href=\mod_contact.php\Modify Contact/a lia href=\del_contact.php\Delete Contact/a /ul p strongView Records/strong ul lia href=\show_contacts.php\Show Contacts/a /ul ; if ($show_form == yes) { $display_block = $form_block; } else if ($show_menu == yes) { $display_block = $menu_block; } ? html head title.My contact Management System/title /head body p ? echo $display_block; ? /p /body /html i would get this error: Warning: Undefined variable: op in c:\inetpub\wwwroot\.php on line 3 Warning: Undefined variable: valid in c:\inetpub\wwwroot\.php on line 13 Warning: Undefined variable: msg in c:\inetpub\wwwroot\.php on line 23 my variables are clearly defined in the script please help this is happening in all my scripts win2000 iis 5 most recent php4 and mysql installed phpinfo.php = http://24.165.118.187/phpinfo.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need help w/ variables
On Mon, 23 Jul 2001, Virgil Claritt wrote: i dont quite get it what your saying it is clearly defined at the top $op is equal to ds $valid is equal to yes $msg is equal to Bad Login Reductor [EMAIL PROTECTED] wrote in message 002701c11335$ac5dafe0$0200a8c0@ReDucTor">news:002701c11335$ac5dafe0$0200a8c0@ReDucTor... add to the top of the script error_reporting(E_ALL ~E_NOTICE); - Original Message - From: Virgil Claritt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 2:57 PM Subject: [PHP] need help w/ variables when i use this script: ?php session_start(); if ($op == ds) { == means is equal?: if(1 == 1){ echo true; } = sets a value: $a = 1; He is suggesting to lower your error reporting so undeclaired variable sdo not produce errors. Another solution is to not call variables that have no value, or use isset() to check. -- --- destiney - (des-ti-ny) - n. 1. deity of all things html, 2. common internet addict, 3. lover of late 80's heavy metal music, 4. Activist for the terminally un-elite; see also - cool guy, des, mr. php... It's 4:00am, your web site is still up, why are you? http://destiney.com/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php 4.0.6
Hi, Thanks. I am more worried about the sockets. I installed it --enable-sockets. Adrian On Sat, 21 Jul 2001, E. Peter K. Chan wrote: Hi Try going to the source directory ie where you unzipped the tarball for php. May as well upgrade to php4.0.6 - that could save you some problems now and later. Type in: # ./configure --help it says --with-readline[=DIR] so maybe you need to install readline first or point php to where it is? (FYI, I just installed 4.0.6 and it did not automatically install readline - I didn't include --with-readline in my options) if this doesn't help out then the only thing I can suggest is to start from scratch, but BACKUP first! See: http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html It's an excellent tutorial on setting up mysql, php,apache and even openssl. And it works. Peter - Original Message - From: Adrian D'Costa [EMAIL PROTECTED] To: E. Peter K. Chan [EMAIL PROTECTED] Cc: php general list [EMAIL PROTECTED] Sent: Saturday, July 21, 2001 4:48 PM Subject: Re: [PHP] php 4.0.6 Hi Peter, I think the guru of php on the list can tell us what the problem is. I am going to compile 4.0.4pl2 and see if I get that error. In fact I am unable to access mysql now even though I have given --with-mysql. Any clues Adrian On Fri, 20 Jul 2001, E. Peter K. Chan wrote: Hi Adrian I just rebuilt my PHP to 4.0.6 and get a similar message with the bcmath functions. I don't have an answer for you at the moment. it may be the configure options selected. If you find out the answer please tell me and I'll do like wise. Peter - Original Message - From: Adrian D'Costa [EMAIL PROTECTED] To: php general list [EMAIL PROTECTED] Sent: Thursday, July 19, 2001 7:12 PM Subject: [PHP] php 4.0.6 Hi, I am trying to use the socket or readline functions but get a message: call to undefined function readline(). Why? Is this not implemented in 4.0.6. Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: need help w/ variables
it was my error reporting along i copied that script dtraight from the text book so i knew it wasnt the variables themselves -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: need help w/ variables
yep, thought so :D - Original Message - From: Virgil Claritt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 23, 2001 3:47 PM Subject: [PHP] Re: need help w/ variables it was my error reporting along i copied that script dtraight from the text book so i knew it wasnt the variables themselves -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php 4.0.6
System Linux pcs.pcsadvt.com 2.2.16-22 #1 Tue Aug 22 16:16:55 EDT 2000 i586 unknown Build Date Jul 20 2001 Configure Command './configure' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--disable-static' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-track-vars' '--enable-ftp' '--with-mysql' '--with-xml' '--enable-trans-sid' '--with-sockets' '--with-readline' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /etc ZEND_DEBUG disabled Thread Safety disabled I did a make install and restarted my httpd. Lets forget the readline() what about sockets? Why does that not work? Well, probably because ./configure --help says: --enable-socketsEnable sockets support And you used --with-sockets -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]