Re: [PHP] changing unix password in php?
I have not done it, but i can be done by using a form and calling the shell script that does the job. Of course shell script has to be executable by everybody. It may be a security concern. or, you can add the shell script to your cron tab. and keep the password change requests in a file and change the passwords every 10 minutes or so. --- Charlie Grosvenor [EMAIL PROTECTED] wrote: Hi I would like to create a page in php where a user can change their unix password, does anybody know how i can do this? Thankyou Charlie = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] Edit program
Dear List member, Plesae forgive me for asking and OT question. Can you please recommend an edit program, (Freely downloadable). Thanks, Erisen Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send FREE video emails in Yahoo! Mail.
Re: [PHP] Passing PHP Variables
If you are using sessions, use it as a session variable. --- John (News) [EMAIL PROTECTED] wrote: I need to pass a variable e.g. $var1 from one PHP page to another. The only conditions are that the variable cannot be shown in the source code on the end users machine nor can it be passed visibly within the url. Does anyone have any suggestions on how I can accomplish this? Hippie. -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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 as a cron job
Hi, I have to sweat my way through /usr/bin/php if that does not work try /usr/local/bin/php or ask the Unix Sysadmin. one problem I still have to overcome is that everything works,( I mean DB Connection etc.) but I can not use mail() function. Any body have any ideas why I can't use mail()? --- mike cullerton [EMAIL PROTECTED] wrote: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 this is possibly a path or env issue. have you tried using absolute filenames? mike on 1/16/02 10:07 AM, Tiago Luchini at [EMAIL PROTECTED] wrote: I am trying to run directly via PHP. I have tried setting 755 to the script and adding #!/usr/bin/php -q to it and also tried to change my cron line to run /usr/bin/php sending the script as a parameter. Both options run normally when logged on a TTY. Tiago - Original Message - From: Dennis Moore [EMAIL PROTECTED] To: Tiago Luchini [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 12:18 PM Subject: Re: [PHP] PHP as a cron job Please provide more information on how you have set up PHP to run your cron jobs. Are you trying to execute via LYNX or directly via a PHP script? /dkm - Original Message - From: Tiago Luchini [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 8:20 AM Subject: [PHP] PHP as a cron job I have been trying to use some PHP scripts as a Linux cron job. It tries to run but replies that: Unable to open /home/admin/webmin-0.85/ in Unknown on line 0 I have no idea why PHP parser is making this confusion. Could anyone bring some light to this mistery please? Atenciosamente, Tiago Luchini Diretor Técnico-Comercial Galluch Soluções Internet Tel.: 0xx11 6912-3255 Cel.: 0xx11 7839-7740 -- mike cullerton michaelc at cullerton dot 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] sql question
Hi do you care about case sensitivity? Nathan Cassano [EMAIL PROTECTED] wrote: select * from tbl_lit where lit_source like 'c%'; Check out http://www.sqlcourse.com/ -Original Message- From: Wolf-Dietrich von Loeffelholz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 12:09 PM To: [EMAIL PROTECTED] Subject: [PHP] sql question i want that a select query display me all words beginning with an a .. like select * from tbl_lit where lit_source = 'c*' .. thnx bSue -- 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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send FREE video emails in Yahoo! Mail.
Re: [PHP] Mysql
Hi, Sorry if I am being a rude, but you need to read the document on how to create a table: www.mysql.com and www.php.net (assuming that you will use php) thx. --- -=LukA=- [EMAIL PROTECTED] wrote: Hello php-general, Hi everybody Please help me. If i want to create a table in some database what should I do. The database is on server. -- Best regards, -=LukA=- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] help with include
I have installed phpBB several times. Your problem should not be the password protected directory. The install.php script tries to wright into the config file. so, you have to chmod your file and give r/w access to everybody. once insallation is completed, then change it the was it was originally. if you give me the url, i can better understand your problem. erisen --- Brian's News [EMAIL PROTECTED] wrote: Hi, I need some help with the include function. I have a phpBB script and want to put the config.inc.php file in a password protected directory, Easy peasy you might say, and I know it is, but the problem comes because the password protected directory isn't on the site the script is on, mainly because the host says I've got to upgrade my account to use password protected dir's. I've got one site with a password protected dir available and would like to put it on there. Any idea's how to do it would be appreciated. Many thanks Brian -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] ENUM COL to php
Hi, If I have en ENUM column in a mysql table, can I leverage this through PHP to restrict user entry with a list? Other option that I have is to create a lookup table, or use an array. = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] two mysql issues :)
Hi All, I am in sql mode today. Two issues that bother me: 1- I had a script select user_id, username from users having user_id = max(user_id) my max user_id = 150 or something, but script kept bringing 122 I fixed the issue by using a select max(user_id) and select username from users where user_id = $v_user_id 2- select max(commission) where territory=1 and salesperson=2232; this query should return 0 zero b/c it's a sum. but it returns null. any comments how I can work around this!!! thanks. Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send FREE video emails in Yahoo! Mail.
[PHP] cron job problem.
Hello All, I have a php script that i tested first through my browser. If has a simple mail() command. It workd fine and I received the email. not I tried to run it as a cron job by adding #!/usr/local/bin/php -q My webmaster account receives the confirmation that cron job has run, but I do not receive the emails that the program is supposed to send. This is the code: Thanks for the help... #!/usr/local/bin/php -q ?php $subject=Cron Job has run; $body=test.php is running now; $sendtome = [EMAIL PROTECTED]; mail($sendtome, $subject, $body); ? --- mike cullerton [EMAIL PROTECTED] wrote: #!/usr/local/bin/php -q on 1/10/02 12:16 PM, Mark at [EMAIL PROTECTED] wrote: I've got this problem that won't go away. The headers are showing up at the top of the page when I run php in cgi mode. any ideas? -- mike cullerton -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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: SV: [PHP] cron job problem.
Hi, thanks for the reply. I did setup the crontab already to run every minute. the webmaster account receives the report. Here is the output that I get when I remove the #!/usr/local/bin/php -q /home/webvoire/www/cm/test.php: ?php: No such file or directory /home/webvoire/www/cm/test.php: =Cron Job has run: command not found /home/webvoire/www/cm/test.php: =test.php is running now: command not found /home/webvoire/www/cm/test.php: =: command not found /home/webvoire/www/cm/test.php: syntax error near unexpected token `mail($sendtome,' /home/webvoire/www/cm/test.php: /home/webvoire/www/cm/test.php: line 6: ` mail($sendtome, $subject, $body);' --- Daniel_Alsen [EMAIL PROTECTED] wrote: Hmm...don?t you have to actually create a job in crontab? Saying that you want a mail every day at 6:00 you would want to create something like: * 6 * * * php /usr/local/bin/php /dev/null in crontab and lose #!/usr/local/bin/php -q in your script. # Daniel Alsen| www.mindbash.com # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | +46 8 694 82 22 # # PGP: http://www.mindbash.com/pgp/ # Hello All, I have a php script that i tested first through my browser. If has a simple mail() command. It workd fine and I received the email. not I tried to run it as a cron job by adding #!/usr/local/bin/php -q My webmaster account receives the confirmation that cron job has run, but I do not receive the emails that the program is supposed to send. This is the code: Thanks for the help... #!/usr/local/bin/php -q ?php $subject=Cron Job has run; $body=test.php is running now; $sendtome = [EMAIL PROTECTED]; mail($sendtome, $subject, $body); ? --- mike cullerton [EMAIL PROTECTED] wrote: #!/usr/local/bin/php -q on 1/10/02 12:16 PM, Mark at [EMAIL PROTECTED] wrote: I've got this problem that won't go away. The headers are showing up at the top of the page when I run php in cgi mode. any ideas? -- mike cullerton -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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: AW: AW: [PHP] MORE QUESTION - Editing Database
hi, download one of the php forum programs and look into their code. www.phpBB.com should be a good reference. --- Dani [EMAIL PROTECTED] wrote: Hi ! How do I allow HTML entries into my database? I tried to insert a pre-formated text into my database. When I pull the data out and put it in a text field the formating is still there, HOWEVER when I retrive the record from the database using echo all the text formating is gone and it became just a straigh line. What function should I use in this case??? Could anybody please help? Thank you! Dani Hi Dani, For sure you can use a database. There are two ways of using your pr formatted text. 1)Allow HTML-entries for your database. Because the bullets you have used in your mail are from a list-tag (li/li), arent they? By that way you the user has two know HTML. 2)Use simple entries. For example: Instead of the bullets you have used, just use - as prefix for your list-item. Dont use HTML-tags! Putting into the database is very easy. Because it doesnt matter if theres any whitespace in the entry. In my opinion you should use as type something like tinytext or text (MySQL !!!). The text-type allows entries with a size of about 65.000 bytes (65.000 letters !!). I hope I could help you again. Bye, Marcel P.S.: Sorry for my bad english, but the last time I really needed it was in school (about 7 years ago !!!) -Ursprüngliche Nachricht- Von: Dani [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 10. Januar 2002 18:57 An: Marcel Besancon Betreff: Re: AW: [PHP] MORE QUESTION - Editing Database Wichtigkeit: Hoch Hi Marcel ! if for example I have got a pre formated text like this: Tour Adventure Tour * Adult $123 * Children $123 * etc Because later when a user edit this online, the text will be displayed on a web form (input text). I'm not sure that we can still preserved the format of the text when we try to insert it back to database. so...is it still possible Should I use BLOB as the type of the data in my database or .. Thank you so much for your reply! It helps me to understand more Sincerely, Dani = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] me and my CRON JOB
hi, here is the question: I know I need to add a line like: #!/usr/local/bin/php to the begining of my php page followed by ?php my code ? Then set a cron job, so it runs. I have done all that. aslo made the php file executable. The file is executing. First I did not put the line #!/usr/local/bin/php and I received an email with error messages. now I added the line with #!/usr/local/bin/php and I am receiving an error message: /bin/sh: /home/webvoire/www/cm/test.php: No such file or directory any input? how can I find out the correct #!/usr/bin/... to put. is there any way to figure it our from phpinfo();? = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] me and my CRON JOB
hi, thanks for the tip. I was wondering about it too I do not have access to everywhere on the server. I tried /usr/bin/php and it worked.. :) I tested the following script for connection to database, executing my functions etc... everything seems to work but mail. any ideas? Thanks for the help. erisen btw: at last, I added the die to my mail command, and fair enough, I got the Can not send this as output. So, now the question is, how can I send mail with php / cron config. please note that the script worked fine on the browser. thx. code: #!/usr/bin/php -q ?php include (application.php); $subject=Cron Job has run; $body=test.php is running now; $sendtome = [EMAIL PROTECTED]; mail([EMAIL PROTECTED], $subject, $body,$sendtome) or die ('Can not send this'); echo $sendtome; echo hello world; echo turk_now() ; $array = get_user_stat($CONF) ; while (list($key,$value)=each($array)) { echo $key $valueBR; } ? --- Rasmus Lerdorf [EMAIL PROTECTED] wrote: Well, does /usr/local/bin/php exist? On Thu, 10 Jan 2002, Mehmet Kamil ERISEN wrote: hi, here is the question: I know I need to add a line like: #!/usr/local/bin/php to the begining of my php page followed by ?php my code ? Then set a cron job, so it runs. I have done all that. aslo made the php file executable. The file is executing. First I did not put the line #!/usr/local/bin/php and I received an email with error messages. now I added the line with #!/usr/local/bin/php and I am receiving an error message: /bin/sh: /home/webvoire/www/cm/test.php: No such file or directory any input? how can I find out the correct #!/usr/bin/... to put. is there any way to figure it our from phpinfo();? = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] Delete on exit
Hi, You can store all shopping cart activites in a cookie until it is written to your database. When they login, call the cookie and insert the cookie SC to the database --- Ryan Kelley [EMAIL PROTECTED] wrote: I am writing an online store and have setup sessions to run when a user enters the site they can shop around and browse without logging in. They only have to login when the want to checkout. But if a user a) closes the browser or b)leaves the site without buying anything then i need it to empty their cart. Any ideas? Thanks, Ryan Kelley -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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 looping through each record with a query - stumped
Hi, If I am not missing anything, you are not sorting SELECT Month, Score FROM scores WHERE Username = '$Username' Also, the requirement is not three consecutive test in a month, so I would not break the loop into months. once you have it ordered it by the date : while (list($Month, $Score) = mysql_fetch_row($result2)) { /* here we initialize a counter which we'll use to tally how many tests the user has passed over the past 3 months */ $tally = 0; if ($Score = 75) { $tally++ ; } else { $tally = 0; // here you are bringing the tally back to 0 if they missed one. } if ($tally=3) { $certified=1 } ; This should do it. In this loop, if there are three consc. over 75 scores, then $certified will equal to 1. Even $tally goes back to 0, if the student misses a test after being certified, $certified will not change. At the end, instead of using $tally=3 use $certified=='1' I hope this helps. I would sort this by date or test_id or whatever. --- Brian Tully [EMAIL PROTECTED] wrote: hey folks - i'm stumped. been working on what i thought would be a simple script to cycle through users' records and perform a query. But I can't get the loops right, it seems like only one or two records get updated. Using MySQL, we have about 2000 students enrolled. each month they take a test. if they pass the most recent 3 tests (consecutively) they earn Certified status and get a few perks. Somehow the certification status' got messed up. So I'm trying to create a script that will look through each user's test records to see if they've passed the last 3 tests, and if so, change their certification status in the database. Not very elegant since there are so many records in the database (2000 users), but I don't think i have a choice. Anyways, I've tried to loop through each user, and for each user loop through their scores. But the loops aren't working. I'm sure it's something simple and obvious I'm missing but my brain is fried! I'd appreciate it if someone could take a look and offer any advice. It's about 65 lines of code (with comments). thanks in advance! brian ?php include(/home/includes/.connect.inc); // Select each Username and start a loop of queries for each user $query = (SELECT Username, Certification FROM users); $result = mysql_query($query) or die (Cannot execute query . mysql_error ()); /* here starts the loop - for each user in the database we look at their test records and try to establish if they have passed the last 3 tests consecutively */ while (list($Username, $Certification) = mysql_fetch_row($result)) { $query2 = (SELECT Month, Score FROM scores WHERE Username = '$Username'); $result2 = mysql_query($query2) or die (Cannot execute query . mysql_error ()); /* for each score record the user has, check to see if they've passed the last 3 tests */ while (list($Month, $Score) = mysql_fetch_row($result2)) { /* here we initialize a counter which we'll use to tally how many tests the user has passed over the past 3 months */ $tally = 0; if (($Month == 'January') ($Score = 75)) { $tally++; } if (($Month == 'December') ($Score = 75)) { $tally++; } if (($Month == 'November') ($Score = 75)) { $tally++; } if (($Month == 'October') ($Score = 75)) { $tally++; } } /* the concept is that if a user has taken and passed the last 3 tests, they become certified. so we look at the current month first and go back 3 months, since it may be the beginning of the month and they may not have taken the current months test yet. Since we increase the counter for each passed test, if the counter equals 3 or more this means they have passed 3 tests and are thereby certified. So we update their certification status in the database. */ if ($tally = 3) { $query1 = (UPDATE users SET Certification = 'Y' WHERE Username = '$Username'); $result1 = mysql_query($query1) or die (Cannot update user to Certified . mysql_error ()); } } print (Update complete!); ? -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail!
RE: [PHP] need help looping through each record with a query - st umped
If you are querying the Score = 75 how are you ging to take the Consecutive requirement into the account. --- Martin Towell [EMAIL PROTECTED] wrote: could you change this $query2 = (SELECT Month, Score FROM scores WHERE Username = '$Username'); to $query2 = (SELECT count(*) FROM scores WHERE Username = '$Username' and Score = 75 and Month in ('January', 'December', 'November', 'October')); $result2 = mysql_query($query2) or die (Cannot execute query . mysql_error ()); $tally = mysql_fetch_row($result2); take out the while loop (the one with all the if's in it) and, if I haven't stuffed up somewhere, all will be okay - (btw, I haven't had experience using mysql, but I'm assuming that it's sql is compatable with interbase and oracle) Hope that helps Martin -Original Message- From: Brian Tully [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 8:59 AM To: PHP DB; PHP Subject: [PHP] need help looping through each record with a query - stumped hey folks - i'm stumped. been working on what i thought would be a simple script to cycle through users' records and perform a query. But I can't get the loops right, it seems like only one or two records get updated. Using MySQL, we have about 2000 students enrolled. each month they take a test. if they pass the most recent 3 tests (consecutively) they earn Certified status and get a few perks. Somehow the certification status' got messed up. So I'm trying to create a script that will look through each user's test records to see if they've passed the last 3 tests, and if so, change their certification status in the database. Not very elegant since there are so many records in the database (2000 users), but I don't think i have a choice. Anyways, I've tried to loop through each user, and for each user loop through their scores. But the loops aren't working. I'm sure it's something simple and obvious I'm missing but my brain is fried! I'd appreciate it if someone could take a look and offer any advice. It's about 65 lines of code (with comments). thanks in advance! brian ?php include(/home/includes/.connect.inc); // Select each Username and start a loop of queries for each user $query = (SELECT Username, Certification FROM users); $result = mysql_query($query) or die (Cannot execute query . mysql_error ()); /* here starts the loop - for each user in the database we look at their test records and try to establish if they have passed the last 3 tests consecutively */ while (list($Username, $Certification) = mysql_fetch_row($result)) { $query2 = (SELECT Month, Score FROM scores WHERE Username = '$Username'); $result2 = mysql_query($query2) or die (Cannot execute query . mysql_error ()); /* for each score record the user has, check to see if they've passed the last 3 tests */ while (list($Month, $Score) = mysql_fetch_row($result2)) { /* here we initialize a counter which we'll use to tally how many tests the user has passed over the past 3 months */ $tally = 0; if (($Month == 'January') ($Score = 75)) { $tally++; } if (($Month == 'December') ($Score = 75)) { $tally++; } if (($Month == 'November') ($Score = 75)) { $tally++; } if (($Month == 'October') ($Score = 75)) { $tally++; } } /* the concept is that if a user has taken and passed the last 3 tests, they become certified. so we look at the current month first and go back 3 months, since it may be the beginning of the month and they may not have taken the current months test yet. Since we increase the counter for each passed test, if the counter equals 3 or more this means they have passed 3 tests and are thereby certified. So we update their certification status in the database. */ if ($tally = 3) { $query1 = (UPDATE users SET Certification = 'Y' WHERE Username = '$Username'); $result1 = mysql_query($query1) or die (Cannot update user to Certified . mysql_error ()); } } print (Update complete!); ? -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General Mailing List (http://www.php.net/) To
Re: [PHP] How MySQL Query and Fetch work?
Hi, Suppose you have a table students: student_id / student_name / GPA here is the code: $sql = select * from students; $result = mysql_query($sql); while(list($student_id, $student_name,$gpa)=mysql_fetch_array($result) { echo $student_name. has a GPA of.$gpa.BR; } btw, this is something really basic, you should be able to go to the php.net and read the documentation. there are great examples. --- Alex Shi [EMAIL PROTECTED] wrote: Yesterday I posted a question yet got response. The question is regarding to how Query works. Now I repost it in a more specific way. I am just wondering how MySQL API functions work. Let's look at following two functions: 1. mysql_query(), 2. mysql_fetch_array() To my understanding, mysql_query() will definately to its job with MySQL server. But how about the latter? Does it just fetch data from client/local buffer, which is previously put in by mysql_query(), or still has to goto server side to fetch data? Alex -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] Arrays
Hi, Can anybody suggest a good reading on how to work with arrays with multiple keys? thanks. = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] bcc
Dear List, I is always a good idea to check out the manual before asking questions. The answer to Leon's question about files is in the manual as well as the answer to this questions. I hope the following links help. File Operations: http://www.php.net/manual/en/ref.filesystem.php Bcc can be found in this section: http://www.php.net/manual/en/ref.mail.php Copying from the manual: /* recipients */$to = Mary [EMAIL PROTECTED] . , ; //note the comma$to .= Kelly [EMAIL PROTECTED];/* subject */$subject = Birthday Reminders for August;/* message */$message = 'htmlhead titleBirthday Reminders for August/title/headbodypHere are the birthdays upcoming in August!/ptable tr thPerson/ththDay/ththMonth/ththYear/th /tr tr tdJoe/tdtd3rd/tdtdAugust/tdtd1970/td tdSally/tdtd17th/tdtdAugust/tdtd1973/td /tr/table/body/html';/* To send HTML mail, you can set the Content-type header. */$headers = MIME-Version: 1.0\r\n;$headers .= Content-type: text/html; charset=iso-8859-1\r\n;/* additional headers */$headers .= From: Birthday Reminder [EMAIL PROTECTED]\r\n;$headers .= Cc: [EMAIL PROTECTED]\r\n;$headers .= Bcc: [EMAIL PROTECTED]\r\n;/* and now mail it */mail($to, $subject, $message, $headers); Bogdan Stancescu [EMAIL PROTECTED] wrote: What do you mean? Supported in what way? (I take it you're referring to the e-mail blind carbon copy feature). Bogdan Deependra B. Tandukar wrote: Greetings ! Is Bcc supported in PHP? Looking forward to hearing from you. -- 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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send FREE video emails in Yahoo! Mail.
Re: [PHP] IF in mysql query results problem
Hi Jason, I am not too familiar with IF statements in SQL, but one thing may be the reason you see the incorrect results: You have three tables, player, coach and co_bookmarks, but you only join player and coach. Shouldn't you join coach with co_bookmarks. I hope this helps. erisen SELECT p.id AS player_id, p.name, p.hs, c.id AS coach_id, co.cid AS college, IF(co.pid=31,1,0) AS is_bookmarked FROM player p, coach c, co_bookmarks co WHERE p.id=31 AND p.hs=c.id AND co.cid=2 Jason Dulberg [EMAIL PROTECTED] wrote: I am working on a program that allows users to bookmark a particular item that they view. The bookmarks are stored in the database. I would like to use an IF statement in the mysql query so when the user logs in and views the items, the option to bookmark the record has been removed if they have already bookmarked it. Here's an example query: SELECT p.id AS player_id, p.name, p.hs, c.id AS coach_id, co.cid AS college, IF(co.pid=31,1,0) AS is_bookmarked FROM player p, coach c, co_bookmarks co WHERE p.id=31 AND p.hs=c.id AND co.cid=2 When I use the above query in a search, it comes up with 3 results, 1 of which is correct. If I GROUP BY p.id, there is only 1 result but its incorrect. The search should only come up with 1 correct result in this case. +---+-++--+-+---+ | player_id | name | hs | coach_id | college | is_bookmarked | +---+-++--+-+---+ | 31 | Paul Mantle | 24 | 24 | 2 | 0 | | 31 | Paul Mantle | 24 | 24 | 2 | 1 | | 31 | Paul Mantle | 24 | 24 | 2 | 0 | +---+-++--+-+---+ +---+-++--+-+---+ | player_id | name | hs | coach_id | college | is_bookmarked | +---+-++--+-+---+ | 31 | Paul Mantle | 24 | 24 | 2 | 0 | +---+-++--+-+---+ The row with is_bookmarked = 1 is the only correct one. I am assuming that for some reason, its displaying 3 results because there are 3 id's associated with cid=2. But if I group them by the id, it takes the wrong row: If anyone has any suggestions as to what I'm doing wrong, please let me know as I'm tapped out on ideas. Thanks a TON!! __ Jason Dulberg Extreme MTB http://extreme.nas.net -- 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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send FREE video emails in Yahoo! Mail.
Re: [PHP] MySQL error... but it works!!??
Hi, So far the best way to troubleshoot mysql+php for me has been to add an or die after the sql exec. $crdate = date(Y-m-d); $result = mysql_query(SELECT * FROM sites WHERE creation_date = '$crdate' AND status = 'T') or die ('CAN NOT EXEC SQL'); Or you can do $sql = SELECT * FROM sites WHERE creation_date = '$crdate' AND status = 'T'; echo $sql; $result = mysql_query($sql) or die .; and try to run your sql against mysql directly to make sure your sql is fine. one thing to always check is your connection to the database. did you connect? Simon Kimber [EMAIL PROTECTED] wrote: Does anyone have any idea why this is giving me a Warning: Supplied argument is not a valid MySQL result resource in... error? The funny thing is that apart from that error message it works perfectly!! --- $crdate = date(Y-m-d); $result = mysql_query(SELECT * FROM sites WHERE creation_date = '$crdate' AND status = 'T'); while ($sitedata = mysql_fetch_array($result)) { echo $sitedata['name'] . ; } --- Cheers Simon -- 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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send FREE video emails in Yahoo! Mail.
[PHP] sorting and limitin sql in php pages??????
Hi, As the data grows I like to add the functionality that people see 30 lines of the result on one page. Also I like to give users the ability to sort per columns... I know this is done pretty much everwhere. What's the best or easiest way of doing it? Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send FREE video emails in Yahoo! Mail.
Re: [PHP] Re: php-general Digest 3 Jan 2002 12:22:53 -0000 Issue 1089
you can aslo go to www.php.net and read the emails from your browser. --- Garth Dahlstrom [EMAIL PROTECTED] wrote: If you don't like getting 50 messages a day, I suggest using this list's digest mode, then you get 1 big message with your daily dose of 50 messages tucked away neatly inside. :) Matt Moreton - Re: [PHP] Holy Moly... - Thu, 3 Jan 2002 03:03:02 - If you dont mind downloading ~50 messages a day, then I'd recommend this group :] Regards Matt. -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.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] php+mysql simple query help me pls! ty.
I hope I am not wrong, but the problem is with the mysql_result() functions. Instead, I would use: whilie ($myrow=mysql_fetch_array($result)) { //put whatever you like here. } and instead of mysql_result($result,0,asl) $myrow[asl] I hope this helps. from the manual http://www.php.net/manual/en/function.mysql-result.php mysql_result() returns the contents of one cell from a MySQL result set. The field argument can be the field's offset, or the field's name, or the field's table dot field name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. When working on large result sets, you should consider using one of the functions that fetch an entire row (specified below). As these functions return the contents of multiple cells in one function call, they're MUCH quicker than mysql_result(). Also, note that specifying a numeric offset for the field argument is much quicker than specifying a fieldname or tablename.fieldname argument. Calls to mysql_result() should not be mixed with calls to other functions that deal with the result set. Recommended high-performance alternatives: mysql_fetch_row(), mysql_fetch_array(), and mysql_fetch_object(). --- louie miranda [EMAIL PROTECTED] wrote: Hi, can someone help me here! :( I can't query the data on my sql from php. db is fine, i couldnt see the prob in php! pls help, ty. # MSQL ### mysql desc members; +--+-+--+-+-++ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-++ | id | tinyint(5) | | PRI | NULL| auto_increment | | ircname | varchar(30) | YES | | NULL| | | email| varchar(30) | YES | | NULL| | | realname | varchar(40) | YES | | NULL| | | asl | varchar(30) | YES | | NULL| | | info | varchar(70) | YES | | NULL| | +--+-+--+-+-++ # PHP html body ?php $db = mysql_connect(my_db_host, my_db_user, my_db_pass) or die(Could not connect); mysql_select_db(mydb,$db); $result = mysql_query(SELECT * FROM members,$db); printf(ircname: %sbrn, mysql_result($result,0,ircname)); printf(email: %sbrn, mysql_result($result,0,email)); printf(realname: %sbrn, mysql_result($result,0,realname)); printf(asl: %sbrn, mysql_result($result,0,asl)); printf(info: %sbrn, mysql_result($result,0,info)); ? /body /html # ERROR Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 13 ircname: n Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 14 email: n Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 15 realname: n Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 16 asl: n Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 17 info: n -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.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] printing php variable into html print $result; ?
use $sql = select .. ; $result = mysql_query($sql); echo $sql; --- louie miranda [EMAIL PROTECTED] wrote: Hi, is it possible to print the sql query? i mean i want to print the output of the command SELECT * FROM members; and output it into html, i tried print $result; -- it gives me different output.. Resource id #2 ty, louie... # PHP SCRIPT ### html body ?php $db = mysql_connect(my_db_host, my_db_user, my_db_pass) or die(Could not connect); mysql_select_db(cavite,$db); $result = mysql_query(SELECT * FROM members,$db) or die(Error:.mysql_error() ); printf(ircname: %sbr, mysql_result($result,0,ircname)); printf(email: %sbr, mysql_result($result,0,email)); printf(realname: %sbr, mysql_result($result,0,realname)); printf(asl: %sbr, mysql_result($result,0,asl)); printf(info: %sbr, mysql_result($result,0,info)); print brbr; ? /body /html # PHP SCRIPT ### -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.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] mysql_fetch_array
Hi, In your SQL, you can say select t1.col colt1, t2.col colt2 from table1 t1, table2 t2 where t1.something = t2.samething In other words, you can name your columns differently in your select clause. I Bogdan Stancescu [EMAIL PROTECTED] wrote: If everything else fails, you should consider using mysql_fetch_row() instead. Bogdan Greg Sidelinger wrote: Ok I have use mysql_fetch_array to dump the results of a select query with a join in it. if my tables contain a column with the same name how can I distinguish from them. -- 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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send your FREE holiday greetings online at Yahoo! Greetings.
[PHP] Time function question/
Hi, Can anybody suggest a function that will generate a random date between 01-Jan-1967 31-Dec-1985 thanks. = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.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] Passing Logined in Name form One Form to other Page
Hi, May I suggest that you take a look at the code library at zend.com, and devshed.com . I remember seeing a login application using the SESSIONS. Alternatively, you can use cookies to let your browser know who is browsing. Jack [EMAIL PROTECTED] wrote: Dear all I had create the Login Page for the User to login before they can open the WebPage. What i want to do is to: When the User had type the Username into the Inputbox, and click the submit button, this Username will be memorized, and pass to other PHP Page.Then when he go to some page which need to select data from MYSQL, it will read the Username which passed from the Login Form and select the only Record to him! I heard about the Session, but how i can pass the Username to other page using Session?? Pls Help! Thx a lot ! jack [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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
Re: [PHP] How to backup records in mySQL DB?
Dear Friend, If I were you, I would take my biz elsewhere. BTW, which company is that? Anyway, I will recommend you to use the phpMyAdmin. It's a mysql database management tool written in PHP, free of charge of course, that lets you manage your database. One of the cool things it that it dumps your database into a flat file with table creation and INSERT commands, so that in case you need to restore you databases, you just run the sql. I hope this helps. Mehmet. Thomas Edison Jr. [EMAIL PROTECTED] wrote: Hi, I'm having a touch situation on my hands. Last week one of my site was shut down in what the Hosting Company claimed to be a Policy Violation. However, it was found out later that it wasn't so and they had to re-host my site. Unfortunately, they erased my mySQL database with my account and we lost all our very important Data in the tables there. It's horrible. We're beggining again but i'm not scared about the Data. The data is posted online by users. I need to have a way to backup my mySQL data. If possible, on some other site location or in Hard Copy (As in a file) or something. I don't know how to do any of this. I have no idea what to do about it. Can anyone make any suggestions help? Regards, T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
[PHP] Translate question
Hello, I am trying to transalte entry in Turkish Characters to English Characters. I wrote the following code. function translate_turkish($string) { $estring = strtr($string, ç, c); $estring = strtr($string, ç, c); $estring = strtr($estring, ð, g); $estring = strtr($estring, G, G); $estring = strtr($estring, þ, s); $estring = strtr($estring, S, S); $estring = strtr($estring, ý, i); $estring = strtr($estring, I, XX); * $estring = strtr($estring, ü, u); $estring = strtr($estring, Ü, U); $estring = strtr($estring, ö, o); $estring = strtr($estring, Ö, O); return ($estring) ; } Capital i (not I but it shows at the line where you see the XX) is causing a problem. I can not translate. from cap i to I. Can you please suggest any help? = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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]
[PHP] Book.
Hi All, I have a good understanding of PHP. I like to read more documentation advanced PHP topics and also some more information on how to run PHP from Unix, as a cron job, how can PHP scripts be called from Shell Scripts etc... Any book or doc suggestions. Thanks, erisen. = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] sessions var
One problem that I have with sessions it that if your login page is in www.yoursite.com and the you pop a page yoursite.com I think the Session is not recognized. just a hint. --- William Sanchez Sanchez [EMAIL PROTECTED] wrote: I need some help with sessions. I need to pass variables to a page that will load in a new browser window (window.open(,myWindow,) and form ... target=myWindow). I used session_register and I tried using start_session and still no luck. Once I get the session vars registered, how do I access them from the new window opened... thanks in advantage... William. -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Book.
Hi, I think I'm misunderstood. I do not want to run in cgi mode. Thanks, Mehmet. --- Martín Marqués [EMAIL PROTECTED] wrote: On Mié 19 Dic 2001 19:14, you wrote: Hi All, I have a good understanding of PHP. I like to read more documentation advanced PHP topics and also some more information on how to run PHP from Unix, as a cron job, how can PHP scripts be called from Shell Scripts etc... You need to compile PHP without web-server support, for cgi. In that case you will get a binary file, and you can use just like you use perl or bash for making scripts. For the developers: Is there a posibility of adding some ability for compilation of, for example, apache and binary stand alone php? -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? - Martín Marqués | [EMAIL PROTECTED] Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral - = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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]
[PHP] How deep can I go with embedded if s.
Hello All, Is anybody aware of any limitations of php on embedded if ..else statements? For example: if ($a$b) { if ($c$d) { this(); } else { if ($gg==$dd) { echo 'ladooo'; } else { echo 'bab'; } that(); } if ($e$f) { tthis(); } else { tthat(); } else { echo Oooops; } would this work, = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Opening a new window.
I would use javascript for that. --- Brandon Orther [EMAIL PROTECTED] wrote: Does anyone know how I could have php open a new windows with the url I specify? Thanx, Brandon = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Opening a new window.
that's a great point. Can you specify the target browser properties using html? Lise the Location bar, or the toolbar? I was actually using little popups with jscript. If I can get rid of JS that would be great. --- Mark Charette [EMAIL PROTECTED] wrote: I would use target=_blank in the anchor tag so it would work just fine _without_ javascript ... Mark C. -Original Message- From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]] I would use javascript for that. --- Brandon Orther [EMAIL PROTECTED] wrote: Does anyone know how I could have php open a new windows with the url I specify? Thanx, Brandon -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Searching for a new provider
Hi, I use connecticut-web.com. Pretty good. fast. The most important value is that the customer service is excellent. They provide email and icq service and very prompt in returning requests. --- R'twick Niceorgaw [EMAIL PROTECTED] wrote: take a look at aletia hosting (www.aletiahosting.com). Their low end is just $9.95 ( $7.95 if paid anually + free domain registration) and is feature rich ( 200Mb space, PHP 4.0.6 moving to 4.1 soon, My SQL (10 databases) 10GB bandwidth etc). I have moved to them few months back and their speed and support looks good to me. Regards R'twick - Original Message - From: Andy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 12, 2001 4:06 PM Subject: [PHP] Searching for a new provider Hi there, I am searching for a provider who fullfills those criterias and does not cost a fortune: - PHP = 4.06 bzw. PHP 4.x mit GDLibrary ab 2.0 - GDLibrary = 2.0 - PHP installed as module - mind 5 Subdomains - mind 100 MB Speicherplatz - evtl. Java VM - MySQL Thanx andy -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Date
what's your raw data. I mean, what is the value of $row[mydatafield]; --- Max [EMAIL PROTECTED] wrote: Hi to all, I'm using this to get date from mySQL database: ... $p_datum = $row[mydatefield]; $mydate = getdate($p_datum); $month = $mydate['month']; $mday = $mydate['mday']; $year = $mydate['year']; ..but I allways get 1/1/1970. Can anybody help me? -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] session
Hi, I think you can include pages from other sites, servers. SESSIONS (I think) are server specific, cuz the info is kept on the server. If you tell me what u gonna be doing, I can give you ideas. thx. erisen --- Jordan [EMAIL PROTECTED] wrote: is there anyway to drag session variables to another server or are they server specific? If you can't drag a session can you do an include for a page on a different server giving it's URL? Just curious. -Jordan -- 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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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]
[PHP] Redirect + SESSION question!!!
Hello All, I have switched hosting companies. previous server was php4.04pl1 now I am on a server that is php4.06. I have a file (functions.php) that stores all my SESSION and other functions. A Header file, that has the general feel and look of the site. In brief most of my pages have include(functions.php); include(header.php); I also use the Header(Location: mysite.com) kind of functions a lot. Well, it worked fine in the prev server, now it does not. I read the documentation (http://download.php.net/manual/en/function.header.php) , and it suggests to use of the ob_start() and ob_end_clean() etc... I used those. I can redirect, but now, my SESSION does not work!!! Anybody had a similar experience? Please help... thanks. erisen __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] Redirect + SESSION question!!!
I am almost there folks. The issue is being resolved by using the ob_start(garbage); at the begining of the login.php script, and ob_end_flush(); at the end of the login.php script (in case the authentication fails and user stays on the page), and also put ob_end_flush(); at the top of the index.php page. Woow. I guess the problem was all the sudden the $SESSION[] operations were considered output bu Header(). Gurus, do you think I am filling up my pages with garbage, or what I am saying is making sense? Thanks. Erisen --- Mehmet Kamil ERISEN [EMAIL PROTECTED] wrote: Hello All, I have switched hosting companies. previous server was php4.04pl1 now I am on a server that is php4.06. I have a file (functions.php) that stores all my SESSION and other functions. A Header file, that has the general feel and look of the site. In brief most of my pages have include(functions.php); include(header.php); I also use the Header(Location: mysite.com) kind of functions a lot. Well, it worked fine in the prev server, now it does not. I read the documentation (http://download.php.net/manual/en/function.header.php) , and it suggests to use of the ob_start() and ob_end_clean() etc... I used those. I can redirect, but now, my SESSION does not work!!! Anybody had a similar experience? Please help... thanks. erisen __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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] = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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]