[PHP] readfile or fopen? (Passing file to user...)
Hi, I wonder if there's a better way (more effective, less resource consuming ) to pass a file to a user than the ones I put below. This might be quite large files more than 100 mb. Mind this might be all kind of files (binary and others) and must preserve the files state. //Sending approriate headers //snip --Is this better, faster less consuming $fd=fopen($completeFilePath,'r'); fpassthru($fd); exit; than this? Seems like it, or is there yet another, faster, better way? $data = readfile($completeFilePath); $i=0; while ($data[$i] != ){ echo $data[$i]; $i++; } exit; TIA / Jimmy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can anybody tell what is wrong with this file?
Title: Message Hi friend, I am using the browser Netscape 4.7. It z not displaying the select box..blindly displaying in text format.. (If u want to see open example.jpg)Example.html=!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en"htmlbodytable tr td width="19%" bgcolor="#DBF3DE"1/td td width="15%" bgcolor="#DBF3DE"1/td td width="14%" bgcolor="#DBF3DE"Raghu/td td width="19%" bgcolor="#DBF3DE"Modem/td td width="18%" bgcolor="#DBF3DE"8L_LT/td td width="14%" bgcolor="#DBF3DE"W_SW150_1/td td width="14%" bgcolor="#DBF3DE"NULL/td td width="14%" bgcolor="#DBF3DE"NULL/td td width="14%" bgcolor="#DBF3DE"Pending/td td select name="change1" option value=""SELECT/option option value="Approved"Approved/option option value="Rejected"Rejected/option /select /td td width="14%" bgcolor="#DBF3DE" form name="name_1" method="post" action="modify_status.php" input type="submit" name="modify" value="SUBMIT" input type="hidden" name="req_id" value="1" input type="hidden" name="dev_tag" value="W_SW150_1" /formbr /td /tr/table/body/html= Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can anybody tell what is wrong with this file?
Balaji Ankem wrote: It z not displaying the select box..blindly displaying in text format.. (If u want to see open example.jpg) You have to use form tags. select tags are invalid if they are not within form tags. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems installing PHP
Hi again, and thanks. Well, I will try to explain...Im trying to run PHP as a module, but you helped me to use it as a CGI. I installed NTSP 6 on my computer, and reconfigure Apache for execute PHP as a CGI. Now Apache starts so well and i can execute de PHP info() function. Good. But when I tried to execute some old pages, that runs in a Linux platform and in a Win'98 platform, PHP crashes again. Appears again Dr Watson and it say that the PHP.EXE (access infraction) crashes and Apache shows an Internal Server Error. Any ideas? Advanced thanks again, Berli - Original Message - From: DL Neil [EMAIL PROTECTED] To: Berlina [EMAIL PROTECTED]; php-general-list [EMAIL PROTECTED] Sent: Monday, March 11, 2002 6:47 PM Subject: Re: [PHP] Problems installing PHP Hi Berlina, Im trying to install an Apache Web Server and PHP in a Windows NT . * Apache 1.2.23 * PHP 4.1.1 * Windows NT Server 4.0 with SP4 The installation of Apache Web Server and PHP was succesfully ok, but when I configure the PHP and Apache, editing the PHP.ini and httpd.conf files, as installation manual says, was not any problem neither. The problem appears when i try to load a php file with the web server, then shows all the content of a file. The server reads and show the file but not execute it. And, of course I added the lines: LoadModule php4_module PATH/php4apache.dll AddType application/x-httpd-php .php in my httpd.conf file. My (NT) system is Apache 1.3.20, PHP 4.0.6, NTWS 4.0 SP6a Entries in httpd.conf that you didn't mention: ScriptInterpreterSource registry and in: IfModule mod_alias.c ScriptAlias /php/ C:/Program Files/PHP/ later (in addition to what you described) in: IfModule mod_mime.c Action application/x-httpd-php /php/php.exe AddType application/x-httpd-php .php .phtml .php3 .php4 - watch those PATHs!? I'm not sure if any/all of them might be useful to you - I'm no Apache specialist, but I followed the instructions given and everything runs really well. Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can anybody tell what is wrong with this file?
MessageTry this html head /head body table tr td width=19% bgcolor=#DBF3DE1/td td width=15% bgcolor=#DBF3DE1/td td width=14% bgcolor=#DBF3DERaghu/td td width=19% bgcolor=#DBF3DEModem/td td width=18% bgcolor=#DBF3DE8L_LT/td td width=14% bgcolor=#DBF3DEW_SW150_1/td td width=14% bgcolor=#DBF3DENULL/td td width=14% bgcolor=#DBF3DENULL/td td width=14% bgcolor=#DBF3DEPending/td form name=name_1 method=post action=modify_status.php td select name=change1 option value=SELECT/option option value=ApprovedApproved/option option value=RejectedRejected/option /select /td td width=14% bgcolor=#DBF3DE input type=submit name=modify value=SUBMIT input type=hidden name=req_id value=1 input type=hidden name=dev_tag value=W_SW150_1 /td /form /tr /table /body /html Balaji Ankem [EMAIL PROTECTED] wrote in message 001a01c1c9a6$0dd19e40$[EMAIL PROTECTED]">news:001a01c1c9a6$0dd19e40$[EMAIL PROTECTED]... H i friend, I am using the browser Netscape 4.7. It z not displaying the select box..blindly displaying in text format.. (If u want to see open example.jpg) Example.html = !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en html body table tr td width=19% bgcolor=#DBF3DE1/td td width=15% bgcolor=#DBF3DE1/td td width=14% bgcolor=#DBF3DERaghu/td td width=19% bgcolor=#DBF3DEModem/td td width=18% bgcolor=#DBF3DE8L_LT/td td width=14% bgcolor=#DBF3DEW_SW150_1/td td width=14% bgcolor=#DBF3DENULL/td td width=14% bgcolor=#DBF3DENULL/td td width=14% bgcolor=#DBF3DEPending/td td select name=change1 option value=SELECT/option option value=ApprovedApproved/option option value=RejectedRejected/option /select /td td width=14% bgcolor=#DBF3DE form name=name_1 method=post action=modify_status.php input type=submit name=modify value=SUBMIT input type=hidden name=req_id value=1 input type=hidden name=dev_tag value=W_SW150_1 /formbr /td /tr /table /body /html = Thanks in advance Balaji
[PHP] newbie: using sessions
Hi i can't get the session variables working. When I get something like $_SESSION['Login']=$HTTP_POST_VARS['login']; on the first page, and i go with a link to an other php page. When then try to get $_SESSION['Login'] again it is empty. How comes? Maarten Weyn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] deleting records in mysql
Hi to all, just want to ask why does the records in the table field sometimes failed to delete in using an interface such as using a delete mysql queries in PHP or even in a WEBMIN mysql gui interface. When it happens i need to manual delete the records using a command line. is there any bug in the the version of mysql im using?my php scripts failed when this happened. Im using mysql version 11.15 distribution 3.23.39 in redhat linux 6.2 Regards, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newbie: using sessions
Have you started session? And you have to register session variables as well. Try this: session_start(); $session_login = $HTTP_POST_VARS['login']; session_register(session_login); At the other page, where you want to output the variable, you must also start session. session_start(); echo $session_login; Regards, Faisal On Tuesday 12 March 2002 17:28, you wrote: Hi i can't get the session variables working. When I get something like $_SESSION['Login']=$HTTP_POST_VARS['login']; on the first page, and i go with a link to an other php page. When then try to get $_SESSION['Login'] again it is empty. How comes? Maarten Weyn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Variables within a string
On Tuesday 12 March 2002 12:27, Analysis Solutions wrote: For security reasons. To make sure the variable did come from POSTing a form and not from the URL. Neither is more or less secure. The source of the data doesn't matter. The source of the data *does* matter. That is why the latest releases of PHP ( 4.0.6) recommends having register_globals OFF by default. That is also why instead of the cumbersome $HTTP_POST_VARS[] (etc) it's been changed to a much shorter $_POST[]. And to further encourage you to use the new form, $_POST[], $GET[] etc have been made super global so they can be used directly inside functions without having to declare them as global. To see why the source of data matters, see the chapter Security::Using Register Globals Regardless of where the info is from, validating user input is the only way to ensure security. But if you don't know where the data came from then it's not secure. Consider a real-life example. Robin Hood steals the Sheriff's ATM card, and the Sheriff stupidly enough has written the PIN onto the back of the card. Now Robin can go and withdraw all the money from the Sheriff's account because the ATM has no way of knowing that the card was stolen (it doesn't know where the source of the data came from), all it knows is that the data is valid (right card, right PIN). -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Let not the sands of time get in your lunch. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] deleting records in mysql
The web interfaces probably failed to receive the ID of the row you wish to delete. What's the error message? Does the ID of the row you wish to delete appear in the Delete Link in the web interface? Regards, Faisal On Tuesday 12 March 2002 17:35, you wrote: Hi to all, just want to ask why does the records in the table field sometimes failed to delete in using an interface such as using a delete mysql queries in PHP or even in a WEBMIN mysql gui interface. When it happens i need to manual delete the records using a command line. is there any bug in the the version of mysql im using?my php scripts failed when this happened. Im using mysql version 11.15 distribution 3.23.39 in redhat linux 6.2 Regards, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Variables within a string
I love your example.. But if you don't know where the data came from then it's not secure. Consider a real-life example. Robin Hood steals the Sheriff's ATM card, and the Sheriff stupidly enough has written the PIN onto the back of the card. Now Robin can go and withdraw all the money from the Sheriff's account because the ATM has no way of knowing that the card was stolen (it doesn't know where the source of the data came from), all it knows is that the data is valid (right card, right PIN). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to check session
How can I check if a session is still valid or if it has been expired. I want to check that and if not valid then execute an other script. Can't be that difficult but after 2 hours in traffic jams my brain is not working anymore .
[PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?
Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?
Do you want to do this in mySQL or PHP? Niklas -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 12. maaliskuuta 2002 12:30 To: 'Php-General' Subject: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? Thanks in advance Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?
Thankyou for reply!! I want to do it in PHP. Thanks in advance Balaji -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:04 PM To: Php-General Subject: RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Do you want to do this in mySQL or PHP? Niklas -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 12. maaliskuuta 2002 12:30 To: 'Php-General' Subject: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? Thanks in advance Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with ErrorHandler
Hi PHPzers How can I capture Error thrown by php for Non existent or undefined function. I used set_error_handler() but its returning its returning false. Anyway it gets called for NON-existent CONSTANT but not for Non-existent function. Can any one tell me what is going on here and solution to the above problem. Here is the code. Iam using PHP 4.1.1 ?php function ErrorHandler($Errcode, $Errmsg ) { if(!($Errcode error_reporting())) { print Returning from ErrorHandler\n ; return ; } print ErrorCode: . $Errcode . \n ; print ErrorMsg : . $Errmsg . \n ; return false ; } error_reporting(E_ALL); if(!set_error_handler(ErrorHandler)) { print Unable to set error handler\n ; } print SOME_CONSTANT ; Some_Non_Existing_func(); ? Hope some light on this. Thanks. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?
Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? When you select the 'datetime' field from mysql use UNIX_TIMESTAMP(). Then in PHP use strftime() to format the 'datetime' field to your liking. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Happiness isn't something you experience; it's something you remember. -- Oscar Levant */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newbie: using sessions
On Mar 12 Mar 2002 06:28, you wrote: Hi i can't get the session variables working. When I get something like $_SESSION['Login']=$HTTP_POST_VARS['login']; on the first page, and i go with a link to an other php page. When then try to get $_SESSION['Login'] again it is empty. How comes? How are you using you're session? Are you registering the variable for later use? session_start(); session_register(login); $login = $HTTP_POST_VARS['login']; That's it! -- 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 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] 'undef' as an argument value
function foo ($arg1_required, $arg2_options = ) { if (empty($arg2_optional) { print not passed; } else { print explicit; } } Or you can go the other route. Jordan Rodent Of Unusual Size [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rick Emery wrote: function foo($arg1_required, $arg2_optional=) if ($arg2_optional==) { print not passed; } else { print explicit; } } No, I said 'undef' because I mean 'undefined'. The argument can have *any* value; I need to know when it has *none*. That is, there is no magic cookie to which I can set the default that might not be a valid call value. -- #ken P-)} Ken Coar, Sanagendamgagwedweinini http://Golux.Com/coar/ Author, developer, opinionist http://Apache-Server.Com/ Millennium hand and shrimp! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/YYYY HH:MM AM or PM in PHP?
You have to parse your dates in anyway you like best to pieces, then use mktime() and then date() function. :) Niklas -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 12. maaliskuuta 2002 12:35 To: [EMAIL PROTECTED]; 'Php-General' Subject: RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Thankyou for reply!! I want to do it in PHP. Thanks in advance Balaji -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:04 PM To: Php-General Subject: RE: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Do you want to do this in mySQL or PHP? Niklas -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: 12. maaliskuuta 2002 12:30 To: 'Php-General' Subject: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? Thanks in advance Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] reset auto_increment field mysql
I have a mysql table which contains an id field which is set to auto_increment. I have a script which empties this database at regular intervals. My problem is that the auto_increment field won't reset to 0 after deleting all of tha data, but continue incrementing from where it left. How can i solve this problem.. I want id to reset to 0 when i delete the contents of the table. Can someone help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can't display PNG images
The icon essentially means that it was a broken image, or that they code did not work. I know that wasn't much help. On another point, in my opinion, it doesn't make a whole lot of logical sense to have a die(Error text) statement in code that creates an image.. If an error does occur, it will still display the same broken image icon. However, I am not the definitive word on the matter, and if you or anyone else has a different opinion on the matter, I would be more than happy to hear it. Jordan Teresa Narvaez [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Background info: I'm running o PHP 4.1.1 on a linux server kernel(2.2.16). o Using Netscape Communicator 4.75 o Compiled and installed the gd(1.8.4) library Problem(2 problems): 1.- The following code won't display an image(I get an icon of some type of piece of paper). ?php header (Content-type: image/png); $im = @ImageCreate (50, 100) or die (Cannot Initialize new GD image stream); $background_color = ImageColorAllocate ($im, 255, 255, 255); $text_color = ImageColorAllocate ($im, 233, 14, 91); ImageString ($im, 1, 5, 5, A Simple Text String, $text_color); ImagePng ($im); ? 2.- The configure Command from phpinfo() is different than what I actually typed at the command line. Also, phpinfo() area for GD does not show PNG or JPEG support. why? from phpinfo() -- './configure' '--with-mysql' '--with-apxs=/var/apache/bin/apxs' '--with-gd=/home/builder/downloads/untarred/gd-1.8.4' '--enable-sockets' '--enable-calendar' '--enable-ftp' '--enable-trans-sid' What I typed at the command line: - ./configure --with-mysql --with-apxs=/var/apache/bin/apxs --with-gd=/home/builder/downloads/untarred/gd-1.8.4 --with-png-dir=/usr/lib --enable-gd-native-ttf --with-ttf --with-jpeg-dir=/home/builder/downloads/untarred/jpeg-6b --with-t1lib=/home/builder/downloads/untarred/t1lib-1.3.1 --enable-sockets --with-zlib-dir --with-xpm-dir --enable-calenda r --enable-ftp --enable-trans-sid OUTPUT from phpinfo() --- GD Supportenabled GD Version1.6.2 or higher WBMP Support enabled I would really appretiate any ideas you could give me. Thanks in advance! -Teresa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can anybody tell what is wrong with this file?
MessageYou need a form before the select. Hope this helps. -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:13 AM To: 'Php-General' Subject: [PHP] Can anybody tell what is wrong with this file? H i friend, I am using the browser Netscape 4.7. It z not displaying the select box..blindly displaying in text format.. (If u want to see open example.jpg) Example.html = !DOCTYPE html public -//w3c//dtd html 4.0 transitional//en html body table tr td width=19% bgcolor=#DBF3DE1/td td width=15% bgcolor=#DBF3DE1/td td width=14% bgcolor=#DBF3DERaghu/td td width=19% bgcolor=#DBF3DEModem/td td width=18% bgcolor=#DBF3DE8L_LT/td td width=14% bgcolor=#DBF3DEW_SW150_1/td td width=14% bgcolor=#DBF3DENULL/td td width=14% bgcolor=#DBF3DENULL/td td width=14% bgcolor=#DBF3DEPending/td td select name=change1 option value=SELECT/option option value=ApprovedApproved/option option value=RejectedRejected/option /select /td td width=14% bgcolor=#DBF3DE form name=name_1 method=post action=modify_status.php input type=submit name=modify value=SUBMIT input type=hidden name=req_id value=1 input type=hidden name=dev_tag value=W_SW150_1 /formbr /td /tr /table /body /html = Thanks in advance Balaji
RE: [PHP] Hi How to convert the mysql(DATETIME) time to the format DD/MM/YYYY HH:MM AM or PM using PHP?
Hi friend, I never ued strftime function. I am confusing with the syntax. My problem is like this: I have the DATETIME in the variable $row-fromdate as -MM-DD HH:MM:SS. Is it possible to convert it to DD/MM/ HH:MM AM or PM using strftime() function? //Is below code is correct $time=strftime([%a%b%C%d%I%p],$row-fromdate); echo '$time'; Thanks in advance. Balaji -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Hi How to convert the time from mysql(DATETIME) table to the format DD/MM/ HH:MM AM or PM in PHP? Hi, I have stored the date and time in mysql table with DATETIME type. I want to change it in to DD/MM/ HH:MM AM or PM. How can I do this? When you select the 'datetime' field from mysql use UNIX_TIMESTAMP(). Then in PHP use strftime() to format the 'datetime' field to your liking. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Happiness isn't something you experience; it's something you remember. -- Oscar Levant */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: reset auto_increment field mysql
Direct quote from MySQL by Paul DuBois MySQL 3.23 introduced the new AUTO_INCREMENT behaviors of not reusing sequence numbers and allowing you to specify an initial sequence number in the CREATE TABLE statement. These behaviors are undone if you delete all records in the table using a DELETE statement of the following form: DELETE FROM tablename In this case, the sequence starts over from 1 rather than continuing in strictly increasing order. The sequence starts over even if your CREATE TABLE statement specifies an initial sequence number explicitly. This occurs due to the way MySQL optimizes DELETE statements that empty a table entirely: It re-creates the data and index files from scratch rather than deleting each record, and that causes all sequence number information to be lost. If you want to delete all records but preserve the sequence information, you can suppress the optimization and force MySQL to perform a row-by-row delete operation instead, like this: DELETE FROM tablename WHERE 1 0 Things may have changed since this book was published. Jordan Claudiu [EMAIL PROTECTED] wrote in message Pine.LNX.4.40.0203121306001.26884-10@betanou">news:Pine.LNX.4.40.0203121306001.26884-10@betanou... I have a mysql table which contains an id field which is set to auto_increment. I have a script which empties this database at regular intervals. My problem is that the auto_increment field won't reset to 0 after deleting all of tha data, but continue incrementing from where it left. How can i solve this problem.. I want id to reset to 0 when i delete the contents of the table. Can someone help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Can't display PNG images
Echoing text to the screen is a very useful debugging tool when creating images from php, if you type the full location of the image script in the address bar, rather than specifying it as an image that is opened by a html page. If you do this Teresa, you should get the PHP error message, and if you give this to us it would help. Alastair Battrick Senior Developer Lightwood Consultancy Ltd http://www.lightwood.net -Original Message- From: Jordan S. Jones [mailto:[EMAIL PROTECTED]] Sent: 12 March 2002 11:29 To: [EMAIL PROTECTED] Subject: [PHP] Re: Can't display PNG images The icon essentially means that it was a broken image, or that they code did not work. I know that wasn't much help. On another point, in my opinion, it doesn't make a whole lot of logical sense to have a die(Error text) statement in code that creates an image.. If an error does occur, it will still display the same broken image icon. However, I am not the definitive word on the matter, and if you or anyone else has a different opinion on the matter, I would be more than happy to hear it. Jordan Teresa Narvaez [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Background info: I'm running o PHP 4.1.1 on a linux server kernel(2.2.16). o Using Netscape Communicator 4.75 o Compiled and installed the gd(1.8.4) library Problem(2 problems): 1.- The following code won't display an image(I get an icon of some type of piece of paper). ?php header (Content-type: image/png); $im = @ImageCreate (50, 100) or die (Cannot Initialize new GD image stream); $background_color = ImageColorAllocate ($im, 255, 255, 255); $text_color = ImageColorAllocate ($im, 233, 14, 91); ImageString ($im, 1, 5, 5, A Simple Text String, $text_color); ImagePng ($im); ? 2.- The configure Command from phpinfo() is different than what I actually typed at the command line. Also, phpinfo() area for GD does not show PNG or JPEG support. why? from phpinfo() -- './configure' '--with-mysql' '--with-apxs=/var/apache/bin/apxs' '--with-gd=/home/builder/downloads/untarred/gd-1.8.4' '--enable-sockets' '--enable-calendar' '--enable-ftp' '--enable-trans-sid' What I typed at the command line: - ./configure --with-mysql --with-apxs=/var/apache/bin/apxs --with-gd=/home/builder/downloads/untarred/gd-1.8.4 --with-png-dir=/usr/lib --enable-gd-native-ttf --with-ttf --with-jpeg-dir=/home/builder/downloads/untarred/jpeg-6b --with-t1lib=/home/builder/downloads/untarred/t1lib-1.3.1 --enable-sockets --with-zlib-dir --with-xpm-dir --enable-calenda r --enable-ftp --enable-trans-sid OUTPUT from phpinfo() --- GD Supportenabled GD Version1.6.2 or higher WBMP Support enabled I would really appretiate any ideas you could give me. Thanks in advance! -Teresa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htmlspecial chars does not work on server
Hi, I just uploaded the perfect working site to the server, but suddenly htmlspecialchars does not seem te work there, so a lot of errors if people put entries with and ' in the guestbook. The server is a cobalt raq server, build with: './configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' '--with-gettext=/usr' '--enable-safe-mode' '--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf=/usr/lib/libttf.so' '--enable-track-vars' '--enable-xml' '--disable-debug' '--with-libdir=/usr/lib' '--with-db3' '--with-interbase=shared' '--with-mysql=shared' '--with-pgsql=shared' '--with-ldap' '--with-imap' I presume it has something to do with --enable-magic-quotes... Anybody with experience with this? Tnx, Martijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP IDE
Hey all, I am, and have been for some time, in search of a PHP IDE that allows me to view things more on a project basis. Meaning, that I would like to have some sort of Class browsing capabilities along with file browsing capabilities. I am also looking for a decent freeware Texteditor/Web Development environment for OS X.. If anyone can help me out in these areas, I would be greatly appreciative. Thank You, Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP IDE
on gtk.php.net there is a link to PHPMole. Built with PHP requires GTK. Not sure but I think that there is gtk lib for OSX since it is BSD. Best reagrds, Andrey Hristov - Original Message - From: Jordan S. Jones [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 2:23 PM Subject: [PHP] PHP IDE Hey all, I am, and have been for some time, in search of a PHP IDE that allows me to view things more on a project basis. Meaning, that I would like to have some sort of Class browsing capabilities along with file browsing capabilities. I am also looking for a decent freeware Texteditor/Web Development environment for OS X.. If anyone can help me out in these areas, I would be greatly appreciative. Thank You, Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP IDE
Sweet.. Thanks.. Andrey Hristov [EMAIL PROTECTED] wrote in message 047801c1c9c1$ae7ec820$0b01a8c0@ANDreY">news:047801c1c9c1$ae7ec820$0b01a8c0@ANDreY... on gtk.php.net there is a link to PHPMole. Built with PHP requires GTK. Not sure but I think that there is gtk lib for OSX since it is BSD. Best reagrds, Andrey Hristov - Original Message - From: Jordan S. Jones [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 2:23 PM Subject: [PHP] PHP IDE Hey all, I am, and have been for some time, in search of a PHP IDE that allows me to view things more on a project basis. Meaning, that I would like to have some sort of Class browsing capabilities along with file browsing capabilities. I am also looking for a decent freeware Texteditor/Web Development environment for OS X.. If anyone can help me out in these areas, I would be greatly appreciative. Thank You, Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hi How to compare two dates using PHP which are from mysql database?
Hi, I would like to compare the two dates (including time stamp) using php. Is it possible? Any help would be apprciable. Thanks in advance Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hi How to compare two dates using PHP which are from mysqldatabase?
On Tue, 12 Mar 2002, Balaji Ankem wrote: http://www.php.net/manual/en/function.strtotime.php you can compare the results with =, etc... Hi, I would like to compare the two dates (including time stamp) using php. Is it possible? Any help would be apprciable. Thanks in advance Balaji -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] reset auto_increment field mysql
your query is: DELETE FROM mytable; -Original Message- From: Claudiu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 5:09 AM To: [EMAIL PROTECTED] Subject: [PHP] reset auto_increment field mysql I have a mysql table which contains an id field which is set to auto_increment. I have a script which empties this database at regular intervals. My problem is that the auto_increment field won't reset to 0 after deleting all of tha data, but continue incrementing from where it left. How can i solve this problem.. I want id to reset to 0 when i delete the contents of the table. Can someone help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Selective seeing =)
12/03/2002 11:20:18 PM Hey all, I'm looking to write a PHP script that will cut all content out of a page and only display one line. For example, take this URL: http://www.cow.net/cows/ I want a script that will get this page, but only display the line at the bottom of the page that says: I will never speak to Sara Glover again The real use is to get the current usage from my ISP's online tracking system and display it on a page without 1) having to log in and 2) displaying my password. The page is accessible but just sending all paramaters in the URL, so a login as such isn't nesessary. The question is, does anyone know of any classes or PHP programs that I could use to do this? Cheers, Liam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Configuring PHP --with IMAP
Hello all, I have never before performed a PHP installation and I would like to know if, once PHP is installed and configured, I can add some other configurations as well. I am thinking of adding IMAP to my PHP installation, but I don't know if there might be something wrong with the already installed module. What can I do about this? Thanks... -- Lic. Carlos A. Triana Torres Webmaster. CIGET Sancti Spíritus Email: [EMAIL PROTECTED] Tel: 23956, 27958 HamCall: CO6TB Yahoo! Messanger MSN nick: co6tb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to compare two dates using PHP which are from mysql database?
Hi Jan, I want to compare the DTAETIME1,DATETIME2 which are from mysql table and want to compare in PHP. But strtotime takes only one argument and it checks whether it is valid or not. Balaji -Original Message- From: Jan Rademaker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 6:40 PM To: Balaji Ankem Cc: Php-General Subject: Re: [PHP] Hi How to compare two dates using PHP which are from mysql database? On Tue, 12 Mar 2002, Balaji Ankem wrote: http://www.php.net/manual/en/function.strtotime.php you can compare the results with =, etc... Hi, I would like to compare the two dates (including time stamp) using php. Is it possible? Any help would be apprciable. Thanks in advance Balaji -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hi How to compare two dates using PHP which are from mysql database?
Why not compare them in the SQL Query itself? Jason Lotito www.newbienetwork.net - Original Message - From: Balaji Ankem [EMAIL PROTECTED] To: 'Jan Rademaker' [EMAIL PROTECTED] Cc: Php-General [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 8:37 AM Subject: RE: [PHP] Hi How to compare two dates using PHP which are from mysql database? Hi Jan, I want to compare the DTAETIME1,DATETIME2 which are from mysql table and want to compare in PHP. But strtotime takes only one argument and it checks whether it is valid or not. Balaji -Original Message- From: Jan Rademaker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 6:40 PM To: Balaji Ankem Cc: Php-General Subject: Re: [PHP] Hi How to compare two dates using PHP which are from mysql database? On Tue, 12 Mar 2002, Balaji Ankem wrote: http://www.php.net/manual/en/function.strtotime.php you can compare the results with =, etc... Hi, I would like to compare the two dates (including time stamp) using php. Is it possible? Any help would be apprciable. Thanks in advance Balaji -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hi How to convert the mysql(DATETIME) time to the format DD/MM/YYYY HH:MM AM or PM using PHP?
On Tuesday 12 March 2002 19:43, Balaji Ankem wrote: Hi friend, I never ued strftime function. I am confusing with the syntax. My problem is like this: I have the DATETIME in the variable $row-fromdate as -MM-DD HH:MM:SS. Is it possible to convert it to DD/MM/ HH:MM AM or PM using strftime() function? //Is below code is correct $time=strftime([%a%b%C%d%I%p],$row-fromdate); echo '$time'; strftime() requires a unix-timestamp as an input. In your db query do: SELECT UNIX_TIMESTAMP(fromdate) AS from_date FROM table; Then: $time=strftime(some format, $row-from_date); hth -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* If you are honest because honesty is the best policy, your honesty is corrupt. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is there a faster way to escape special characters in a regex?
Hi all, At the moment I'm doing this to escape all special regular expression characters from my regex string: $badwordtest = str_replace(/,,$badwordtest); $badwordtest = str_replace(\\,,$badwordtest); $badwordtest = str_replace(^,\^,$badwordtest); $badwordtest = str_replace(.,\.,$badwordtest); $badwordtest = str_replace([,\[,$badwordtest); $badwordtest = str_replace($,\$,$badwordtest); $badwordtest = str_replace((,\(,$badwordtest); $badwordtest = str_replace(),\),$badwordtest); $badwordtest = str_replace(|,\|,$badwordtest); $badwordtest = str_replace(*,\*,$badwordtest); $badwordtest = str_replace(+,\+,$badwordtest); $badwordtest = str_replace(?,\?,$badwordtest); $badwordtest = str_replace({,\{,$badwordtest); $badwordtest = str_replace(},\},$badwordtest); $badwordtest = str_replace(\\,\\,$badwordtest); $badwordtest = / . $badwordtest . /i; if (preg_match($badwordtest,$word)) { $directmatch = TRUE; } Is there a way to either do this all in one go or even better, have the ereg itself ignore those characters if they are contained in the string? The idea is that I want to check a word for swearing by doing a direct comparison with a list of swear words, however the word I check could easily contain a special character so I need to escape it before the test commences. Suggestions very welcome! Cheers, Richard -- Fatal Design http://www.fatal-design.com Atari / DarkBASIC / Coding / Since 1995 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Double free zlib bug ... does PHP need to be recompiled?
Some of you may have heard news about the double free bug in the zlib libraries that many Linux programs use: http://www.kb.cert.org/vuls/id/368819 http://www.redhat.com/support/errata/RHSA-2002-026.html There is a quote on the Redhat errata page that got me thinking: Additionally, if you have any programs that you have compiled yourself, you should check to see if they use zlib. If they link to the shared zlib library then they will not be vulnerable once the shared zlib library is updated to the errata package. However, if any programs that decompress arbitrary data statically link to zlib or use their own version of the zlib code internally, then they need to be patched or recompiled. I remember having to compile PHP 4.1.2 using --with-zlibbut I don't know enough about it to say whether or not PHP statically links to the zlib or dynamically... Does anyone here know? After I patch the zlib libraries should I recompile PHP? Thanks in advance... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a faster way to escape special characters in a regex?
In PHP 4.0.5 and later, every parameter to str_replace() can be an array.If search and replace are arrays, then str_replace() takes a value from each array and uses them to do search and replace on subject. If replace has fewer values than search, then an empty string is used for the rest of replacement values. If search is an array and replace is a string; then this replacement string is used for every value of search. The converse would not make sense, though. BTW /abc/ and ~abc~ are equivalent regexes. So get a character which will not occur in the string and put in the front and the end. Regards, Andrey Hristov - Original Message - From: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 3:57 PM Subject: [PHP] Is there a faster way to escape special characters in a regex? Hi all, At the moment I'm doing this to escape all special regular expression characters from my regex string: $badwordtest = str_replace(/,,$badwordtest); $badwordtest = str_replace(\\,,$badwordtest); $badwordtest = str_replace(^,\^,$badwordtest); $badwordtest = str_replace(.,\.,$badwordtest); $badwordtest = str_replace([,\[,$badwordtest); $badwordtest = str_replace($,\$,$badwordtest); $badwordtest = str_replace((,\(,$badwordtest); $badwordtest = str_replace(),\),$badwordtest); $badwordtest = str_replace(|,\|,$badwordtest); $badwordtest = str_replace(*,\*,$badwordtest); $badwordtest = str_replace(+,\+,$badwordtest); $badwordtest = str_replace(?,\?,$badwordtest); $badwordtest = str_replace({,\{,$badwordtest); $badwordtest = str_replace(},\},$badwordtest); $badwordtest = str_replace(\\,\\,$badwordtest); $badwordtest = / . $badwordtest . /i; if (preg_match($badwordtest,$word)) { $directmatch = TRUE; } Is there a way to either do this all in one go or even better, have the ereg itself ignore those characters if they are contained in the string? The idea is that I want to check a word for swearing by doing a direct comparison with a list of swear words, however the word I check could easily contain a special character so I need to escape it before the test commences. Suggestions very welcome! Cheers, Richard -- Fatal Design http://www.fatal-design.com Atari / DarkBASIC / Coding / Since 1995 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a faster way to escape special characters in a regex?
Andrey Hristov [EMAIL PROTECTED] wrote in message 053801c1c9d0$5b4da400$0b01a8c0@ANDreY">news:053801c1c9d0$5b4da400$0b01a8c0@ANDreY... In PHP 4.0.5 and later, every parameter to str_replace() can be an array.If search and Thank you for pointing that out :) I've now changed my code from the (rather lengthy) version to the following which worked perfectly for me: $regcheck = array(/,\\,^,.,[,],$,(,),*,?,{,}); $regreplace = array(,,\^,\.,\[,\],\$,\(,\),\*,\?,\{,\}); $badwordtest = / . str_replace($regcheck,$regreplace,$badwords[$i]) . /i; BTW /abc/ and ~abc~ are equivalent regexes. So get a character which will not occur in the string and put in the front and the end. Does this mean that ~myword~ and /myword/ are identical? I only used /myword/ because it's in the php manual example like that. Cheers, Rich -- Fatal Design http://www.fatal-design.com Atari / DarkBASIC / Coding / Since 1995 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a faster way to escape special characters in a regex?
Yes they are identical. The rule is that the first and the last(excluding modificators) symbol must be identical so |abc| ~abc~ /abc/ %abc%(not sure for that) are equivalent. The docs uses // syntax because it is the most popular. Regards, Andrey Hristov - Original Message - From: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 4:26 PM Subject: Re: [PHP] Is there a faster way to escape special characters in a regex? Andrey Hristov [EMAIL PROTECTED] wrote in message 053801c1c9d0$5b4da400$0b01a8c0@ANDreY">news:053801c1c9d0$5b4da400$0b01a8c0@ANDreY... In PHP 4.0.5 and later, every parameter to str_replace() can be an array.If search and Thank you for pointing that out :) I've now changed my code from the (rather lengthy) version to the following which worked perfectly for me: $regcheck = array(/,\\,^,.,[,],$,(,),*,?,{,}); $regreplace = array(,,\^,\.,\[,\],\$,\(,\),\*,\?,\{,\}); $badwordtest = / . str_replace($regcheck,$regreplace,$badwords[$i]) . /i; BTW /abc/ and ~abc~ are equivalent regexes. So get a character which will not occur in the string and put in the front and the end. Does this mean that ~myword~ and /myword/ are identical? I only used /myword/ because it's in the php manual example like that. Cheers, Rich -- Fatal Design http://www.fatal-design.com Atari / DarkBASIC / Coding / Since 1995 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error Handling!
I want errors reported on a page when the mail() function for any reason fails to send emails. FOr example, if there is a malformed email address or anything, and the mail is not sent, how can i catch the Error and Display it on the page? Thanks, 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!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help in PHPDoc
Is anybody using PHPDoc for creating documentation, if yes could you tell me how to create documentation for a single php file which has enough comments needed by PHPDoc. [EMAIL PROTECTED] --- We must use time wisely and forever realize that the time is always ripe to do right. -- Nelson Mandela --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help in PHPDoc
I used it few times. You have to make modifications to index.php, so the engine will know where to look to for .php scripts that have to be documented. I've attached my index.php - Original Message - From: S.Murali Krishna [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 4:35 PM Subject: [PHP] Help in PHPDoc Is anybody using PHPDoc for creating documentation, if yes could you tell me how to create documentation for a single php file which has enough comments needed by PHPDoc. [EMAIL PROTECTED] --- We must use time wisely and forever realize that the time is always ripe to do right. -- Nelson Mandela --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi How to compare two dates using PHP which are from mysqldatabase?
On Tue, 12 Mar 2002, Balaji Ankem wrote: Hi Jan, I want to compare the DTAETIME1,DATETIME2 which are from mysql table and want to compare in PHP. But strtotime takes only one argument and it checks whether it is valid or not. True, after you've fetched a record with, e.g. $row = mysql_fetch_row($result) use if (strtotime($row[DATETIME1]) strtotime($row[DATETIME2])) { ... } or whatever you desire... Balaji -Original Message- From: Jan Rademaker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 6:40 PM To: Balaji Ankem Cc: Php-General Subject: Re: [PHP] Hi How to compare two dates using PHP which are from mysql database? On Tue, 12 Mar 2002, Balaji Ankem wrote: http://www.php.net/manual/en/function.strtotime.php you can compare the results with =, etc... Hi, I would like to compare the two dates (including time stamp) using php. Is it possible? Any help would be apprciable. Thanks in advance Balaji -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hi How to compare two dates using PHP which are from mysqldatabase?
On Tue, 12 Mar 2002, Jason Lotito wrote: Why not compare them in the SQL Query itself? That could work just as well, depending in what you want to do with the data. -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] reset auto_increment field mysql
I wish it was that simple... No.. It doesn't work this way... On Tue, 12 Mar 2002, Rick Emery wrote: your query is: DELETE FROM mytable; -Original Message- From: Claudiu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 5:09 AM To: [EMAIL PROTECTED] Subject: [PHP] reset auto_increment field mysql I have a mysql table which contains an id field which is set to auto_increment. I have a script which empties this database at regular intervals. My problem is that the auto_increment field won't reset to 0 after deleting all of tha data, but continue incrementing from where it left. How can i solve this problem.. I want id to reset to 0 when i delete the contents of the table. Can someone help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Handling!
On Tue, 12 Mar 2002, Thomas Edison Jr. wrote: I want errors reported on a page when the mail() function for any reason fails to send emails. FOr example, if there is a malformed email address or anything, and the mail is not sent, how can i catch the Error and Display it on the page? the easiest way is: ? error_reporting(0); // you're the one who want's to report errors, not php function mailerror() { print Something went wrong.; // etc... } mail(...) || mailerror(); ? Thanks, 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!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] undefined symbol: compress during install?
On Monday, March 11, 2002, at 07:50 PM, Michael Sims wrote: bugs.php.net is extremely helpful for stuff like this, (even though strictly speaking those types of things shouldn't be submitted as bugs) and I don't think enough people out there know to check it. It's actually helped me out on 2-3 occasions... Thank you, I didn't even know that virtual host existed. I'll definitely check there too next time I'm having problems. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] reset auto_increment field mysql
How about: ALTER table auto_increment=0 -Original Message- From: Claudiu [mailto:[EMAIL PROTECTED]] I wish it was that simple... No.. It doesn't work this way... On Tue, 12 Mar 2002, Rick Emery wrote: your query is: DELETE FROM mytable; -Original Message- From: Claudiu [mailto:[EMAIL PROTECTED]] My problem is that the auto_increment field won't reset to 0 after deleting all of tha data, but continue incrementing from where it left. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] question
don't know exactly if anybody will understand what I am asking, but any help would be appreciated. I am taking a value off a web page, posting this value to another web page, where more values are taken and submitted to a php page. The problem is that the first value (taken from the initial web page) is not known on the php page. Is there a way to submit this value from the second page, to the php page. All the other values (from the second page) are known on the php page. i.e. if I echo $inp (the value from the first web page) on the php page, there is no value. sorry if I did not explain that very well, any ideas. Thanks a million John _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question
On Mar 12 Mar 2002 12:26, you wrote: don't know exactly if anybody will understand what I am asking, but any help would be appreciated. I am taking a value off a web page, posting this value to another web page, where more values are taken and submitted to a php page. The problem is that the first value (taken from the initial web page) is not known on the php page. Is there a way to submit this value from the second page, to the php page. All the other values (from the second page) are known on the php page. i.e. if I echo $inp (the value from the first web page) on the php page, there is no value. sorry if I did not explain that very well, any ideas. Thanks a million Post it with a hidden input, or on the URL. -- 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 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] question
Probably the value you want to sent to the php page is on the page but not between form and /form. Regards, Andrey Hristov - Original Message - From: John Gurley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 5:26 PM Subject: [PHP] question don't know exactly if anybody will understand what I am asking, but any help would be appreciated. I am taking a value off a web page, posting this value to another web page, where more values are taken and submitted to a php page. The problem is that the first value (taken from the initial web page) is not known on the php page. Is there a way to submit this value from the second page, to the php page. All the other values (from the second page) are known on the php page. i.e. if I echo $inp (the value from the first web page) on the php page, there is no value. sorry if I did not explain that very well, any ideas. Thanks a million John _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: reset auto_increment field mysql
On Tuesday, March 12, 2002, at 06:51 AM, Jordan S. Jones wrote: Direct quote from MySQL by Paul DuBois Just a quick plug for that book -- it is excellent. If you use MySQL for anything beyond casual experimentation, I highly recommend it as well worth the $40-50 (US) that it costs. The first chapter alone gives a few dozen examples of various ways to query the database, which usually answers any of my questions about setting up queries. There are chapters on optimizing the database, security issues, database administration, backup and repair of tables, and a huge set of appendixes with about as much MySQL information as you'd need (including the PHP-MySQL function reference). To boot, when I had a question about how to perform an insert into a table with UNIQUE indexes where I had no control over whether or not the user was entering legitimate values, I posted to the mysql-users mailing list. Within a few hours, I got the solution from a couple of people, including the author of this book himself. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Variables within a string
On Monday, March 11, 2002, at 10:34 PM, Jason Wong wrote: On Monday 11 March 2002 11:10, Chris Cocuzzo wrote: $foo = Entry for . $HTTP_POST_VARS[name]; $foo = Entry for for $HTTP_POST_VARS[name]; But that's not good programming. Associative arrays should have the key quoted in order to avoid confusion with contants. See http://www.php.net/manual/en/language.types.array.php#language.types.array. donts Inside of double-quoted strings there is no need to single-quote the array key (in fact it can't be done, gives syntax error). The section of the manual you quoted states this :) I thought that it could be done like so: $foo = Entry for {$HTTP_POST_VARS['name']}; Sorry for butting in, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] reset auto_increment field mysql
It worked for me. What results did you get? -Original Message- From: Claudiu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] reset auto_increment field mysql I wish it was that simple... No.. It doesn't work this way... On Tue, 12 Mar 2002, Rick Emery wrote: your query is: DELETE FROM mytable; -Original Message- From: Claudiu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 5:09 AM To: [EMAIL PROTECTED] Subject: [PHP] reset auto_increment field mysql I have a mysql table which contains an id field which is set to auto_increment. I have a script which empties this database at regular intervals. My problem is that the auto_increment field won't reset to 0 after deleting all of tha data, but continue incrementing from where it left. How can i solve this problem.. I want id to reset to 0 when i delete the contents of the table. Can someone help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hi can we write a form inside td element of a table?
TRTDINPUT type=text name=mytext/TR -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 12:12 AM To: Php-General Subject: [PHP] Hi can we write a form inside td element of a table? Hi, can we give a form element as td inside table element? Thanks in advance Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] index.php question
Still haven't gotten this to work properly with IIS. any other suggestions ? Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com Samuel OttenhoffTo: Omland Christopher m [EMAIL PROTECTED], sam@gothamjaz[EMAIL PROTECTED] z.com cc: Subject: Re: [PHP] index.php question 03/11/2002 01:47 PM # # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # IfModule mod_dir.c DirectoryIndex index.php index.php3 index.html /IfModule Sam On 3/11/02 1:36 PM, Omland Christopher m [EMAIL PROTECTED] wrote: Hi all, I'm new to the mailing list, I hope I'm in the right spot. I have installed php, and .php files work fine, unless they are my index file. For example http://whatever.com/~jondoe/info.php will work. But if I make a index.php file and go to http://whatever.com/~jondoe it wont work. I can view the source and see my php code, which I know means the server isn't translating it. I'm running RH LINUX, and running apache webserver. I have checked the httpd.conf file and the load modules lines are in there, and they are correct??(I THINK) Any help would be appreciated. Thank You. -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpinfo() and phpmyAdmin
I can get phpinfo() working properly on a page that I just create in the same directory. But why will the phpmyAdmin phpinfo.php not show anything but a blank page ? All other functions of phpMyAdmin work properly. Thank You Daniel Negrón Lotus Notes Administrator / Developer KB Electronics, Inc. 954.346.4900x122 http://www.kbelectronics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dynamic Web Navigation
Does anyone have a good link to a tutorial, or a book suggestion that will help me learn more about making dynamic web pages with MySQL/PHP. Mainly things like loading navigation menues, and pics and what not? Thanks. -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Form Based Authentication
I am new to PHP and I am attempting to use some type of authentication in my site. My first page is a simple HTML form page with 2 fields username and passwrd. that form is POST'ed to a 2nd page. In the second page I start a session, and if $_POST["username"] is set I Register a "authenticated_user" session variable. (This will be replaced by an actual authenticate function). Could Someone Explain why I have to submit my first form twice in order to be considered authenticated. Also any pointers to tutorials or samples of form based authentication would be appreciated. My Code is attached: _IncrediMail - Email has finally evolved - Click Here verify.php Description: unknown/unknown -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php array
Hi list, I think this could be an idiot question but I couldn't find an answer. I have 4 input text in a html, and I'd like to store them as a list, so I've named it Name[]. OK, php understand it as an array, but how can I make an validation code with javascript to know if the user didn't typed in this fields??? I couldn't do javascript recognize my name[] field Thank's in advance Rodrigo -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php array
Something like this: ?php $valid=1; foreach ( $name as $value ) { if ( $value == '' || ! isset($value) ) { $valid=0; } } if ( $valid == 1 ) { do_stuff(); } else { give_error(); } ? -Original Message- From: Rodrigo Peres [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 10:11 AM To: PHP Subject: [PHP] php array Hi list, I think this could be an idiot question but I couldn't find an answer. I have 4 input text in a html, and I'd like to store them as a list, so I've named it Name[]. OK, php understand it as an array, but how can I make an validation code with javascript to know if the user didn't typed in this fields??? I couldn't do javascript recognize my name[] field Thank's in advance Rodrigo -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Form Based Authentication
First, change the names of your include files to something.inc.php so that no-one can download the files and get thte source, should their names become known. Second, you either must use session_register or $_SESSION['variablename'] and not mix their use. So instead of: $authenticated_user = 71722334; session_register(authenticated_user); Use: $_SESSION['authenticated_user'] = 71722334; Note that session_register will always start sessions, while using the associated array $_SESSION won't, so make sure you continue to use session_start() at the top of every page just as you did here. Look for tutorials here: http://www.rci.rutgers.edu/~jfulton/php1/index.html http://www.rci.rutgers.edu/~jfulton/php1/index.html http://www.newbienetwork.net/ http://www.newbienetwork.net/ http://www.thickbook.com/ http://www.thickbook.com/ http://www.phpdeveloper.org/ http://www.phpdeveloper.org/ http://www.devshed.com/ http://www.devshed.com/ http://www.webmonkey.com/ http://www.webmonkey.com/ http://www.irc-html.com/ http://www.irc-html.com/ http://www.phpbuilder.com/ http://www.phpbuilder.com/ http://www.zend.com/ http://www.zend.com/ -Original Message- From: Anson Smith [mailto:[EMAIL PROTECTED]] Could Someone Explain why I have to submit my first form twice in order to be considered authenticated.
Re: [PHP] php array
you could referance the element id of the form something like if(window.document.form.element[1].value = ) { do_something(); } not sure of the exact js construct, but you get my idea. Jim Lucas www.bend.com - Original Message - From: Rodrigo Peres [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 10:10 AM Subject: [PHP] php array Hi list, I think this could be an idiot question but I couldn't find an answer. I have 4 input text in a html, and I'd like to store them as a list, so I've named it Name[]. OK, php understand it as an array, but how can I make an validation code with javascript to know if the user didn't typed in this fields??? I couldn't do javascript recognize my name[] field Thank's in advance Rodrigo -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] archive
Hello, Is there a searchable archive of this PHP- general subscriber list? Thanks in Advance, Jim Long -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] archive
http://marc.theaimsgroup.com/?l=php-generalr=1w=2 Regards, Andrey - Original Message - From: Jim Long [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 12, 2002 8:51 PM Subject: [PHP] archive Hello, Is there a searchable archive of this PHP- general subscriber list? Thanks in Advance, Jim Long -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] parse error? how can I print spesific message for all error mesage
if I write directly localhost/myphp/resmigoster.php on his browser it response Warning: Undefined index: dir in c:\inetpub\wwwroot\kocak\resimgoster.php on line 1 Warning: Undefined index: res in c:\inetpub\wwwroot\kocak\resimgoster.php on line 3 if I write directly localhost/myphp/resmigoster.php?dir=mainres=mine than the script works like mine but I wonder to disable Warning: Undefined index: dir in c:\inetpub\wwwroot\kocak\resimgoster.php on line 1 response if someone directly enter localhost/myphp/resmigoster.php I want to say him that Access Denied Or something like that -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Execute php script inside an HTML page???
Hello all, Can I execute a php script from an HTML document? I mean, with the file named with html extension? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Execute php script inside an HTML page???
Yes, However, you need to add the .html file extension to the php parser so that it parses the .html file. Thank you, Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Lic. Carlos A. Triana Torres [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 1:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Execute php script inside an HTML page??? Hello all, Can I execute a php script from an HTML document? I mean, with the file named with html extension? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] accessing data from classes
I am just getting my head around classes, so forgive me if this is a schoolboy error! In order to learn I am re-writing my content management system and am in the process of writing an HTML.class and a MYSQL.class. so far so good. I spawn new instances of a table for example, sending parameter,and a table is output. now in my MYSQL.class- I want to send a query to my class which then returns an array- my database row or rows. the problem is that whilst my array is created- I only seem to be able to manipulate it within my MYSQL class. This is not satisfactory as I really want to be able to send it on to my HTML.class for formatting etc. I obvioulsy do not want to format any 'echoed' output from within my databasee class. Here is a bit of sample code- Once my database is open I call my query like this- $TemplateTable = new DB; $TemplateTable-mysql_query('SELECT * FROM template ORDER BY name ASC LIMIT 10'); This is the function within my MYSQL.class function mysql_query($query){ $a= 0; while($row=mysql_fetch_row($SQL)) { $new_row = join('***',$row); $result[] = $new_row; echo $result[$a].br; $a++; } } So here I am creating a string with each row in my database which is delimted by *** - $new_row.and am placing each row in anew array called $result. I can evaluate and format either $new_row or $result from within mysql_query() but I really want to do is to send it on to another funtion or even better another class- or access the values glabbally as variables. Any ideas or am I missing something really obvious? Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a faster way to escape special characters in aregex?
On Tue, 2002-03-12 at 05:57, Richard Davey wrote: Hi all, At the moment I'm doing this to escape all special regular expression characters from my regex string: Sounds like you want preg_quote(): http://www.php.net/manual/en/function.preg-quote.php Hope this helps, Torben $badwordtest = str_replace(/,,$badwordtest); $badwordtest = str_replace(\\,,$badwordtest); $badwordtest = str_replace(^,\^,$badwordtest); $badwordtest = str_replace(.,\.,$badwordtest); $badwordtest = str_replace([,\[,$badwordtest); $badwordtest = str_replace($,\$,$badwordtest); $badwordtest = str_replace((,\(,$badwordtest); $badwordtest = str_replace(),\),$badwordtest); $badwordtest = str_replace(|,\|,$badwordtest); $badwordtest = str_replace(*,\*,$badwordtest); $badwordtest = str_replace(+,\+,$badwordtest); $badwordtest = str_replace(?,\?,$badwordtest); $badwordtest = str_replace({,\{,$badwordtest); $badwordtest = str_replace(},\},$badwordtest); $badwordtest = str_replace(\\,\\,$badwordtest); $badwordtest = / . $badwordtest . /i; if (preg_match($badwordtest,$word)) { $directmatch = TRUE; } Is there a way to either do this all in one go or even better, have the ereg itself ignore those characters if they are contained in the string? The idea is that I want to check a word for swearing by doing a direct comparison with a list of swear words, however the word I check could easily contain a special character so I need to escape it before the test commences. Suggestions very welcome! Cheers, Richard -- Fatal Design http://www.fatal-design.com Atari / DarkBASIC / Coding / Since 1995 -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP regular expression
Hi list, I have a huge text file with many text on it. I'd like to know if someone can help in construct a regular expression to delete everything that not have this pattern Email: [EMAIL PROTECTED]. The part Email: is fixed and the email adress changes. I've tried many time to make the replace with PHP, but I'm very new to regular expression. Thank's Rodrigo -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Execute php script inside an HTML page???
This idea sounds very appealing, but remember that PHP will then parse every HTML file. Make certain this won't result in a performance hit. Miles Thompson At 03:43 PM 3/12/2002 -0500, Hunter, Ray wrote: Yes, However, you need to add the .html file extension to the php parser so that it parses the .html file. Thank you, Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Lic. Carlos A. Triana Torres [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 1:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Execute php script inside an HTML page??? Hello all, Can I execute a php script from an HTML document? I mean, with the file named with html extension? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Execute php script inside an HTML page???
If you only have a web account you can download the .htaccess file from your home directory and add the following lines. Whether this will work or not may depend on your host. AddType application/x-httpd-php .html AddType application/x-httpd-php .htm -Original Message- From: Lic. Carlos A. Triana Torres [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 1:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Execute php script inside an HTML page??? Hello all, Can I execute a php script from an HTML document? I mean, with the file named with html extension? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Execute php script inside an HTML page???
If you are running apache, open httpd.conf and search for .php (the line where it specifies what types of files are PHP files)... Simply add .html to the list. John -Original Message- From: Lic. Carlos A. Triana Torres [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Execute php script inside an HTML page??? Hello all, Can I execute a php script from an HTML document? I mean, with the file named with html extension? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] parse error? how can I print spesific message for allerror mesage
On Tue, 12 Mar 2002, Ceyhun Güler wrote: than the script works like mine but I wonder to disable Warning: Undefined index: dir in c:\inetpub\wwwroot\kocak\resimgoster.php on line 1 response if someone directly enter localhost/myphp/resmigoster.php I want to say him that Access Denied Or something like that use error_reporting() (see manual) to suppres warnings. to give back an error use something like; if (!isset($dir) || !isset($res)) { print Access Denied; exit; } -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] accessing data from classes
It is good that you are looking into classes and functions. The concept you are missing is that of returning a result. At the end of your function mysql_query, add a line: return $result; Then, when you call that function, make it like this: $resultArray = $TemplateTable-mysql_query(select ); Now you can pass $resultArray on to a different function. Sam On 3/12/02 3:48 PM, caspar kennerdale [EMAIL PROTECTED] wrote: I am just getting my head around classes, so forgive me if this is a schoolboy error! In order to learn I am re-writing my content management system and am in the process of writing an HTML.class and a MYSQL.class. so far so good. I spawn new instances of a table for example, sending parameter,and a table is output. now in my MYSQL.class- I want to send a query to my class which then returns an array- my database row or rows. the problem is that whilst my array is created- I only seem to be able to manipulate it within my MYSQL class. This is not satisfactory as I really want to be able to send it on to my HTML.class for formatting etc. I obvioulsy do not want to format any 'echoed' output from within my databasee class. Here is a bit of sample code- Once my database is open I call my query like this- $TemplateTable = new DB; $TemplateTable-mysql_query('SELECT * FROM template ORDER BY name ASC LIMIT 10'); This is the function within my MYSQL.class function mysql_query($query){ $a= 0; while($row=mysql_fetch_row($SQL)) { $new_row = join('***',$row); $result[] = $new_row; echo $result[$a].br; $a++; } } So here I am creating a string with each row in my database which is delimted by *** - $new_row.and am placing each row in anew array called $result. I can evaluate and format either $new_row or $result from within mysql_query() but I really want to do is to send it on to another funtion or even better another class- or access the values glabbally as variables. Any ideas or am I missing something really obvious? Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Pay Flow Pro
I am about to build a script in PHP for a user to submit a credit card transaction through Verisign's Pay Flow Pro. Is there some sort of module I need installed first before I use PHP for this? Does anyone know of a script around to use as an example, or for that matter, a free one already done I could modify for my own use? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Another Session Question..
I asked a question the other day about turning $_REQUEST variables into $_SESSION variables...thanks, all who helped me with that... I have another question about assigning $_REQUEST variables to $_SESSION variables that I am hoping someone can help me out with Here is a snippit of code... while($r = mssql_fetch_array($result)) { $vname = $group_abbr . $count; $_SESSION[$vname] = $_REQUEST[$vname]; } Now an explanation... $vname is the actual name of the variable that is stored in the $_REQUEST array (and what I want it to be called in the $_SESSION array) can I do this: ? (for example, a1 so $_SESSION['a1'] = $_REQUEST['a1']; is what I want it to do...but I need to send the name of the variable as a variable...) I tried this... $_SESSION[$vname] = $_REQUEST[$vname]; ...but it doesn't seem to be working and I can't figure out how to get those variables registered Any help is much appreciated. Zara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] parse error? how can I print spesific message for allerror mesage
On Tue, 2002-03-12 at 12:32, Ceyhun Güler wrote: if I write directly localhost/myphp/resmigoster.php on his browser it response Warning: Undefined index: dir in c:\inetpub\wwwroot\kocak\resimgoster.php on line 1 Warning: Undefined index: res in c:\inetpub\wwwroot\kocak\resimgoster.php on line 3 if I write directly localhost/myphp/resmigoster.php?dir=mainres=mine than the script works like mine but I wonder to disable Warning: Undefined index: dir in c:\inetpub\wwwroot\kocak\resimgoster.php on line 1 response if someone directly enter localhost/myphp/resmigoster.php I want to say him that Access Denied Or something like that 'The Right Way'--there are several ;)--is to initialize your variables. :) If you don't want to do that, then: 1) Set error_reporting(E_ALL) for development, so you catch all the silly little errors we all make; 2) Set display_errors = Off in php.ini, so that users don't see any errors that are generated; 3) Use set_error_handler() to create your own function which can deal with error messages however you like. To the above, you can add all sorts of things. Using set_error_handling(), for instance, you can have error messages logged to a file, or sent to a socket or pipe--whatever. But turning error_reporting() off while developing is just going to let you get away with all sorts of things which might come back and bite you later (unquoted array keys, etc). -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Another Session Question..
What I am trying to do is register a variable already in the request array...as a session variable. I know I can do $_SESSION['foo'] = $_REQUEST['foo'] but that's if I know the name of the variable that was registered on the form side I do know the name, but it's dynamically generated. So for example, the name could be foo1 - foo10 and I want to register all of them as session variables. So I want to be able to do this: $count = 1; $varname = foo . $count; then do this: $_SESSION[$varname] = $_REQUEST[$varname] where the value of varname is actually the name of the variable that I want to pull outDoes that make any sense? I don't think that I can do $_SESSION['varname'] = $_REQUEST['varname'] in this case because I don't want the value of varname as a session variableI want the value of the value of varname as a session variable. I'm not sure if I can do this...but I'd assume there has got to be some way, I just don't know what it is. Also, apparently the php manual warns not to use $_SESSION['var'] = $var with session_register and session_unregister. So that wouldn't work for me anyway. (http://www.php.net/manual/en/function.session-register.php) Zara -Original Message- From: Coggeshall, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 3:38 PM To: Gonzalez, Zara E Subject: RE: [PHP] Another Session Question.. If you are trying to register any variable... Say $foo... Session_register('foo'); It will automatically appear in the $_SESSION array next time a page is requested. I'm pretty sure it even will do it immediately (put it in $_SESSION) John -Original Message- From: Gonzalez, Zara E [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:23 PM To: '[EMAIL PROTECTED]' Subject: [PHP] Another Session Question.. I asked a question the other day about turning $_REQUEST variables into $_SESSION variables...thanks, all who helped me with that... I have another question about assigning $_REQUEST variables to $_SESSION variables that I am hoping someone can help me out with Here is a snippit of code... while($r = mssql_fetch_array($result)) { $vname = $group_abbr . $count; $_SESSION[$vname] = $_REQUEST[$vname]; } Now an explanation... $vname is the actual name of the variable that is stored in the $_REQUEST array (and what I want it to be called in the $_SESSION array) can I do this: ? (for example, a1 so $_SESSION['a1'] = $_REQUEST['a1']; is what I want it to do...but I need to send the name of the variable as a variable...) I tried this... $_SESSION[$vname] = $_REQUEST[$vname]; ...but it doesn't seem to be working and I can't figure out how to get those variables registered Any help is much appreciated. Zara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Another Session Question..
On second look, perhaps it is working correctly. I wasn't incrementing my counter variable. Sorry to flood your mailboxes. Zara -Original Message- From: Gonzalez, Zara E Sent: Tuesday, March 12, 2002 3:47 PM To: 'Coggeshall, John'; '[EMAIL PROTECTED]' Subject: RE: [PHP] Another Session Question.. What I am trying to do is register a variable already in the request array...as a session variable. I know I can do $_SESSION['foo'] = $_REQUEST['foo'] but that's if I know the name of the variable that was registered on the form side I do know the name, but it's dynamically generated. So for example, the name could be foo1 - foo10 and I want to register all of them as session variables. So I want to be able to do this: $count = 1; $varname = foo . $count; then do this: $_SESSION[$varname] = $_REQUEST[$varname] where the value of varname is actually the name of the variable that I want to pull outDoes that make any sense? I don't think that I can do $_SESSION['varname'] = $_REQUEST['varname'] in this case because I don't want the value of varname as a session variableI want the value of the value of varname as a session variable. I'm not sure if I can do this...but I'd assume there has got to be some way, I just don't know what it is. Also, apparently the php manual warns not to use $_SESSION['var'] = $var with session_register and session_unregister. So that wouldn't work for me anyway. (http://www.php.net/manual/en/function.session-register.php) Zara -Original Message- From: Coggeshall, John [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 3:38 PM To: Gonzalez, Zara E Subject: RE: [PHP] Another Session Question.. If you are trying to register any variable... Say $foo... Session_register('foo'); It will automatically appear in the $_SESSION array next time a page is requested. I'm pretty sure it even will do it immediately (put it in $_SESSION) John -Original Message- From: Gonzalez, Zara E [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 12, 2002 4:23 PM To: '[EMAIL PROTECTED]' Subject: [PHP] Another Session Question.. I asked a question the other day about turning $_REQUEST variables into $_SESSION variables...thanks, all who helped me with that... I have another question about assigning $_REQUEST variables to $_SESSION variables that I am hoping someone can help me out with Here is a snippit of code... while($r = mssql_fetch_array($result)) { $vname = $group_abbr . $count; $_SESSION[$vname] = $_REQUEST[$vname]; } Now an explanation... $vname is the actual name of the variable that is stored in the $_REQUEST array (and what I want it to be called in the $_SESSION array) can I do this: ? (for example, a1 so $_SESSION['a1'] = $_REQUEST['a1']; is what I want it to do...but I need to send the name of the variable as a variable...) I tried this... $_SESSION[$vname] = $_REQUEST[$vname]; ...but it doesn't seem to be working and I can't figure out how to get those variables registered Any help is much appreciated. Zara -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Another Session Question..
On Tue, 12 Mar 2002, Gonzalez, Zara E wrote: On second look, perhaps it is working correctly. I wasn't incrementing my counter variable. Sorry to flood your mailboxes. Zara this should work as well; foreach($_REQUEST as $key = $val) { $_SESSION[$key] = $val; } -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Safety File
I want a file that has all of my important, global variables (like database info). I want this to be encoded by a PHP script and written. Is there any way, that I can import the file, while decoding it, so that the info is given as just lines of PHP. How can I do this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/MySQL application - how to schedule server processes?
Hi there, I wonder if anyone can offer me some advice... I have developed a portal using PHP, which allows users to uploads files into their own personal storage locations. These files are stored in a MySQL database. The system also allows the users to select these files and submit them for analysis. By analysis, I mean that these files will be used as the input to separate executables (written in C) running on the server. This aspect of the system be accomplished in 2 ways: CASE 1: Where the analysis program has a run time of less than 1 second (nb: the amount of users estimated at any one time is no greater than 10). Here, the file can be extracted, a command line argument generated, and then passed to the server via the PHP passthru() function. The result will then be returned to the user. Easy peasy. CASE 2: Where the analysis program may have a run time in excess of 2 hours. The passthru() function is obviously not an option as we do not expect the user to sit in front of the computer for a few hours, or even minutes waiting for a result. I am not sure as to the correct terminology, but I believe I am looking for something like an 'application server' / 'process management scheduler'. Maybe something that is commercially/freely available, or an idea of how to go about writing my own. Here is a rough idea of what I am trying to accomplish: The user accesses the web application and, and selects a file for analysis. The system (implemented in PHP) updates the databases to say that 'ANALYSIS A' of 'FILE B' has been requested. A separate entity running on the server watches the database for analysis requests, and either (a) runs them one after another updates the database appropriately (b) or schedules according to some priority. When each analysis is complete, the user will have access to the a results folder in the system containing a list of their submitted analysis (either pending or complete). Can anyone offer any advice/suggestions on how this can be accomplished? Thank you very much for your time. - Best regards, Lee Reilly -- Lee P. Reilly, ms:G758 Szilard Resource, tel:505-665-7025 Bioscience Division, SM-30 Bikini Atoll Rd, Los Alamos National Laboratory, mailto:[EMAIL PROTECTED] Los Alamos, NM 87545. http://home.lanl.gov/lreilly Quidquid latine dictum sit, altum viditur filterPHP SQL/filter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help: setcookie question
pretty please? I have a situation where I have to have a cookie that is set by one apache server and read by another. They are on the same domain, but different ports. To write this I set up two webserver one on port 81 and one on 90, the port 81 server calles setcookie, but in the DOMAIN argument I specified the port (i.e. 192.168.1.102:90). but this doesn't work :( In the cookies file it shows up as 192.168.1.102:81 Any ideas what I'm doing wrong? Here is the PHP call to setcookie: setcookie(SITE_RULES[PERM] , YES, time()+2700 , /$path , $URL:$port); $path is the path without the leading / $URL is the url without the port $port is the target port Any help would be really appreciated. -fjr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP and Pay Flow Pro
The php.net site (http://www.php.net/manual/en/ref.pfpro.php) has all the information you'll need to implement Payflow Pro. Check out the User Contributed Notes. __ Mike Krisher Technical Director hyperQUAKE 312 West 4th Street Cincinnati, OH 45202 Tel: 513.563.6555 Cel: 513.254.7821 AOLIM: twopeoplecom ICQ: 83891383 MSN: [EMAIL PROTECTED] Yahoo: mike_krisher -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] variable scope
I have a little chunk of code that checks to see if a variable exists and if not then it sets it. It goes like this: if (empty($page)) { $page = login; } I then end that part of the php script after doing what I need to. Then I start up again on the same html page and I assumed that $page had a value assigned to it because of the above code, but it appears that it doesn't. Is this supposed to happen or is something weird happening. I added that little bit of code to the second chunk of code and it fixed the problem. Is that the right way to do it? Is that variable only available in the ?php ? that it's declared in? Thanks, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Auto POST with redirect?
What I'm trying to do is create a multi-user information gathering system similar to Moreover.com's news gathering system (just much simpler and not as dynamic). A JavaScript auto submits to a remote PHP script. The PHP script grabs the info from the database then generates its own JavaScript to send the raw info back to the originating page. The JavaScript on the originating page parses the returning GET string and writes the database contents to the screen. In tests with strings below 2000 characters it works like a charm. However there may be times when the query will send back VAST amounts of information back to the originating page. So I'd like to find a way to send the information back via the POST method. The PostToHost function by Rasmus will POST data to a remote host but does not redirect the client browser. Perhaps there is a way to modify this function to work more like what happens with the action= attribute when you click the Submit button in a physical form? Any ideas, concepts, theories and hacks will be greatly appreciated. Thanks! -Kevin
Re: [PHP] variable scope
On Tue, 2002-03-12 at 14:38, David Johansen wrote: I have a little chunk of code that checks to see if a variable exists and if not then it sets it. It goes like this: if (empty($page)) { $page = login; } I then end that part of the php script after doing what I need to. Then I start up again on the same html page and I assumed that $page had a value assigned to it because of the above code, but it appears that it doesn't. Is this supposed to happen or is something weird happening. I added that little bit of code to the second chunk of code and it fixed the problem. Is that the right way to do it? Is that variable only available in the ?php ? that it's declared in? Thanks, Dave Shouldn't be. A variable is valid from the point it's declared until it's unset(), or goes out of scope (the function within which it was declared ends), or the script ends. Can you provide a short script which exhibits this behaviour? -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variable scope
Something most have just been wigging out or something because I can't get it to do it again. Maybe I just did something wrong, but it seems to be working now. Thanks for the help though, Dave Lars Torben Wilson [EMAIL PROTECTED] wrote in message 1015973063.2146.82.camel@ali">news:1015973063.2146.82.camel@ali... On Tue, 2002-03-12 at 14:38, David Johansen wrote: I have a little chunk of code that checks to see if a variable exists and if not then it sets it. It goes like this: if (empty($page)) { $page = login; } I then end that part of the php script after doing what I need to. Then I start up again on the same html page and I assumed that $page had a value assigned to it because of the above code, but it appears that it doesn't. Is this supposed to happen or is something weird happening. I added that little bit of code to the second chunk of code and it fixed the problem. Is that the right way to do it? Is that variable only available in the ?php ? that it's declared in? Thanks, Dave Shouldn't be. A variable is valid from the point it's declared until it's unset(), or goes out of scope (the function within which it was declared ends), or the script ends. Can you provide a short script which exhibits this behaviour? -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mixed type
While looking thru php funcions (mixed ora_getcolumn ( int cursor, mixed column) in partucular) I came across type MIXED. What does that mean? There is no such type mentioned in the php docs under TYPES section. thanks. max. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $PHP_SELF in include files
Is there a way that I can use $PHP_SELF in include files, so that the function will use the URL of the php script that calls the include file? Thanks, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Handling!
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I want errors reported on a page when the mail() function for any reason fails to send emails. FOr example, if there is a malformed email address or anything, and the mail is not sent, how can i catch the Error and Display it on the page? Thanks, T. Edison Jr. I don't think that is really posible. The mail() function doesn't actually send the mail; all it does is hands it off to the defined MTA which looks after the sending etc. There have been numerous discussions on the list about how to check a mail address - have a look over those and see if there is something suitable for checking the address before processing it with mail(). Also, I recall there is a header item something like Errors to: in which you can define an address which will receieve error messages from the MTA; you'll need to check the RFCs for the correct definition. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mixed type
On Tue, 2002-03-12 at 14:33, max wrote: While looking thru php funcions (mixed ora_getcolumn ( int cursor, mixed column) in partucular) I came across type MIXED. What does that mean? There is no such type mentioned in the php docs under TYPES section. thanks. max. It simply means that more than one type is valid at that point. In the above example, it means that ora_getcolumn() can return variables of different types. For instance, on failure, it returns FALSE (Boolean); on success, it returns a string or NULL. Hope this helps, Torben -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $PHP_SELF in include files
On Tue, 2002-03-12 at 15:02, David Johansen wrote: Is there a way that I can use $PHP_SELF in include files, so that the function will use the URL of the php script that calls the include file? Thanks, Dave If a.php includes b.php, and you check $PHP_SELF in b.php, it should give you the path to a.php. What result are you getting? -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $PHP_SELF in include files
I'm doing exactly what you said and here's what it says when I call $PHP_SELF in the include file: http://12.254.227.149/brbWarning/b:%20%20Undefined%20variable:%20%20PH P_SELF%20in%20bc:/inetpub/wwwroot/pages.inc/b%20on%20line%20b35/bbr ?page=questions Lars Torben Wilson [EMAIL PROTECTED] wrote in message 1015974570.2134.94.camel@ali">news:1015974570.2134.94.camel@ali... On Tue, 2002-03-12 at 15:02, David Johansen wrote: Is there a way that I can use $PHP_SELF in include files, so that the function will use the URL of the php script that calls the include file? Thanks, Dave If a.php includes b.php, and you check $PHP_SELF in b.php, it should give you the path to a.php. What result are you getting? -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php