[PHP] :(
I cannot figure out why this button does not work any suggestions are appreciated. Thanks. $table = inventory; $sql = SELECT * FROM $table where category='$category'; $result = mysql_query($sql); while ($myrow = mysql_fetch_array($result)) { printf(trtd border=1 bgcolor=#A0AAB9font face=Lucida Sans Unicode size=4forminput type=button value=%s onclick=javascript:window.open('view_pict.php?picture_id=%s.gif','MyWind ow','width=450,height=600,menubar=no,scrollbars=yes,toolbar=no,location= no,directories=no,resizable=yes,top=0,left=0')/form/font/td/tr \n, $myrow[product], $myrow[product]); } -- 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] :(
your code works for me. it would be helpful to know how your code doesn't work. does it pop the window at all? couple of suggestions: use onClick instead of onclick - if I recall correctly case matters in Javascript event names depending on your browser. also, you don't need to use the javascript: specifier within event handlers. additionally you might want to quote the handler code. - e -Original Message- From: LDL Enterprise [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 12:48 AM To: *PHP-General mail list Subject:[PHP] :( I cannot figure out why this button does not work any suggestions are appreciated. Thanks. $table = inventory; $sql = SELECT * FROM $table where category='$category'; $result = mysql_query($sql); while ($myrow = mysql_fetch_array($result)) { printf(trtd border=1 bgcolor=#A0AAB9font face=Lucida Sans Unicode size=4forminput type=button value=%s onclick=javascript:window.open('view_pict.php?picture_id=%s.gif','MyWind ow','width=450,height=600,menubar=no,scrollbars=yes,toolbar=no,location= no,directories=no,resizable=yes,top=0,left=0')/form/font/td/tr \n, $myrow[product], $myrow[product]); } -- 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] Oh and addition to Emailing Files
At 01:37 29-7-01 -0700, you wrote: email the file Read the manual: http://www.php.net/manual/en/function.mail.php Bye, B. -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: B. van Ouwerkerk [EMAIL PROTECTED] To: Kyle Smith [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, July 28, 2001 3:09 PM Subject: Re: [PHP] Oh and addition to Emailing Files At 22:15 28-7-01 -0700, Kyle Smith wrote: Also how do i make it so that when it sends the email the picture is an attatchment? I just don't get it anymore. First you ask about uploading files and now about sending files as attachment?? And this second (this) mail is supposed to make something clear?? Please explain what you want to do. Upload or send them via e-mail.. You subject is emailing files.. Browsing a few PHP helpsites should make everything more clear. Both subject can be found on that kind of website.. Bye, B. -- 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, Flash and tab characters
Hi all, Apologies if this has been asked before, I'm new here. I've got a PHP script that's returning a formatted string of variables to a Flash movie. The string getting returned looks like so (currently it's just the 1 variable): bAcquired=Y Flash's debugger seems to think that there is a tab character after the 'Y', so in the debugger, the variable bAcquired looks like so: Y\t I've done everything I can think of on the PHP side to make sure that's not happening there. Perhaps it's some sort of buffer-padding that the server does before sending text back to Flash? I'm looking into more things now, but wanted to ask here and see if anyone else has had this happen? The usual flush(), chop() or trim() functions don't seem to be helping. Any other ideas? Thanks in advance, Nolan [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] PHP4, Flash and tab characters
Change your output string to look like bAcquired=Y and you should be ok. You may find as you get further into this that you need a delay loop to make sure that flash has read all of your data, since it happens asychronously (at least in Flash 4 it did) so you'll want a sentinel value at the end: bAcquired=Yok=1 in the flash movie, set ok=0 and wait/loop until you see ok=1 and you'll know the data reading is complete. (This may have been fixed in Flash 5, but I haven't tested it). - Tim http://www.phptemplates.org The string getting returned looks like so (currently it's just the 1 variable): bAcquired=Y Flash's debugger seems to think that there is a tab character after the 'Y', so in the debugger, the variable bAcquired looks like so: Y\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]
[PHP] limiting lines
Hi, I would like to run a variable of unlimited length through a filter that would limit its length to 55 lines (ie limiting it's length to less than 1 printed page). Does anyone know of an easy way to do this? thanks. Regards, Dan Barber Mojolin --- Mojolin: The Open Source/Linux Employment Site http://www.mojolin.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] Re: limiting lines
Hiya Dan, If you're expecting new lines, you could do this: $length = explode(\n, $message); if (sizeof($length) 55) { // error } And also limit the number of characters, using strlen() James Dan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I would like to run a variable of unlimited length through a filter that would limit its length to 55 lines (ie limiting it's length to less than 1 printed page). Does anyone know of an easy way to do this? thanks. Regards, Dan Barber Mojolin --- Mojolin: The Open Source/Linux Employment Site http://www.mojolin.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] return value from recursive function
Hi, How to get return value from a recursive function .. here is the test code which I was trying ? function abc_recurse() { static $i = 1; echo $i; $i++; if ($i == 4) return (xyz); abc_recurse(); } $returnvalue = abc_recurse(); echo $returnvalue; ? Its printing 123 where as I was expecting 123xyz what is happening to $returnvalue TIA Jaski -- 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] return value from recursive function
maybe it is just me and my preferred syntax/style... if ($i 4) { abc_recurse(); } return 'xyz'; # NOTICE REMOVED ()'s Did not look to closely at your shortcut symantics to verify legitimacy Also, unless I am mistaken, people generally advise against having a function do output. A more appropriate syntax might be ? function abc_recurse($r) { global $r; static $i = 1; $r.=$i; $i++; if ($i 4) { abc_recurse($r); } return $r.'xyz'; } $returnvalue = abc_recurse(0); echo $returnvalue; ? messy but a quick example. -Original Message- From: Jaskirat [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 8:47 PM To: [EMAIL PROTECTED] Subject: [PHP] return value from recursive function Hi, How to get return value from a recursive function .. here is the test code which I was trying ? function abc_recurse() { static $i = 1; echo $i; $i++; if ($i == 4) return (xyz); abc_recurse(); } $returnvalue = abc_recurse(); echo $returnvalue; ? Its printing 123 where as I was expecting 123xyz what is happening to $returnvalue TIA Jaski -- 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] Get Operating System
I tried to detect the Web-Servers operating system. Under Windows it's easy to read the environment variable OS (or one of the relatet Server Varaibles). Under Linux I found the following very strange behaviour: system(echo \$OSTYPE) correctly returns linux-gnu whereas getenv(OSTYPE) returns nothing Any idea why the simple getenv-solution does not work. Any simpler solution than calling the shell echo? Regards -- Rainer Rosenberger __ NetAktiv, Beratung Realisierung Dr. Rainer Rosenberger, Fürholzer Weg 6b, D-85375 Neufahrn Fon:+49 8165 66506, Fax:+49 8165 66507, Mobil:+49 172 7789381 mailto:[EMAIL PROTECTED] http://www.NetAktiv.de/ __ -- 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.net's index.php
You wrote: I was wondering what I would have to do in order to have index.php load up automatcially when someone went to my domain. IE if they go to www.mydomain.com and I have index.html or index.htm there then those pages get loaded first. How could I do it so index.php, index.php3, index.phtml were default as well? Create a file called .htaccess with this in it: DirectoryIndex index.php Upload it to the directory you want it to affect. This assumes you're using Apache, of course. HTH! :) -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.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]
Fw: [PHP] php.net's index.php
Just so you know, you can also list them off in order you want them to appear. DirectoryIndex index.php index.html default.php etc. etc. Your Systems administrator for whomever you host with should be able to take care of this, he probably should have already :) - Original Message - From: Ryan Fischer [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, July 29, 2001 8:21 AM Subject: Re: [PHP] php.net's index.php You wrote: I was wondering what I would have to do in order to have index.php load up automatcially when someone went to my domain. IE if they go to www.mydomain.com and I have index.html or index.htm there then those pages get loaded first. How could I do it so index.php, index.php3, index.phtml were default as well? Create a file called .htaccess with this in it: DirectoryIndex index.php Upload it to the directory you want it to affect. This assumes you're using Apache, of course. HTH! :) -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.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] -- 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.net's index.php
Use the DirectoryIndex directive in your '.htaccess' file, as Ryan states. You'll find more information at: http://httpd.apache.org/ Nelson -- 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] Image
I have the following question : I have a picture of a floor and the dimention are W=500 H=375 I put this image on te screen by the following command img border=0 src=red.jpg WIDTH=500 HEIGHT=375 I want to make this picture smaller img border=0 src=red.jpg width=250 height=100 Now the whole picture is smaller and i want to see only the dimentions W=250 and H=100 and not the dimentions W=250 H275 + + + + +++ +++ +++ +++ +++ + + + + + + + + + + + + + +++ +++ + + + + + -- 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: limiting lines
Thanks for the quick answers. Problem is, the only new lines are at the end of paragraphs, so that, in effect, is limiting them to 55 paragraphs. I'm using a textarea wrap=physical which says that it adds a %0A%0D (carriage return/line feed) at the end of each line. Anyone know how to convert that to a \n ? thanks again. Dan Mojolin: The Linux Employment Site http://mojolin.com If you're expecting new lines, you could do this: $length = explode(\n, $message); if (sizeof($length) 55) { // error } -- 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: :(
Define not work Some tips : 1. echo your query, make sure it appears as intended. In otherwords, make sure the variables $table and $category contain proper data. echo $sql; 2. make use of mysql_error() function as it can be useful. echo mysql_error(); For example, you may want to do this after your $result, see manual for more details on this helpful function. There are many ways to use it, some people would do this : $result = mysql_query($sql) or die(mysql_error()); Eventually you'll learn other ways that help control errors but in the above if a mysql error exists it'll print it and the script will die/exit. 3. In a question always report the exact error or what is not working, it's much more efficient for us as it means less guessing and less brain power to solve the problem. not work can mean many things. As can :( ;-) 4. The code may be easier to read if the block of html is written as html, not PHP. Not that big of deal but don't be afraid to break out into html mode. For example, the following is appropriate (I don't know what you know but some don't know this so ...) ?php if ($foo == 'bar') { // If $foo equals to 'bar' then the form below will be printed. ? Hi friend, please fill out this form. form method=post action=process.php Name : input type=text name=namebr Email : input type=text name=email /form We appreciate this, todays color is ?php echo $color ?, be sure to watch out for it. ?php } ? Hope the above digression helps. Regards, Philip Ldl Enterprise wrote: I cannot figure out why this button does not work any suggestions are appreciated. Thanks. $table = inventory; $sql = SELECT * FROM $table where category='$category'; $result = mysql_query($sql); while ($myrow = mysql_fetch_array($result)) { printf(trtd border=1 bgcolor=#A0AAB9font face=Lucida Sans Unicode size=4forminput type=button value=%s onclick=javascript:window.open('view_pict.php?picture_id=%s.gif','MyWind ow','width=450,height=600,menubar=no,scrollbars=yes,toolbar=no,location= no,directories=no,resizable=yes,top=0,left=0')/form/font/td/tr \n, $myrow[product], $myrow[product]); } -- 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: Free webspace with PHPMysql support
See : http://www.faqts.com/knowledge_base/view.phtml/aid/4058/ This faq needs to be updated soon but should help regardless. If anyone has suggestions for this faq, please suggest or implement them. Regards, Philip -- 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: Get Operating System
You may want to use the predefined constant PHP_OS as described here : PHP Manual : Predefined Constants http://www.php.net/manual/en/language.constants.predefined.php Regards, Philip Rainer Rosenberger wrote: I tried to detect the Web-Servers operating system. Under Windows it's easy to read the environment variable OS (or one of the relatet Server Varaibles). Under Linux I found the following very strange behaviour: system(echo \$OSTYPE) correctly returns linux-gnu whereas getenv(OSTYPE) returns nothing Any idea why the simple getenv-solution does not work. Any simpler solution than calling the shell echo? Regards -- Rainer Rosenberger __ NetAktiv, Beratung Realisierung Dr. Rainer Rosenberger, Fürholzer Weg 6b, D-85375 Neufahrn Fon:+49 8165 66506, Fax:+49 8165 66507, Mobil:+49 172 7789381 mailto:[EMAIL PROTECTED] http://www.NetAktiv.de/ __ -- 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] Oh and addition to Emailing Files
ummm... problem Forbidden You don't have permission to access /manual/en/function.mail.php on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: B. van Ouwerkerk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 29, 2001 1:40 AM Subject: Re: [PHP] Oh and addition to Emailing Files At 01:37 29-7-01 -0700, you wrote: email the file Read the manual: http://www.php.net/manual/en/function.mail.php Bye, B. -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: B. van Ouwerkerk [EMAIL PROTECTED] To: Kyle Smith [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, July 28, 2001 3:09 PM Subject: Re: [PHP] Oh and addition to Emailing Files At 22:15 28-7-01 -0700, Kyle Smith wrote: Also how do i make it so that when it sends the email the picture is an attatchment? I just don't get it anymore. First you ask about uploading files and now about sending files as attachment?? And this second (this) mail is supposed to make something clear?? Please explain what you want to do. Upload or send them via e-mail.. You subject is emailing files.. Browsing a few PHP helpsites should make everything more clear. Both subject can be found on that kind of website.. Bye, B. -- 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] Oh and addition to Emailing Files
Kyle, http://www.php.net/manual/en/ref.mail.php is the correct URL, but the easiest way to access these sort of things is: http://www.php.net/mail (substitute mail with any function name) HTH, John ummm... problem Forbidden You don't have permission to access /manual/en/function.mail.php on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. -- /* SteeleSoft Consulting John Steele - Systems Analyst/Programmer * We also walk dogs... PHP/MySQL/Linux/Hosting - [EMAIL PROTECTED] *http://www.steelesoftconsulting.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 to split results on multiply pages?
Hi, I've made a nice working skript for managing MySQL database of about 300 records (this is my first PHP script). But I don't know how to split search results on pages? Does anyone have an example of such script for me to work on it and understand how it works? My script is done as if: elseif: endif; statements Thank you, Youri God is our provider http://www.body-builders.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] How to split results on multiply pages?
Check out PEAR. There is a class that do that for you. -slowpork Hi, I've made a nice working skript for managing MySQL database of about 300 records (this is my first PHP script). But I don't know how to split search results on pages? Does anyone have an example of such script for me to work on it and understand how it works? My script is done as if: elseif: endif; statements Thank you, Youri God is our provider http://www.body-builders.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] -- 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] Oh and addition to Emailing Files
Forbidden You don't have permission to access /manual/en/function.mail.php on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. 2 options: - you tried to get that file from your own server - someone screwed up the permissions on www.php.net I clicked on the link in my original messages and got the online manual page.. http://www.php.net/manual/en/function.mail.php Bye, B. -- 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] Oh and addition to Emailing Files
At 13:30 29-7-01 +0100, John Steele wrote: Kyle, http://www.php.net/manual/en/ref.mail.php is the correct URL, but the easiest way to access these sort of things is: The link I send does gives you the manualpage for mail() Both should work fine. Bye, B. -- 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: Image
Manu Verhaegen [EMAIL PROTECTED] wrote in message E10E651CDD2DD5118912E8E8C70F53D6@COMPUVER01">news:E10E651CDD2DD5118912E8E8C70F53D6@COMPUVER01... I have the following question : I have a picture of a floor and the dimention are W=500 H=375 I put this image on te screen by the following command img border=0 src=red.jpg WIDTH=500 HEIGHT=375 I want to make this picture smaller img border=0 src=red.jpg width=250 height=100 Now the whole picture is smaller and i want to see only the dimentions W=250 and H=100 and not the dimentions W=250 H275 Okay, first... Where did the H 275 come from? Are you trying to show only the first 250x100 of the image? (like a crop) Or are you just trying to resize it? (as if a thumbnail?) --- -- MD Creations - Matt Rogers - Web Design Dept. - [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] compiling Apache for php
How can I recompile Apache so that I can use PHP4 as a Dynamic Module (DSO). This is a working server and I can not change the httpd.conf file so I do not what to just do a compile and make install. Also there is not a copy of apxs on the server where can I get a copy of this. The server is running with RedHat 7. What are the dangers of recompiling Apache on a working server. By the way I know how to compile Apache and php have done it many times just not sure how to do the Apache part without messing up all of the sites and stuff that are already in the httpd.conf file 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]
Re: [PHP] Re: Free webspace with PHPMysql support
http://www.f2s.com its what im on but you can only use FTP which is a bitch to set up (no ads no nutting) -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: Philip Olson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 29, 2001 1:14 PM Subject: [PHP] Re: Free webspace with PHPMysql support See : http://www.faqts.com/knowledge_base/view.phtml/aid/4058/ This faq needs to be updated soon but should help regardless. If anyone has suggestions for this faq, please suggest or implement them. Regards, Philip -- 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] Using a query to selecting between two dates
On 29-Jul-2001 Mike Gifford wrote: Hello, I've got a number of press releases that I'd like to be able to order by year. I'd like everything from this now to a year ago (ie. July 29th, 2000) to be ordered together and then allow folks to scroll back to the previous year July 30, 2000 to July 29th, 1999, etc. Sounds like a confusing interface to me. how about selecting by numerical year ? if (! isset($wantyear)) $wantyear=date('Y'); SELECT ... WHERE YEAR(date)='$wantyear' ... If you insist on now() - 1 year, look into DATE_SUB(NOW(), INTERVAL 1 YEAR) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do 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]
[PHP] Re: PHP 4.0.6 + Postgres 7.1.2
It works fine. You probably need to specify libpq location explicitly. --with-pgsql=/your/pgsql-7.1.2/somewhere Regards, -- Yasuo Ohgaki Stuart Grimshaw stuart[get@smgsystems.co.uk wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Has anyone sucessfully used these two versions together? I get the following error message from apache when I try start it ... Syntax error on line 224 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: undefined symbol: PQoidValue I've recompiled PHP after installing Postgres 7.1.2, and postgres itself appears to work fine. -- 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] Global Variables - Local Scope
Well, you could try: extract( $GLOBALS ) inside a function - that might work.. At 22:14 26/07/2001 -0400, [EMAIL PROTECTED] wrote: How can I read in all of the global variables and give them local scope? PLEASE 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] - Brian White Step Two Designs Pty Ltd - SGML, XML HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [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 stature at Microsoft
OK - a bit of a long shot, but I was just looking into the MS passport service - they've got some docs on how to interface to it from other platforms. They ask you what server type, what OS, then what 'platform'. It's a freeform box, but the examples they give are interesting: Platform Type (such as ASP, ISAPI, PHP, ColdFusion, BroadVision) No Perl. No Java. BroadVision, but no Vignette. The mindshare must be getting big - if they bother to mention PHP as a platform for Passport. :) Just wanted to pass that along: Michael Kimsal http://www.tapinternet.com/php/ PHP Training Courses 734-480-9961 -- 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] NuSphere.. what is it???
What's the deal with that NuShere stuff... I visited their website and download a Free version (40MB)... I just don't get what are they asking 200, 400, 500 and even 5.000 dollars for. It's just a combo of PHP, MySQL and Apache pre-configured, some samples and some tools... but other than that... I can't see why it's so expensive... it's all opensource... it's all free... they have phpMyAdmin as the MySQL client... what are we paying for here? . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] File Upload
Quoting Gerard Samuel [EMAIL PROTECTED]: Hey all, Im running freebsd 4.3, apache 1.3.20, mysq.3.23.39, php 4.0.6. Im trying to figure out file uploading. If I echo $pic, $pic_name, $pic_size, $pic_type, after the form is submitted, everything echoes correctly. In my script I have == $archive_dir = /files/www/data/archive; $filename = basename($pic_name); if (!copy($pic, $archive/$filename)) Shouldn't that be if( !copy( $pic, $archive_dir/$filename ) ); echo Error: $filename cannot be uploaded.; else echo Successfully uploaded $filename.; When I submit the form, it outputs == Error: Dscf0005.jpg cannot be uploaded. I chmoded the folder to 777 and still the same results. It's always the simple things. :) -- - -- - - - 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]
[PHP] HTTP header question.
Hey all, I want to craft a header such that it seems to the page that data has been POST'ed to it... Here's the situation: I'm writing a login page to my application, and if they log in incorrectly, I want the page to redisplay, but I want it to throw out an error message. I'm currently doing it by header(Location: login.php?failure=true); but I'd like to make it transparent. Any ideas? Thanks, Ben -- 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: HTTP header question.
Ben Bleything [EMAIL PROTECTED] wrote in message 01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro... Hey all, I want to craft a header such that it seems to the page that data has been POST'ed to it... Here's the situation: I'm writing a login page to my application, and if they log in incorrectly, I want the page to redisplay, but I want it to throw out an error message. I'm currently doing it by header(Location: login.php?failure=true); but I'd like to make it transparent. Any ideas? Thanks, Ben You cannot send ANY text or html tag (even a space ) before usin header function. If you have to get something displayed. I suggest to use then : echo HEADMETA HTTP-EQUIV=\Refresh\ CONTENT=\4; URL=login.php?failure=true\/HEAD; Regards, Jacques -- 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] File Upload
Phil, thats why you get the big bucks. Dammit, I was messing around with this all day. Thanks it works now. Gerard Philip Murray wrote: Quoting Gerard Samuel [EMAIL PROTECTED]: Hey all, Im running freebsd 4.3, apache 1.3.20, mysq.3.23.39, php 4.0.6. Im trying to figure out file uploading. If I echo $pic, $pic_name, $pic_size, $pic_type, after the form is submitted, everything echoes correctly. In my script I have == $archive_dir = /files/www/data/archive; $filename = basename($pic_name); if (!copy($pic, $archive/$filename)) Shouldn't that be if( !copy( $pic, $archive_dir/$filename ) ); echo Error: $filename cannot be uploaded.; else echo Successfully uploaded $filename.; When I submit the form, it outputs == Error: Dscf0005.jpg cannot be uploaded. I chmoded the folder to 777 and still the same results. It's always the simple things. :) -- 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: HTTP header question.
I'm fully aware of that. The issue is not the refreshing (that works fine)... Here's a little more detail: if(!$login) { if($failure) // complain // show the form } else { if(user_is_good) // take them to the next page else // complain } The //complain in the else section is this: Unset($login); // so it won't try to authenticate again $failure = true; // so the form knows to complain header(Location: login.php); Okay. So, just to clear things up, I'm not sending anything before this. This happens IMMEDIATELY after the user clicks on Submit... What I'm looking for is a way to do this such that the user does not see anything more than http://host.name.here/rams/login.php in their address bar when it failed... doing it the way I show above does not work, and the alternative ( header(Location: login.php?failure=true) ) does not satisfy my requirement. So... anybody else? Ben -Original Message- From: Jacques [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 5:58 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: HTTP header question. Ben Bleything [EMAIL PROTECTED] wrote in message 01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro... Hey all, I want to craft a header such that it seems to the page that data has been POST'ed to it... Here's the situation: I'm writing a login page to my application, and if they log in incorrectly, I want the page to redisplay, but I want it to throw out an error message. I'm currently doing it by header(Location: login.php?failure=true); but I'd like to make it transparent. Any ideas? Thanks, Ben You cannot send ANY text or html tag (even a space ) before usin header function. If you have to get something displayed. I suggest to use then : echo HEADMETA HTTP-EQUIV=\Refresh\ CONTENT=\4; URL=login.php?failure=true\/HEAD; Regards, Jacques -- 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] Re: HTTP header question.
Quoting Ben Bleything [EMAIL PROTECTED]: I'm fully aware of that. The issue is not the refreshing (that works fine)... Here's a little more detail: if(!$login) { if($failure) // complain // show the form } else { if(user_is_good) // take them to the next page else // complain } The //complain in the else section is this: Unset($login); // so it won't try to authenticate again $failure = true; // so the form knows to complain header(Location: login.php); Okay. So, just to clear things up, I'm not sending anything before this. This happens IMMEDIATELY after the user clicks on Submit... What I'm looking for is a way to do this such that the user does not see anything more than http://host.name.here/rams/login.php in their address bar when it failed... doing it the way I show above does not work, and the alternative ( header(Location: login.php?failure=true) ) does not satisfy my requirement. So... anybody else? - How about using javascript? For example form name=loginFailure action=login.php method=POST input type=hidden name=failure value=true [...any other data you want...] /form script language=Javascript type=text/javascript !-- document.forms[0].submit() // or document.forms['loginFailure'].submit(); // -- /script It's untested, but you get the idea. 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] Re: HTTP header question.
What I'm looking for is a way to do this such that the user does not see anything more than http://host.name.here/rams/login.php in their address bar when it failed... Doesn't using a form with its method set to post send the variables through headers? If that's the case, couldn't you manually set those headers yourself using header()? I'm curious about this myself, but so far I've not been able to find any info on the web. 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]
RE: [PHP] Re: HTTP header question.
That seems much more complicated than I need. I understand that the POST operation stores the data from the form in the message headers... I just need to know which headers, so I can use that information to write my own... I basically want to make it seem as if the $failure var was POST'ed back to the page. I'm having NO luck whatsoever with the HTTP RFC's... too thick = Thanks, Ben -Original Message- From: Philip Murray [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 6:06 PM To: Ben Bleything Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: HTTP header question. Quoting Ben Bleything [EMAIL PROTECTED]: I'm fully aware of that. The issue is not the refreshing (that works fine)... Here's a little more detail: if(!$login) { if($failure) // complain // show the form } else { if(user_is_good) // take them to the next page else // complain } The //complain in the else section is this: Unset($login); // so it won't try to authenticate again $failure = true; // so the form knows to complain header(Location: login.php); Okay. So, just to clear things up, I'm not sending anything before this. This happens IMMEDIATELY after the user clicks on Submit... What I'm looking for is a way to do this such that the user does not see anything more than http://host.name.here/rams/login.php in their address bar when it failed... doing it the way I show above does not work, and the alternative ( header(Location: login.php?failure=true) ) does not satisfy my requirement. So... anybody else? - How about using javascript? For example form name=loginFailure action=login.php method=POST input type=hidden name=failure value=true [...any other data you want...] /form script language=Javascript type=text/javascript !-- document.forms[0].submit() // or document.forms['loginFailure'].submit(); // -- /script It's untested, but you get the idea. 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] Generating mysql statement from php return an error :-(
I _believe_ (not totally sure) that mysql_query() can only handle one statement at a time, and if you need to execute multiple, you will need to use more than one mysql_query() statements. It's a bummer = I have all sorts of problems with it. What's up with your return e-mail address? It's a pain in the ass for all mails to you bouncing... Ben -Original Message- From: Jacques [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 5:47 PM To: [EMAIL PROTECTED] Subject: [PHP] Generating mysql statement from php return an error :-( Hi, I'm using a table in my session to store my variable to generate later my sql statements. Until now... nothing very weird ! But when I want to generate my sql statement. I've got an error after the first line where I put a comma ; to make a difference within my statements. this is a portion of my code : $query.=Insert into product (id_quote,item,description,quantity,unit_price,ext_price,lead) values ('$QUOTE_NUMBER' , '.$TABLE_QUOTE_PRODUCT[$y][item].' , '.$TABLE_QUOTE_PRODUCT[$y][description].', '.$TABLE_QUOTE_PRODUCT[$y][qty].' , '.$TABLE_QUOTE_PRODUCT[$y][unitprice].' , '.$TABLE_QUOTE_PRODUCT[$y][extprice].' , '.$TABLE_QUOTE_PRODUCT[$y][leadtime].');\n; } $result=mysql_query($query); If I have only one line in my sql and I remove the ; it works. but If I add the ; to separate two sql lines error ! Any idea how I can resolve this problem ? Regards, Jacques -- 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] HTTP header question.
All I want to do is output Authentication failed above the form if they type in invalid credentials. I want to do it by passing a header that contains the same information as if there were a form submitted that contained a field name failed and value true. Aside from this one application, I can think of many other places where this would be valuable. Am I being unclear? It seems that my question was not understood. Please let me know so I can try to re-explain. Thanks, Ben -Original Message- From: Dave VanAuken [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 7:16 PM To: Ben Bleything; [EMAIL PROTECTED] Subject: RE: [PHP] HTTP header question. what is the logic behind requiring the header? for example, to avoid using cookies and yet ensuring security, we pass a loginkey for all pages. every page has include('securitycheck.php'); which parses the loginkey, uncompresses/decode it to get the userid and timestamp, and prompts for a login if the last access was too old (say 10 min). the security check displays the login screen if no key is available or key is expired, and exits, preventing display of the remainder of the page ifthe key is valid, it updates the key for the current time (reset the expire counter so to speak) and displays the page iwth all URL's conyaining the encoded key. you end up with one additional line of code per page (which we include as part of site template) unless you are looking for something else entirely and I am missing the point (entirely possible). Dave -Original Message- From: Ben Bleything [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 8:48 PM To: [EMAIL PROTECTED] Subject: [PHP] HTTP header question. Hey all, I want to craft a header such that it seems to the page that data has been POST'ed to it... Here's the situation: I'm writing a login page to my application, and if they log in incorrectly, I want the page to redisplay, but I want it to throw out an error message. I'm currently doing it by header(Location: login.php?failure=true); but I'd like to make it transparent. Any ideas? Thanks, Ben -- 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: HTTP header question.
I don't know how to solve your problem, but I do know what you are talking about.. People just aren't understanding. All he wants is if you go to login.php in your browser, the Location will show: http://his.website.com/rams/login.php Okay? Got it? NOW... If you attempt to log in and give the form an INCORRECT login, he wants to SOMEHOW (and currently trying by headers) wants the location to show this: http://his.website.com/rams/login.php AND NOT: http://his.website.com/rams/login.php?failure=true Is that hard to understand? I hope I have helped to some degree. -- --- -- MD Creations - Matt Rogers - Web Design Dept. - [EMAIL PROTECTED] Ben Bleything [EMAIL PROTECTED] wrote in message 01c11891$447271c0$0201a8c0@allegro">news:01c11891$447271c0$0201a8c0@allegro... Hey all, I want to craft a header such that it seems to the page that data has been POST'ed to it... Here's the situation: I'm writing a login page to my application, and if they log in incorrectly, I want the page to redisplay, but I want it to throw out an error message. I'm currently doing it by header(Location: login.php?failure=true); but I'd like to make it transparent. Any ideas? Thanks, Ben -- 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] foreach and multiple arrays
* Chris Aitken [EMAIL PROTECTED] [010729 19:44]: Something ive been working on and not having much success is this. I am writing a function, and I want to be able to feed it the following - function_name ( array(Apple,Red,10,20), array(Banana,Yellow,10,20) ); now, basically what I want to be able to do is, take each array andlist each entry in the array as a variable.. eg.. (first loop run) $title=Apple; $value=Red; $size1=10; $size2=20; (first loop run) $title=Banana; $value=Yellow; $size1=10; $size2=20; etc. The function may have any number of entries (1 onwards) etc. I have played with foreach() and other variants, but I just cant seem to find the right combo of code to get it working. This seems to work. $array2d = array( array(Apple,Red,10,20), array(Banana,Yellow,10,20) ); foreach($array2d as $rowNum = $rowVal) { print Row $rowNum:br /\n; print Title is $rowVal[0]br /\n; print Value is $rowVal[1]br /\n; print Size1 is $rowVal[2]br /\n; print Size2 is $rowVal[3]br /\n; }; Maybe it will give you a place to start. -- Jan Wilson, SysAdmin _/*]; [EMAIL PROTECTED] Corozal Junior College | |:' corozal.com corozal.bz Corozal Town, Belize | /' chetumal.com linux.bz Reg. Linux user #151611 |_/ Network, SQL, Perl, HTML -- 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] HTTP header question.
The way that I did it was by using sessions which if you have a login you are probably using anyways. One of my session variables is message. That way I can pass messages back and forth to pages, reinitialize them after the message has been received, etc etc etc. If you REALLY want to use headers this is what Lawrence Sheed (thanks Lawrence) sent me: header POST /index.php3 HTTP/1.1; header Host: $host; header Content-type: application/x-www-form-urlencoded ; header Content-length: . strlen ($data); header Connection: close\n\n; //may only need one, can't remember if header postpends \n //Now print variables //var1=informationvar2=more //for each var to submit header $$var1=$var1$$var2=$var2; I eventually went a different route, but he said this emulates a POST. Good luck.. I hope I understand and I hope it helps All I want to do is output Authentication failed above the form if they type in invalid credentials. I want to do it by passing a header that contains the same information as if there were a form submitted that contained a field name failed and value true. Aside from this one application, I can think of many other places where this would be valuable. Am I being unclear? It seems that my question was not understood. Please let me know so I can try to re-explain. Thanks, Ben -Original Message- From: Dave VanAuken [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 7:16 PM To: Ben Bleything; [EMAIL PROTECTED] Subject: RE: [PHP] HTTP header question. what is the logic behind requiring the header? for example, to avoid using cookies and yet ensuring security, we pass a loginkey for all pages. every page has include('securitycheck.php'); which parses the loginkey, uncompresses/decode it to get the userid and timestamp, and prompts for a login if the last access was too old (say 10 min). the security check displays the login screen if no key is available or key is expired, and exits, preventing display of the remainder of the page ifthe key is valid, it updates the key for the current time (reset the expire counter so to speak) and displays the page iwth all URL's conyaining the encoded key. you end up with one additional line of code per page (which we include as part of site template) unless you are looking for something else entirely and I am missing the point (entirely possible). Dave -Original Message- From: Ben Bleything [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 8:48 PM To: [EMAIL PROTECTED] Subject: [PHP] HTTP header question. Hey all, I want to craft a header such that it seems to the page that data has been POST'ed to it... Here's the situation: I'm writing a login page to my application, and if they log in incorrectly, I want the page to redisplay, but I want it to throw out an error message. I'm currently doing it by header(Location: login.php?failure=true); but I'd like to make it transparent. Any ideas? Thanks, Ben -- 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] HTTP header question.
THANK YOU. Finally. Unfortunately, in brief tests, I can't get it to work, but I will continue to beat on it. That's exactly what I was getting at. I found some info on the internet regarding what the headers that POST sends are... you can see it at http://opop.nols.com/write/HTTP.html. Hope this helps everybody out. Thanks, Ben -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 8:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] HTTP header question. The way that I did it was by using sessions which if you have a login you are probably using anyways. One of my session variables is message. That way I can pass messages back and forth to pages, reinitialize them after the message has been received, etc etc etc. If you REALLY want to use headers this is what Lawrence Sheed (thanks Lawrence) sent me: header POST /index.php3 HTTP/1.1; header Host: $host; header Content-type: application/x-www-form-urlencoded ; header Content-length: . strlen ($data); header Connection: close\n\n; //may only need one, can't remember if header postpends \n //Now print variables //var1=informationvar2=more //for each var to submit header $$var1=$var1$$var2=$var2; I eventually went a different route, but he said this emulates a POST. Good luck.. I hope I understand and I hope it helps All I want to do is output Authentication failed above the form if they type in invalid credentials. I want to do it by passing a header that contains the same information as if there were a form submitted that contained a field name failed and value true. Aside from this one application, I can think of many other places where this would be valuable. Am I being unclear? It seems that my question was not understood. Please let me know so I can try to re-explain. Thanks, Ben -Original Message- From: Dave VanAuken [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 7:16 PM To: Ben Bleything; [EMAIL PROTECTED] Subject: RE: [PHP] HTTP header question. what is the logic behind requiring the header? for example, to avoid using cookies and yet ensuring security, we pass a loginkey for all pages. every page has include('securitycheck.php'); which parses the loginkey, uncompresses/decode it to get the userid and timestamp, and prompts for a login if the last access was too old (say 10 min). the security check displays the login screen if no key is available or key is expired, and exits, preventing display of the remainder of the page ifthe key is valid, it updates the key for the current time (reset the expire counter so to speak) and displays the page iwth all URL's conyaining the encoded key. you end up with one additional line of code per page (which we include as part of site template) unless you are looking for something else entirely and I am missing the point (entirely possible). Dave -Original Message- From: Ben Bleything [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 29, 2001 8:48 PM To: [EMAIL PROTECTED] Subject: [PHP] HTTP header question. Hey all, I want to craft a header such that it seems to the page that data has been POST'ed to it... Here's the situation: I'm writing a login page to my application, and if they log in incorrectly, I want the page to redisplay, but I want it to throw out an error message. I'm currently doing it by header(Location: login.php?failure=true); but I'd like to make it transparent. Any ideas? Thanks, Ben -- 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] -- 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] HTTP header question.
On 30-Jul-2001 Ben Bleything wrote: All I want to do is output Authentication failed above the form if they type in invalid credentials. I want to do it by passing a header that contains the same information as if there were a form submitted that contained a field name failed and value true. Aside from this one application, I can think of many other places where this would be valuable. Am I being unclear? It seems that my question was not understood. Please let me know so I can try to re-explain. ?php $lock=tmp/REMOTE_ADDR; if (isset ($login)) { if (checkuser($login, $passwd)) { unlink($lock); Header('Location: /goodguy.php'); } else { touch($lock); Header('Location: '. $PHP_SELF); } } if (file_exists($lock)) echo 'Authentication failed', 'br' unlink($lock); // do yer form 'form method=POST ACTION=' .$PHP_SELF .''; input text name=login input text name=passwd /form Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do 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]
[PHP] disabling the back button
Hi all, can anybody tell how do i disable the user's back button, i mean that when he clicks the back button, in his browser, AFTER he has sigend out or finished a transaction, he will get a message saying that the session has expired ... just the way hotmail does it. thanx in advance. -- , /'^ ^'\ -((o)-(o))- --oOOO--(_)--OOOo--- Saquib Farooq Malik [EMAIL PROTECTED] [EMAIL PROTECTED] Sustainable Develpment Network Program (SDNP) Tel: 2270684 .oooO ( ) Oooo. ---\ (---( )-- \_) ) / (_/ -- 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]