|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Thu Mar 22 2001 - 10:38:22 CST
php-general Digest 22 Mar 2001 16:38:22 -0000 Issue 582
Topics (messages 45071 through 45136):
Installing PEAR
45071 by: RalphGzman.aol.com
45081 by: Paul rees
How to delete a row from MySql
45072 by: YoBro
45073 by: Peter Houchin
45086 by: Jeff Armstrong
Re: IBill - Can you recommend a script?
45074 by: Rick St Jean
Web Directory
45075 by: toto
Passthru Question
45076 by: Michael Bartlett
Errors caused by php or apache(or buggy explorer)?
45077 by: Vidar Tyldum
big problem
45078 by: Salim Meethoo
45082 by: Tobias Talltorp
Re: file height and width
45079 by: Kazazic Almir
Re: linking classes together
45080 by: Stewart Taylor
PAM authentification
45083 by: Daniel Svensson, Coretrek
dbm support broken? Please help!
45084 by: AK47
Re: Simple question about mail() limitations (if any :)
45085 by: Greig, Euan
XML Problems
45087 by: Niel Zeeman
Oracle, Win2000, Apache, OCI
45088 by: Greig, Euan
45117 by: Brooks, Ken
Re: Ack! Cookie Problems!
45089 by: Jeff Armstrong
Re: Getting a header without ANY mime type
45090 by: Christian Reiniger
45136 by: Spunk S. Spunk III
Re: trim string - try array/join()
45091 by: Jeff Armstrong
Re: files with html extension
45092 by: Harshdeep S Jawanda
45101 by: Jeff Armstrong
please help with this simple problem
45093 by: adam
45095 by: Stewart Taylor
45100 by: adam
45104 by: rui.websolut.net
45105 by: Stewart Taylor
45106 by: adam
45107 by: adam
Re: Booking by Date/Time in mySQL
45094 by: Jeff Armstrong
multiple selection dropdown lists
45096 by: Angie Bauer
45099 by: Stewart Taylor
Re: URIs as variables
45097 by: Issac Goldstand
45102 by: rui.websolut.net
45103 by: Jeff Armstrong
Re: Lostpassword script Error
45098 by: techzeus.pacific.net.sg
Only 5 lines
45108 by: Dennis Haller
45109 by: Michael Bartlett
45110 by: Michael Bartlett
45112 by: Dennis Haller
Only 5 lines (now with the right script :/ )
45111 by: Dennis Haller
45120 by: Jack Sasportas
45128 by: Dennis Haller
Free Web Space
45113 by: PIS Alaiddin Tayeh
45115 by: Jon Haworth
45123 by: Philip Olson
Re: try catch in php?
45114 by: elias
LDAP problem
45116 by: Kazazic Almir
Oracle ODBC sql [ORA-00972: identifier is too long]
45118 by: Brooks, Ken
45119 by: Greig, Euan
45121 by: Brooks, Ken
45125 by: Brooks, Ken
45127 by: Brooks, Ken
Form help
45122 by: Good Fella
45124 by: Jon Haworth
45126 by: Philip Olson
45130 by: Jon Haworth
45131 by: Rick St Jean
regexp on us tele number
45129 by: Kurth Bemis
Unwanted signs!
45132 by: Brian Rosenkrantz
45133 by: Stewart Taylor
45134 by: Philip Olson
True64 installation
45135 by: John Tran
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Ok, IM a bit confused as to how PEAR is installed. I read through the README file in the php source but found no explanation.
I am tryin to use the PEARs DB abstracion. I have DB.php and DB/ in /usr/local/lib/php. I added: 'include_once(DB/mysql.php);' to the top of my script but it failed since it is not finding it. Do I need to assign a path in the php.ini file or have I missed an installation step?
Can somebody please explain or point me to some docs on how I get up and going with PEAR.
Thanks.
attached mail follows:
In article <11.1177ad96.27ead90b
aol.com>, RalphGzman
aol.com writes
>Ok, IM a bit confused as to how PEAR is installed. I read through the README
>file in the php source but found no explanation.
>
>I am tryin to use the PEARs DB abstracion. I have DB.php and DB/ in
>/usr/local/lib/php. I added: 'include_once(DB/mysql.php);' to the top of my
>script but it failed since it is not finding it. Do I need to assign a path in
>the php.ini file or have I missed an installation step?
>
>Can somebody please explain or point me to some docs on how I get up and going
>with PEAR.
Hi,
Try something like:
<?php
require_once ('DB.php');
// connection
$db_type = "mysql"; // type of database - must correspond to a PEAR type
$db_user = "user"; // database access username
$db_pswd = "password"; // database access password
$db_host = "localhost"; // hostname of database
$db_name = "you_db_name"; // database name
$db_connectString = "$db_type://$db_user:$db_pswd
$db_host/$db_name"; // the above,
collected here for convenience
$usePersistentConnects = true; // true - uses persistent connects to the database
(always leaves a link open, false - not)
if (! $db_con)
$db_con = DB::connect ($db_connectString, $usePersistentConnects);
$sql = "SELECT column FROM $tableName WHERE whatever = '$whatever'";
if (DB::isError ($result = $db_con -> query ($sql)))
handle_db_error ($result);
else
$resultArray = $result -> fetchRow (DB_FETCHMODE_ASSOC);
$db_con -> commit();
if ($db_con && (! $usePersistentConnects))
$db_con -> disconnect();
?>
I hope the line wraps still leave the above readable.
I made a separate function of my own, handle_db_error (), to handle errors - you
might like to do something like:
echo DB::errorMessage($result);
... instead.
I recommend putting all the db connection stuff in a file which resides outside of
the document root and including it where you need it.
The following links may prove useful - the user comments in the phpbuilder article
were particularly helpful in pointing me in the right direction.
http://cvs.php.net/viewcvs.cgi/php4/pear/DB/
http://www.phpdoc.de/pear/index2.html
http://www.phpbuilder.com/columns/allan20010115.php3
http://pear.php.net
http://www.php.net/manual/en/pear.php
All the best,
-- Paul ReesWeb Application Programmer/Developer
surfEU.com GmbH
attached mail follows:
Hello,
Does anybody know how to make a text link delete items from a MySql Database.
I have a PHP page that reads from the database and displays the results, but i want to include an option at then end of each row to delete that information. Alot like in phpMyAdmin. I have looked at that code, but can't figure it out.
Any help on this would be really great.
-- Regards,YoBro ------------------------------------------------------------- DO NOT REPLY TO THIS VIA EMAIL PLEASE USE THE NEWSGROUP All emails sent to this address are automatically deleted. This is to avoid SPAM! -------------------------------------------------------------
attached mail follows:
db connection here
if ($delete){ $rs = "DELETE FROM users WHERE id=$id";
$result = mysql_query($rs);
echo "<font face=\"Helvetica, sans-serif\" size=\"3\" color=\"#003399\">Record Deleted <P> "; }
$id = $myrow["id"]; printf("<a href=\"%s?id=%s&delete=yes\">(DELETE)</a></td></tr>", $PHP_SELF, $myrow["id"]);
-----Original Message-----
From: YoBro [mailto:nospam
brochures.co.nz]
Sent: Thursday, March 22, 2001 3:29 PM
To: php-general
lists.php.net
Subject: [PHP] How to delete a row from MySql
Hello,
Does anybody know how to make a text link delete items from a MySql Database.
I have a PHP page that reads from the database and displays the results, but i want to include an option at then end of each row to delete that information. Alot like in phpMyAdmin. I have looked at that code, but can't figure it out.
Any help on this would be really great.
-- Regards,YoBro ------------------------------------------------------------- DO NOT REPLY TO THIS VIA EMAIL PLEASE USE THE NEWSGROUP All emails sent to this address are automatically deleted. This is to avoid SPAM! -------------------------------------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
curious of Hither Green writes:
> printf("<a href=\"%s?id=%s&delete=yes\">(DELETE)</a></td></tr>", $PHP_SELF, $myrow["id"]);
Is there a reason why you're not using interpolation? This looks simpler to me, and I thought that a lot of effort went into optimising PHP interpolation.
echo "<A HREF='$PHP_SELF?id=$myrow[id]&delete=yes'>Delete $myrow[id]</A>";
cheers, Jeff
-----Original Message-----
From: Peter Houchin [mailto:peterh
vfsa.com.au]
Sent: Thursday, March 22, 2001 4:38 AM
To: YoBro; php-general
lists.php.net
Subject: RE: [PHP] How to delete a row from MySql
db connection here
if ($delete){ $rs = "DELETE FROM users WHERE id=$id";
$result = mysql_query($rs);
echo "<font face=\"Helvetica, sans-serif\" size=\"3\" color=\"#003399\">Record Deleted <P> "; }
$id = $myrow["id"]; printf("<a href=\"%s?id=%s&delete=yes\">(DELETE)</a></td></tr>", $PHP_SELF, $myrow["id"]);
-----Original Message-----
From: YoBro [mailto:nospam
brochures.co.nz]
Sent: Thursday, March 22, 2001 3:29 PM
To: php-general
lists.php.net
Subject: [PHP] How to delete a row from MySql
Hello,
Does anybody know how to make a text link delete items from a MySql Database.
I have a PHP page that reads from the database and displays the results, but i want to include an option at then end of each row to delete that information. Alot like in phpMyAdmin. I have looked at that code, but can't figure it out.
Any help on this would be really great.
-- Regards,YoBro ------------------------------------------------------------- DO NOT REPLY TO THIS VIA EMAIL PLEASE USE THE NEWSGROUP All emails sent to this address are automatically deleted. This is to avoid SPAM! -------------------------------------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
We have dealt a lot with iBill. They are great. The best interface to them that I know of is the opayc solution from Inline. The advantage is you will be able to do charge backs and the solution can be ported to any platform. php, CF, vb. Also opayc will handle the updates to the api, if it changes. You just download the new dll.
At 07:17 PM 3/21/01 -0800, you wrote:
>I have a client who wants to set up iBill. Has anyone had any good
>experiences with any of the commercially avaliable or open source iBill
>administration scripts out there? Good Bad or Otherwise, please let me know.
>
>Many thanks for any light you can shed on this topic.
>
>Matt Friedman
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
Hi all,
can some body tell me where can i find articles and technical support about develop web directory ?
thanx.
-toto-
attached mail follows:
Hi all,
Having a weird problem running the passthru() function on quite an old version of PHP3 (3.0.7). Pasted below is the php source code:
=============================== <HTML> <HEAD> <TITLE>Tape Status Check</TITLE> </HEAD> <BODY> if this page is blank - that is good!
<?
passthru ('/usr/bin/mt rewind',$res); echo $res; ?> ===============================
When I run this in a shell (as the apache user as well!) it works perfectly as illustrated below:
=============================== su-2.03$ /usr/local/bin/php index.php3 Content-type: text/html
<HTML> <HEAD> <TITLE>Tape Status Check</TITLE> </HEAD> <BODY> if this page is blank - that is good!
mt: /dev/nrsa0: Device not configured ===============================
When I run this in apache by accessing the URL, I get (pasted HTML from view-source):
=============================== <HTML> <HEAD> <TITLE>Tape Status Check</TITLE> </HEAD> <BODY> if this page is blank - that is good!
1 ===============================
As you can see, its not outputting the passthru output stuff. Any ideas?
Mike
attached mail follows:
I'm having some trouble with apache+php4. Sometimes when i access my very simple php-site, not everything gets parsed, some things just get printed..
For instance, my tables sometimes gets freaked an IE shows me the tags [<table bla bla bla]. I rarely experience this elsewhere on the web, so i kinda doubt it is IE's fault.
Could it be apache or php? If so, how can I correct this problem? Using Apache 1.3.17 and PHP/4.04.pl1.
Thanks, Vidar Tyldum
attached mail follows:
hello there, can somebody help me out with my scripts while running this: <? .................................. $myfile = fopen("data.txt","w"); .........................................etc; ?> i get the following error message: Warning: fopen("compteur","w") - Permission denied in cmguestcount.inc.php3 on line 11 i'm using php3 and this scripts are for a counter of my page . thanks Salim
attached mail follows:
You need to set the permissions in that folder so that you can write. PHP acts like IUSR(computernmae), so set IUSR(computername) permission to write. This is Windows, by the way...
// Tobias
""Salim Meethoo"" <salim
alienworkers.com> wrote in message
news:99c90k$83u$1
toye.p.sourceforge.net...
> hello there,
> can somebody help me out with my scripts while running this:
> <?
> ..................................
> $myfile = fopen("data.txt","w");
> .........................................etc;
> ?>
> i get the following error message:
> Warning: fopen("compteur","w") - Permission denied in
cmguestcount.inc.php3
> on line 11
> i'm using php3 and this scripts are for a counter of my page .
> thanks
> Salim
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
if it is about logos and stuff that may be changed put it simply in a include and include it from all over or make a function and call it -almir
-----Ursprüngliche Nachricht-----
Von: darion mapp [mailto:godd_mapp
lycos.com]
Gesendet: Mittwoch, 21. März 2001 23:05
An: almir
Betreff: Re: [PHP] file height and width
I think that the DB approach is not bad at all. It allows you to format your page quite easily and create different formatting for different sections of your site with great ease.
How ever where the work comes is in the geration of the page. You will have to echo the height and width to ensure that it is done. The name if the image can also be done that way. This allows you to maintain things like a company logo file with ease.
pluse adding a new page becomes easier once you take a modular approah to it.
suggestion:
<img src="<?php echo "$imglocation" ?>" height="<?php echo "$height" ?>" ......
now that SHOULD work provided that you get the data from the DB and place them in their variables as needed.
you can even use arrays to hold all that data and echo what is needed by using a dumy variable to hold the index that you would like to echo.
Any problems you can contact me
--On Wed, 21 Mar 2001 22:57:24 almir wrote: >1) why put it into db , i dont think it is good idea to do it, put it in >file sytem , check it with image funrtions and than do what you want to or >even easier use stiles to format it with html so that it doesn4t metter how >big file actualy is > >-almir > > >""george"" <chiefmonkey
wisemonkeydesign.co.uk> schrieb im Newsbeitrag >news:99akou$rsc$1
toye.p.sourceforge.net... >> >> Chris, >> >> It's going straigt into a db and is then pulled out and >> displayed on the page. I want the image to be a specific size. >> >> Thanks >> >> george >> >> >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net >> For additional commands, e-mail: php-general-help
lists.php.net >> To contact the list administrators, e-mail: php-list-admin
lists.php.net >> > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net >For additional commands, e-mail: php-general-help
lists.php.net >To contact the list administrators, e-mail: php-list-admin
lists.php.net > >
Get 250 color business cards for FREE! at Lycos Mail http://mail.lycos.com/freemail/vistaprint_index.html
attached mail follows:
Your need to define $db as a property of your sessions class. e.g.
class sessions { var $db; function sessions { $this->db = new mysql_connect; }
function testprint() { $this->db->connect() } } $sess = new sessions; $sess-> testprint();
-----Original Message-----
From: Tobias Talltorp [mailto:tobias
talltorp.com]
Sent: 21 March 2001 22:38
To: php-general
lists.php.net
Subject: [PHP] linking classes together
I have two classes, one with mysql-connections and one with session-stuff. The session-class relies on the mysql to check if the user is registered and such.
What is the proper way to connect/link these classes together?
I got it working if I created a $db = new mysql_connect; in the function, but there are other functions that need to be able to connect to a database aswell. Putting the $db = new mysql_connect; in the constructor did not work. (See code below)
// This works ---> class sessions
function testprint() { $db = new mysql_connect; $db-> connect() } } $sess = new sessions; $sess-> testprint();
// This does not work --> class sessions { function sessions { $db = new mysql_connect; }
function testprint() { $db-> connect() } } $sess = new sessions; $sess-> testprint();
Any thoughts? // Tobias
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi there!
I wonder if there is someone out there who can help me out with some advices regarding authentification with PAM (Pluggable Authentication Modules) using PHP.
The main reason for using PAM is that I want to connect to Novell NDS/eDirectory to get info about a user based on a supplied username and password. This info will then be presented to the user on a web page when they are logged in.
We are currently running freeBSD on our webservers, but may consider to set up a machine with Linux if necessary.
So, if any of you people could help me out here, that would be really appreciated!
/Daniel
attached mail follows:
I'm trying to build php 4.0.4pl1 with dbm support on my RedHat Linux 6.2 box. I need it to be able to work with apache 1.3.14 mod_auth_dbm. Each time I run:
./configure \ --with-zlib=shared \ --with-xml=shared \ --with-gd=shared \ --with-interbase=shared \ --with-db \ --enable-dba=shared \ --with-dbm \ --with-gdbm \ --with-ndbm \ --with-db2 \ --with-imap=shared \ --with-openssl=/usr \ --with-config-file-path=/etc/httpd/conf \ --enable-versioning \ --with-apxs=/usr/sbin/apxs \ --enable-memory-limit \ --enable-trans-sid \ --enable-sysvsem \ --enable-sysvshm \ --enable-gd-imgstrttf \ --enable-track-vars
I get the following error:
configure: error: cannot find necessary header file(s)
If I remove the line "--with-dbm" everything works fine. What should I do or what should I need to build dbm support into php?
I need "dbm", since looks like other formats are not compatible with mod_auth_dbm (and ... Yes, dbmmanage works fine).
Thanks
P.S.
I've also tried with php-4.0.5RC1 but the result was still the same.
attached mail follows:
< on IIS it is much better solution for more than few mails is to put them < simply in pickup directory of smtp server, I am also sure that there is a < similar possibility on linux
How can I identify the location of the pickup directory for the smtp server (on NT)?
Euan Greig
Technical Consultant
BRANN DATA
euan.greig
brann.com
01285 645997
************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
**************************************************************************
attached mail follows:
Hi Folks Has anyone had problems with thej xml parser causing an Internal server error?
I'm running IIS5 with the ISAPI module
Thnx
attached mail follows:
< I have seen -many- messages and spent an entire day reading, and haven't < found < what I'm looking for so i hope this is the correct place to ask.
< When I try to make an ora_logon or ocilogon, I get < the error: Fatal error: Call to undefined function: ora_logon()
< Is this an incorrect PHP setup or is this due to the fact that I don't have < Oracle 8.1.6 installed? < (I have 7.x)
< I have uncommented the php_oracle and php_oci8.dll lines in the php.ini < file. Do I need to do more than that? < (I am using the latest php4 windows binary).
I too have had a lot of "fun" with this. I seem to have finally got it cracked, with help from this list, and from searches on the web.
First, have you checked the setting of your extension directory in php.ini? It should point to the location of php_oracle.dll etc.
I think there is something about the distribution of php from php.net that doesn't enable oracle properly. Try downloading it from http://php.weblogs.com/easywindows.
The following post (from this list) may help with your next problem! ie Net80/SqlNet. It also helps to install at least the client software for Oracle 8.1.6. I have successfully connected to a 7.3.4 database using ora_logon, but haven't tried ocilogon, as I think this is intended for v8.
From: Leon Santos Filho [mailto:leon
rosch.com.br]
Sent: 13 March 2001 16:15
To: Herbert Groot Jebbink; php-windows
lists.php.net
Subject: Re: [PHP-WIN] Can't connect to Oracle
Hi! I get this code here and it works very well. It was a Jean-Christophe suggestion. You can obtain TNS string from file TNSNAMES.ORA. Good Luck!
Leon
<?php putenv("ORACLE_SID=badm"); putenv("ORACLE_HOME=D:\ORANT"); $tns = "(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = bhz_oracle_1)(PORT = 1521))) (CONNECT_DATA = (SID = badm) ) )"; $connect=OCIPLogon("user","password",$tns) or die("It's not possible to connect"); $sql = "select * from CentrosCusto";
$result = OCIParse($connect,$sql); OCIExecute($result) or die("It's not possible to query");
echo("<TABLE>"); while(OCIFetch($result)) { $CC = OCIResult($result,1); $CCNome = OCIResult($result,2); echo('<TR><TD>' . $CC . '</TD><TD>' . $CCNome . '</TD></TR>'); } echo("</TABLE>");
Euan Greig
Technical Consultant
BRANN DATA
euan.greig
brann.com
01285 645997
************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
**************************************************************************
attached mail follows:
Thanks guys. I'm going to try and tackle this later today. I was soooo happy just to get ODBC and oracle working yesterday.
I had to install the oracle 8.1.6 client. Then i rolled back to php3.
Works fine.
I'm going to try the OCI stuff later, i'll letcha know.
-ken
-----Original Message-----
From: Greig, Euan [mailto:Euan.Greig
brann.com]
Sent: Thursday, March 22, 2001 5:37 AM
To: php-general
lists.php.net
Subject: [PHP] Oracle, Win2000, Apache, OCI
< I have seen -many- messages and spent an entire day reading, and haven't < found < what I'm looking for so i hope this is the correct place to ask.
< When I try to make an ora_logon or ocilogon, I get < the error: Fatal error: Call to undefined function: ora_logon()
< Is this an incorrect PHP setup or is this due to the fact that I don't have < Oracle 8.1.6 installed? < (I have 7.x)
< I have uncommented the php_oracle and php_oci8.dll lines in the php.ini < file. Do I need to do more than that? < (I am using the latest php4 windows binary).
I too have had a lot of "fun" with this. I seem to have finally got it cracked, with help from this list, and from searches on the web.
First, have you checked the setting of your extension directory in php.ini? It should point to the location of php_oracle.dll etc.
I think there is something about the distribution of php from php.net that doesn't enable oracle properly. Try downloading it from http://php.weblogs.com/easywindows.
The following post (from this list) may help with your next problem! ie Net80/SqlNet. It also helps to install at least the client software for Oracle 8.1.6. I have successfully connected to a 7.3.4 database using ora_logon, but haven't tried ocilogon, as I think this is intended for v8.
From: Leon Santos Filho [mailto:leon
rosch.com.br]
Sent: 13 March 2001 16:15
To: Herbert Groot Jebbink; php-windows
lists.php.net
Subject: Re: [PHP-WIN] Can't connect to Oracle
Hi! I get this code here and it works very well. It was a Jean-Christophe suggestion. You can obtain TNS string from file TNSNAMES.ORA. Good Luck!
Leon
<?php putenv("ORACLE_SID=badm"); putenv("ORACLE_HOME=D:\ORANT"); $tns = "(DESCRIPTION = (ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = bhz_oracle_1)(PORT = 1521))) (CONNECT_DATA = (SID = badm) ) )"; $connect=OCIPLogon("user","password",$tns) or die("It's not possible to connect"); $sql = "select * from CentrosCusto";
$result = OCIParse($connect,$sql); OCIExecute($result) or die("It's not possible to query");
echo("<TABLE>"); while(OCIFetch($result)) { $CC = OCIResult($result,1); $CCNome = OCIResult($result,2); echo('<TR><TD>' . $CC . '</TD><TD>' . $CCNome . '</TD></TR>'); } echo("</TABLE>");
Euan Greig
Technical Consultant
BRANN DATA
euan.greig
brann.com
01285 645997
************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
**************************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Why not just set the session start time in a session variable and then test against that? Something like:
session_start(); # This array contains all the session items if (!isset($sesh)) { $sesh = array(); session_register('sesh'); $sesh[start] = time(); }
if ( $PHP_SELF == '/login') { if (login_ok()) { $sesh[start] = time(); } } elseif ( time()-$sesh[start] > 60 ) { headers("Location: /login"); exit; }
-----Original Message-----
From: Michael Champagne [mailto:mchampagne
capis.com]
Sent: Thursday, March 22, 2001 1:25 AM
To: PHP General Mailing List
Subject: [PHP] Ack! Cookie Problems!
Ok, I'm going through a cookie nightmare. I'm trying to create a session and then cut the user off from the session by setting the expiration of the cookie that I send out using session_set_cookie_params(). Here's my code:
/* Start session and unset any previous session variables */ session_start(); session_unset(); session_set_cookie_params(time() + $cookie_expire * 60); // Parameter is in seconds
The cookie never expires though! I set $cookie_expire to 1 (should expire in one minute) and I can keep right on accessing pages. BTW, all the pages do a session_start and check for a variable at the beginning and redirect to the login page if the var is not found. Does anyone know what's up with this? Thanks for your help in advance.
-- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: mchampagnecapis.com hm: mchamp
texas.net
****************************************************************** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ******************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Thursday 22 March 2001 02:32, you wrote: > I've got a situation where I'm interested in returning a header without > ANY mime type specified. It looks like the default Mime type is set by > the server (plain text)? Or at least when I don't specify the type
It's set by PHP (text/html)
> that's what my server is returning. I'd also like to ensure that there > is no content length returned. Is this possible?
So you want to give the browser something and make really sure that it has no chance of interpreting it correctly? Perhaps I miss something, but unless your visitors are masochists with too much time on their hands that's a sure way to lose them really quickly.
-- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/)...to paraphrase Churchill, while representative democracy may be terrible, it's still the best system that large corporations can buy.
- David Weinberger JOHO January 25, 2000
attached mail follows:
This would be part of a test tool I'd like to create in order to test conditions of an application. I want to send a request and ensure that the response has no set type or known length if possible (eg return some media that is undefined and see how the app handles the response).
Anyone?
Spunk
> > On Thursday 22 March 2001 02:32, you wrote: >> I've got a situation where I'm interested in returning a header without >> ANY mime type specified. It looks like the default Mime type is set by >> the server (plain text)? Or at least when I don't specify the type > > It's set by PHP (text/html) > >> that's what my server is returning. I'd also like to ensure that there >> is no content length returned. Is this possible? > > So you want to give the browser something and make really sure that it > has no chance of interpreting it correctly? Perhaps I miss something, but > unless your visitors are masochists with too much time on their hands > that's a sure way to lose them really quickly.
attached mail follows:
You have a hidden issue with the extra trailing comma. When I want a list of things, I prefer this approach:
$db = mysql_select_db("tkenet_db"); $query = "SELECT app_name,status FROM approval_list where doc_no='6'"; $result = mysql_query($query,$db);
$ccs=array(); while( $data = mysql_fetch_row($result) ){ $ccs[] = trim($h->get_email($data[0])); } $cc = join(",",$ccs);
It seems happy with large arrays (10,000s).
Regards Jeff
-----Original Message-----
From: Mark Maggelet [mailto:maggelet
mminternet.com]
Sent: Thursday, March 22, 2001 12:20 AM
To: wnleong
mail.tke.po.my; php-general
lists.php.net
Subject: Re: [PHP] trim string
On Wed, 21 Mar 2001 18:09:47 +0800, Wen Ni Leong
(wnleong
mail.tke.po.my) wrote:
>I need help in this basic string function.
>I query from the database by using while loop and the result in in
>array. I separated them by using "," .
>
>I want at the end of the string to be trim off. Unfortunately I
>tried
>all the string function such as chop,trim and substr but they seem
>like
>can't manage to trim the end of the string. Please help me.
>
>my coding are:
>
>$db = mysql_select_db("tkenet_db");
>$query = "SELECT app_name,status FROM approval_list where
>doc_no='6'";
>$result = mysql_query($query,$db);
>while($data = mysql_fetch_row($result)){
>
> $cc .= $h->get_email($data[0]).",";
>
> if ($data[1] != 'Y')
> { $all_yes = 1;}
> }
> trim($cc);
^^^^^^^^^^^^
this doesn't do anything to $cc, you have to catch the return value: $cc=trim($cc);
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Jeff Armstrong wrote:
> This is exactly why http://www.w3.org recommend that you DONT > SPECIFY A FILE TYPE TYPE in your HREFs.
But doth that actually work - how many web servers are able to handle this type of link correctly?
Ummm... and what happens (or is supposed to happen) to resolve xxx.html and xxx.php?
-- Regards, Harshdeep Singh Jawanda.
attached mail follows:
Yes it works in Apache - try it! You could also read the Apache documentation on Content Negotiation. The following is a quote --------------------------------------------------------- Note on hyperlinks and naming conventions If you are using language negotiation you can choose between different naming conventions, because files can have more than one extension...
<snip>
Looking at the table above you will notice that it is always possible to use the name without any extensions in an hyperlink (e.g., foo). The advantage is that you can hide the actual type of a document rsp. file and can change it later, e.g., from html to shtml or cgi without changing any hyperlink references. ---------------------------------------------------------
On how it resolves conflicts? Not documented, but a quick fiddle seems to indicate that it does the following:
if (no_specific_type_requested()) { get list of possible files in ALPHABETICAL order if (file_is_recognised_mime_type()) return this file
recognised mime types come from /etc/mime.types
Regards Jeff
-----Original Message-----
From: Harshdeep S Jawanda [mailto:harsh
pspl.co.in]
Sent: Thursday, March 22, 2001 11:06 AM
To: Jeff Armstrong
Cc: php-general
lists.php.net
Subject: Re: [PHP] files with html extension
Jeff Armstrong wrote:
> This is exactly why http://www.w3.org recommend that you DONT > SPECIFY A FILE TYPE TYPE in your HREFs.
But doth that actually work - how many web servers are able to handle this type of link correctly?
Ummm... and what happens (or is supposed to happen) to resolve xxx.html and xxx.php?
-- Regards, Harshdeep Singh Jawanda.-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
i am coding a simple script to post a text area into a file. it works, but it posts it at the bottom and i wanted to have it post to the top of the text already there..
here's a snip of the important part of the script:
$fp = fopen (basename($PHP_SELF) . ".comment", "a"); fwrite ($fp, $message); fclose ($fp); }
any help would be much appreciated
attached mail follows:
You need to copy the contents of the current file. Then recreate the file by writing the new message then writing back the original contents.
e.g. $fname = basename($PHP_SELF). ".comment"; $fsize = filesize($fname); fp = fopen(basename($fname)); $data = fread($fp,fsize); fwrite($fp,$message); fwrite($fp,$data); fclose($fp);
-Stewart
-----Original Message-----
From: adam [mailto:adam
wangallery.com]
Sent: 22 March 2001 11:17
To: php-general
lists.php.net
Subject: [PHP] please help with this simple problem
i am coding a simple script to post a text area into a file. it works, but it posts it at the bottom and i wanted to have it post to the top of the text already there..
here's a snip of the important part of the script:
$fp = fopen (basename($PHP_SELF) . ".comment", "a"); fwrite ($fp, $message); fclose ($fp); }
any help would be much appreciated
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
i tryed it and it ended up having an error that was caused originally by a lack of a $ on the 3rd line variable... after i fixed that it said wrong perameter count for fopen() on the third line, and "Warning: Supplied argument is not a valid File-Handle resource" for the remaining lines below that in that block of code.
i'm sorry, i'm kinda new to this : (
"Stewart Taylor" <Stewart.Taylor
uk.thalesgroup.com> wrote in message
news:C1E948D3E464D2118B3E00A0C977F522019222EC
ntsl5004.int.rdel.co.uk...
> You need to copy the contents of the current file.
> Then recreate the file by writing the new message then writing back the
> original contents.
>
> e.g.
> $fname = basename($PHP_SELF). ".comment";
> $fsize = filesize($fname);
> fp = fopen(basename($fname));
> $data = fread($fp,fsize);
> fwrite($fp,$message);
> fwrite($fp,$data);
> fclose($fp);
>
> -Stewart
>
> -----Original Message-----
> From: adam [mailto:adam
wangallery.com]
> Sent: 22 March 2001 11:17
> To: php-general
lists.php.net
> Subject: [PHP] please help with this simple problem
>
>
> i am coding a simple script to post a text area into a file. it works, but
> it posts it at the bottom and i wanted to have it post to the top of the
> text already there..
>
> here's a snip of the important part of the script:
>
> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
> fwrite ($fp, $message);
> fclose ($fp);
> }
>
> any help would be much appreciated
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
you haven't specified the open type (a = append, w = write, r = read only , etc etc)
solution
$fp=fopen(basename($fname), "a");
just to match your example.
On 22-Mar-2001 adam wrote:
> i tryed it and it ended up having an error that was caused originally by a
> lack of a $ on the 3rd line variable... after i fixed that it said wrong
> perameter count for fopen() on the third line, and "Warning: Supplied
> argument is not a valid File-Handle resource" for the remaining lines below
> that in that block of code.
>
> i'm sorry, i'm kinda new to this : (
>
> "Stewart Taylor" <Stewart.Taylor
uk.thalesgroup.com> wrote in message
> news:C1E948D3E464D2118B3E00A0C977F522019222EC
ntsl5004.int.rdel.co.uk...
>> You need to copy the contents of the current file.
>> Then recreate the file by writing the new message then writing back the
>> original contents.
>>
>> e.g.
>> $fname = basename($PHP_SELF). ".comment";
>> $fsize = filesize($fname);
>> fp = fopen(basename($fname));
>> $data = fread($fp,fsize);
>> fwrite($fp,$message);
>> fwrite($fp,$data);
>> fclose($fp);
>>
>> -Stewart
>>
>> -----Original Message-----
>> From: adam [mailto:adam
wangallery.com]
>> Sent: 22 March 2001 11:17
>> To: php-general
lists.php.net
>> Subject: [PHP] please help with this simple problem
>>
>>
>> i am coding a simple script to post a text area into a file. it works, but
>> it posts it at the bottom and i wanted to have it post to the top of the
>> text already there..
>>
>> here's a snip of the important part of the script:
>>
>> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
>> fwrite ($fp, $message);
>> fclose ($fp);
>> }
>>
>> any help would be much appreciated
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> For additional commands, e-mail: php-general-help
lists.php.net
>> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> For additional commands, e-mail: php-general-help
lists.php.net
>> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
Rui Barreiros Software Developer
WEBSOLUT - Soluções Internet
Emailto: rui
websolut.net
Personal Info: http://websolut.net/people/rui.html
As informações contidas neste email são confidenciais e destinam-se apenas à(s) pessoa(s) a quem foi enviado: http://websolut.net/confidencialidade-responsabilidade.html
attached mail follows:
Sorry I missed "w+" from the fopen function
$fname = basename($PHP_SELF). ".comment"; $fsize = filesize($fname); $fp = fopen(basename($fname),"w+"); <--- added "w+" $data = fread($fp,$fsize); fwrite($fp,$message); fwrite($fp,$data); fclose($fp)
-Stewart
-----Original Message-----
From: adam [mailto:vawan
home.com]
Sent: 22 March 2001 12:00
To: php-general
lists.php.net
Subject: Re: [PHP] please help with this simple problem
i tryed it and it ended up having an error that was caused originally by a lack of a $ on the 3rd line variable... after i fixed that it said wrong perameter count for fopen() on the third line, and "Warning: Supplied argument is not a valid File-Handle resource" for the remaining lines below that in that block of code.
i'm sorry, i'm kinda new to this : (
"Stewart Taylor" <Stewart.Taylor
uk.thalesgroup.com> wrote in message
news:C1E948D3E464D2118B3E00A0C977F522019222EC
ntsl5004.int.rdel.co.uk...
> You need to copy the contents of the current file.
> Then recreate the file by writing the new message then writing back the
> original contents.
>
> e.g.
> $fname = basename($PHP_SELF). ".comment";
> $fsize = filesize($fname);
> fp = fopen(basename($fname));
> $data = fread($fp,fsize);
> fwrite($fp,$message);
> fwrite($fp,$data);
> fclose($fp);
>
> -Stewart
>
> -----Original Message-----
> From: adam [mailto:adam
wangallery.com]
> Sent: 22 March 2001 11:17
> To: php-general
lists.php.net
> Subject: [PHP] please help with this simple problem
>
>
> i am coding a simple script to post a text area into a file. it works, but
> it posts it at the bottom and i wanted to have it post to the top of the
> text already there..
>
> here's a snip of the important part of the script:
>
> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
> fwrite ($fp, $message);
> fclose ($fp);
> }
>
> any help would be much appreciated
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
it works now, only it's earasing everything and then writing to the file. i think we have almost got this figured out. here's what the code looks like for the entire tag... -----------------------------------
<? if ($message) { /* uncomment the next two lines to strip out html from input */ $name = strip_tags($name); /* $message = strip_tags($message); */ $message = ereg_replace("\r\n\r\n", "\n<P>", $message); $date = date("l, F j Y, h:i a"); $message = "<font size=2 face=verdana><b><a href=mailto:$email>$name</a> </b><font size=1> -- $date</font>\n <blockquote>\n $message\n </blockquote></font>\n<hr noshade color=white size=1 width=100%>\n";
$fname = basename($PHP_SELF) . ".comment"; $fsize = filesize($fname); $fp = fopen(basename($fname),"w+"); $data = fread($fp,$fsize); fwrite($fp,$message); fwrite($fp,$data); fclose($fp);
}
readfile(basename(($PHP_SELF . ".comment")));
?>
--------------------
""adam"" <adam
wangallery.com> wrote in message
news:99cmfj$mai$1
toye.p.sourceforge.net...
> i am coding a simple script to post a text area into a file. it works, but
> it posts it at the bottom and i wanted to have it post to the top of the
> text already there..
>
> here's a snip of the important part of the script:
>
> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
> fwrite ($fp, $message);
> fclose ($fp);
> }
>
> any help would be much appreciated
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
it works now, only it's earasing everything and then writing to the file. i think we have almost got this figured out. here's what the code looks like for the entire tag... -----------------------------------
<? if ($message) { /* uncomment the next two lines to strip out html from input */ $name = strip_tags($name); /* $message = strip_tags($message); */ $message = ereg_replace("\r\n\r\n", "\n<P>", $message); $date = date("l, F j Y, h:i a"); $message = "<font size=2 face=verdana><b><a href=mailto:$email>$name</a> </b><font size=1> -- $date</font>\n <blockquote>\n $message\n </blockquote></font>\n<hr noshade color=white size=1 width=100%>\n";
$fname = basename($PHP_SELF) . ".comment"; $fsize = filesize($fname); $fp = fopen(basename($fname),"w+"); $data = fread($fp,$fsize); fwrite($fp,$message); fwrite($fp,$data); fclose($fp);
}
readfile(basename(($PHP_SELF . ".comment")));
?>
--------------------
attached mail follows:
Jon, not sure if I agree with you: locking - almost always a bad idea, atomicity is much faster and safer and usually indicates a better relational design. SQL is fundamentally set oriented, but newbies are almost always row oriented. mySQL locks table automagically, but it doesn't do row level locking, and transactions are only recently added.
generate ids - let the db do this with ids. Almost all the number fountains I have seen are because of the inability of a 3GL to recieve the generated id efficiently, this is not a problem in mySQL. I do agree with you though if you are refering to having a decent relational data model
Jeffs DB Maxims: In my db experience OS [DOS/WIN32/Unix/Mini/Mainframe] Type [relational/post-relational/object/network/hierarchical]
* NEVER write SQL that requires programatic locking * minimise use of transactions [redesign! think lateral] * use sql atomicity whenever possible * don't be a pessimistic locker - optimism is so much more user friendly. * apply the twelve of codd with intelligence rather than obsession * all updates should be safely repeatable * 3NF is generally cool, but 14NF is overboard.
[soapbox.off]
Kiora
-----Original Message-----
From: Jon Snell [mailto:jsnell
networkninja.com]
Sent: Wednesday, March 21, 2001 10:54 PM
To: Thomas Edison Jr.
Cc: php-general
lists.php.net
Subject: RE: SV: [PHP] Booking by Date/Time in mySQL
Yes, I would recommend locking your tables before doing this just in case. Another solution would be to create a unique-key based on the bed field and date field. This way you are guaranteed never to double book, and can just check for errors after insert rather than do an additional select statement and worry about race conditions...
attached mail follows:
Clear DayHi
we've got a dropdown list from a select statement, after you choose an option from there it creates another dropdown list also from a select statement. We want to know how to be able to select multiple values from the 2nd one and send them through to the next page for display.
Below are the two dropdown lists we have.
--------------------------------------------------------------------------------
<select name="comboMAPType" size="1"> <? while ($GetMAPTypeRow = ibase_fetch_row($GetMAPType_Result)) {//begin if ($GetMAPTypeRow[0] == $schemenumber) {//begin $SetInitial = "selected"; }//end else {//begin $SetInitial = ""; }//end ?> <option value="<? echo $GetMAPTypeRow[0]?>" <?echo $SetInitial?> > <? echo $GetMAPTypeRow[1]?> </option> <?}?> </select> <input type="submit" action="default.asp?step=3-rate" value="Continue!" method="post" name="btnContinueQuote"> </h4> </td> </tr> <tr valign="middle"> <td width="46%" height="6"> <? if ($btnContinueQuote) {//begin ?> <? }//end ?> <font size="2" color="#000099" face="Arial, Helvetica, sans-serif">LIST OF MEDICAL AID SCHEMES FROM SEARCH:</font> </td> <td width="54%" height="6"> <select name="comboResultPlan1" multiple size="3"> <? while ($GetSelectedTypeRow = ibase_fetch_row($GetSelectedType_Result)) {//begin $SelectedQuotationSchemeName = $GetSelectedTypeRow[1]; if ($GetSelectedTypeRow[0] == $schemenumberSelected) {//begin $SetInitial = "selected"; }//end else {//begin $SetInitial = ""; }//end ?> <option value="<? echo $GetSelectedTypeRow[0]?>" <?echo $SetInitial?> > <? echo $GetSelectedTypeRow[1]?> </option> <?}?> </select> <select name="comboResultPlan" multiple size="3"> <? while ($GetSelectedTypeRow = ibase_fetch_row($GetSelectedType_Result)) {//begin $SelectedQuotationSchemeName = $GetSelectedTypeRow[1]; if ($GetSelectedTypeRow[0] == $schemenumberSelected) {//begin $SetInitial = "selected"; }//end else {//begin $SetInitial = ""; }//end ?> <option value="<? echo $GetSelectedTypeRow[0]?>" <?echo $SetInitial?> > <? echo $GetSelectedTypeRow[1]?> </option> <?}?> </select>
--------------------------------------------------------------------------------
attached mail follows:
You need to add '[]' to the selects name which informs php that the select field will have more than one value. Once your form has been submitted an array called $comboResultPlan will be available containing the selected options. -Stewart <select name="multi[]" size="5" multiple>
-----Original Message-----
From: Angie Bauer [mailto:ABauer
btech.co.za]
Sent: 22 March 2001 11:31
To: php-general
lists.php.net
Subject: [PHP] multiple selection dropdown lists
Hi we've got a dropdown list from a select statement, after you choose an option from there it creates another dropdown list also from a select statement. We want to know how to be able to select multiple values from the 2nd one and send them through to the next page for display. Below are the two dropdown lists we have. _____
<select name="comboMAPType" size="1"> <? while ($GetMAPTypeRow ibase_fetch_row($GetMAPType_Result)) {//begin if ($GetMAPTypeRow[0] = $schemenumber) {//begin $SetInitial = "selected"; }//end else {//begin $SetInitial = ""; }//end ?> <option value="<? echo $GetMAPTypeRow[0]?>" <?echo $SetInitial?> > <? echo $GetMAPTypeRow[1]?> </option> <?}?> </select> <input type="submit" action="default.asp?steprate" value="Continue!" method="post" name="btnContinueQuote"> </h4> </td> </tr> <tr valign="middle"> <td width="46%" height="6"> <? if ($btnContinueQuote) {//begin ?> <? }//end ?> <font size="2" color="#000099" face="Arial, Helvetica, sans-serif">LIST OF MEDICAL AID SCHEMES FROM SEARCH:</font> </td> <td width="54%" height="6"> <select name="comboResultPlan1" multiple size="3"> <? while ($GetSelectedTypeRow ibase_fetch_row($GetSelectedType_Result)) {//begin $SelectedQuotationSchemeName = $GetSelectedTypeRow[1]; if ($GetSelectedTypeRow[0] = $schemenumberSelected) {//begin $SetInitial = "selected"; }//end else {//begin $SetInitial = ""; }//end ?> <option value="<? echo $GetSelectedTypeRow[0]?>" <?echo $SetInitial?> > <? echo $GetSelectedTypeRow[1]?> </option> <?}?> </select> <select name="comboResultPlan" multiple size="3"> <? while ($GetSelectedTypeRow ibase_fetch_row($GetSelectedType_Result)) {//begin $SelectedQuotationSchemeName = $GetSelectedTypeRow[1]; if ($GetSelectedTypeRow[0] = $schemenumberSelected) {//begin $SetInitial = "selected"; }//end else {//begin $SetInitial = ""; }//end ?> <option value="<? echo $GetSelectedTypeRow[0]?>" <?echo $SetInitial?> > <? echo $GetSelectedTypeRow[1]?> </option> <?}?> </select> _____
attached mail follows:
Nope. That gave me:
<INPUT TYPE="HIDDEN" NAME="url" VALUE="script2.php?var1=a&b">
I'd need to enumerate $HTTP_GET_VARS variable _keys_ too, but I don't know how... Also, how can I get it to work for both GET & POST methods? Is that possible?
Thanks, Issac
""almir"" <a.kazazic
medienhaus.co.at> wrote in message
news:99b66u$q0o$1
toye.p.sourceforge.net...
> try with
>
> uri=<? echo implode("&", $HTTP_GET_VARS);?>
>
>
> ""Issac Goldstand"" <neoi
writeme.com> schrieb im Newsbeitrag
> news:99at42$5be$1
toye.p.sourceforge.net...
> > Newbie question here. I am trying to pass a varaible containing a URI
> > across a few scripts. Basically, the first script get's a query string
> > including the URI (eg
> > http://foo.bar/script1.php?url=script2.php?var1=a&var2=b).
> > Now, script1 contains a form pointing to script3 so basically, I have
the
> > user form and then:
> >
> > <?
> > echo "<INPUT TYPE=\"HIDDEN\" NAME=\"url\" VALUE=\"$url\">";
> > ?>
> >
> > (I have register-gloabls enabled and am not sure whether the call to
> script1
> > will be POST or GET)
> >
> > This creates a slight problem, as, using the above example once again,
PHP
> > will send the browser the line:
> >
> > <INPUT TYPE="HIDDEN" NAME="url" VALUE="script2.php?var1=a">
> >
> > But it totally chops off everything from the "&" and onwards. How can I
> fix
> > it to get the entire URI?
> >
> > Thanks,
> > Issac
> >
> >
> > --
> > Internet is a wonderful mechanism for making a fool of
> > yourself in front of a very large audience.
> > --Anonymous
> >
> > Moving the mouse won't get you into trouble... Clicking it might.
> > --Anonymous
> >
> > PGP Key 0xE0FA561B - Fingerprint:
> > 7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
try this
$myurl=urlencode(base64_encode($url));
in the input type
echo "<INPUT TYPE=\"HIDDEN\" NAME=\"url\" VALUE=".urldecode(base64_decode($myurl).">";
On 22-Mar-2001 Issac Goldstand wrote:
> Nope. That gave me:
>
> <INPUT TYPE="HIDDEN" NAME="url" VALUE="script2.php?var1=a&b">
>
> I'd need to enumerate $HTTP_GET_VARS variable _keys_ too, but I don't know
> how...
> Also, how can I get it to work for both GET & POST methods? Is that
> possible?
>
> Thanks,
> Issac
>
> ""almir"" <a.kazazic
medienhaus.co.at> wrote in message
> news:99b66u$q0o$1
toye.p.sourceforge.net...
>> try with
>>
>> uri=<? echo implode("&", $HTTP_GET_VARS);?>
>>
>>
>> ""Issac Goldstand"" <neoi
writeme.com> schrieb im Newsbeitrag
>> news:99at42$5be$1
toye.p.sourceforge.net...
>> > Newbie question here. I am trying to pass a varaible containing a URI
>> > across a few scripts. Basically, the first script get's a query string
>> > including the URI (eg
>> > http://foo.bar/script1.php?url=script2.php?var1=a&var2=b).
>> > Now, script1 contains a form pointing to script3 so basically, I have
> the
>> > user form and then:
>> >
>> > <?
>> > echo "<INPUT TYPE=\"HIDDEN\" NAME=\"url\" VALUE=\"$url\">";
>> > ?>
>> >
>> > (I have register-gloabls enabled and am not sure whether the call to
>> script1
>> > will be POST or GET)
>> >
>> > This creates a slight problem, as, using the above example once again,
> PHP
>> > will send the browser the line:
>> >
>> > <INPUT TYPE="HIDDEN" NAME="url" VALUE="script2.php?var1=a">
>> >
>> > But it totally chops off everything from the "&" and onwards. How can I
>> fix
>> > it to get the entire URI?
>> >
>> > Thanks,
>> > Issac
>> >
>> >
>> > --
>> > Internet is a wonderful mechanism for making a fool of
>> > yourself in front of a very large audience.
>> > --Anonymous
>> >
>> > Moving the mouse won't get you into trouble... Clicking it might.
>> > --Anonymous
>> >
>> > PGP Key 0xE0FA561B - Fingerprint:
>> > 7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B
>> >
>> >
>> >
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> > For additional commands, e-mail: php-general-help
lists.php.net
>> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>> >
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>> For additional commands, e-mail: php-general-help
lists.php.net
>> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
Rui Barreiros Software Developer
WEBSOLUT - Soluções Internet
Emailto: rui
websolut.net
Personal Info: http://websolut.net/people/rui.html
As informações contidas neste email são confidenciais e destinam-se apenas à(s) pessoa(s) a quem foi enviado: http://websolut.net/confidencialidade-responsabilidade.html
attached mail follows:
Instead of using a HIDDEN form field (I assume you don't use this in any client side javascript), why not just use a session variable. Add this to the top of the relevant pages using include:
<?php session_start(); # This array contains all the session items if (!isset($sesh)) { $sesh = array(); session_register('sesh'); }
if (isset($url) and !$sesh[url]) $sesh[url] = $url;
?>
You can then use $sesh[url] in any php block to find what this value was set to on the first page.
Regards Jeff
-----Original Message-----
From: Issac Goldstand [mailto:neoi
writeme.com]
Sent: Thursday, March 22, 2001 11:39 AM
To: php-general
lists.php.net
Subject: Re: [PHP] URIs as variables
Nope. That gave me:
<INPUT TYPE="HIDDEN" NAME="url" VALUE="script2.php?var1=a&b">
I'd need to enumerate $HTTP_GET_VARS variable _keys_ too, but I don't know how... Also, how can I get it to work for both GET & POST methods? Is that possible?
Thanks, Issac
""almir"" <a.kazazic
medienhaus.co.at> wrote in message
news:99b66u$q0o$1
toye.p.sourceforge.net...
> try with
>
> uri=<? echo implode("&", $HTTP_GET_VARS);?>
>
>
> ""Issac Goldstand"" <neoi
writeme.com> schrieb im Newsbeitrag
> news:99at42$5be$1
toye.p.sourceforge.net...
> > Newbie question here. I am trying to pass a varaible containing a URI
> > across a few scripts. Basically, the first script get's a query string
> > including the URI (eg
> > http://foo.bar/script1.php?url=script2.php?var1=a&var2=b).
> > Now, script1 contains a form pointing to script3 so basically, I have
the
> > user form and then:
> >
> > <?
> > echo "<INPUT TYPE=\"HIDDEN\" NAME=\"url\" VALUE=\"$url\">";
> > ?>
> >
> > (I have register-gloabls enabled and am not sure whether the call to
> script1
> > will be POST or GET)
> >
> > This creates a slight problem, as, using the above example once again,
PHP
> > will send the browser the line:
> >
> > <INPUT TYPE="HIDDEN" NAME="url" VALUE="script2.php?var1=a">
> >
> > But it totally chops off everything from the "&" and onwards. How can I
> fix
> > it to get the entire URI?
> >
> > Thanks,
> > Issac
> >
> >
> > --
> > Internet is a wonderful mechanism for making a fool of
> > yourself in front of a very large audience.
> > --Anonymous
> >
> > Moving the mouse won't get you into trouble... Clicking it might.
> > --Anonymous
> >
> > PGP Key 0xE0FA561B - Fingerprint:
> > 7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Nobody can help?
----- Original Message -----
From: <techzeus
pacific.net.sg>
To: "'PHP General List. (E-mail)'" <php-general
lists.php.net>
Sent: Wednesday, March 21, 2001 8:29 PM
Subject: [PHP] Lostpassword script Error
Hi there, I need some help here.
I have uploaded all the files necessary into my server. grab it at www.frozened.com/zeus/lostpassword.zip
This is a lostpassword script whereby when the user inputs his email
address, the script will check if his email is a valid email (
test
test.com ) after which it will use the database to search for the email
and if there his email is in the db, it will send him a mail telling him so.
In this script I haven't add the mail() but replaced it with a echo() so that I know that the form has been processed.
When I run the script and input a 'non-valid' email address ( no
sign ),
the errormsg will appear as normal but when I type a valid email or a email
that is in the database, the form will just clear it self and reappear.
Mind if someone help me debug (I'm new to PHP).
Thanks :)
------------------------ Zeus ------------------------
attached mail follows:
Hi all, im using the following scripts:
<?php include("connect.php");
$query = "SELECT threadid, title, postusername FROM thread order by threadid DESC LIMIT 0,5"; $result = mysql_db_query ("vbdforum", $query);
if ($result){ echo "<table width=\"100%\">";
$numOfRows = mysql_num_rows ($result); for ($i = 0; $i < $numOfRows; $i++){ $threadid = mysql_result ($result, $i, "threadid"); $posts = mysql_result ($result, $i, "title"); $postusername = mysql_result ($result, $i, "postusername"); echo "<tr><td width=\"50%\"><a href=_forum/showthread.php?threadid=$threadid target="_blank">$posts</a></td><td width=\"50%\">$postusername</td></tr>"; } echo "</table>"; } else{ echo mysql_errno().": ".mysql_error()."<BR>"; }
mysql_close ();
?>
Everything works perfect, but it prints out 6 lines, cause there are 6 lines it grabbed from the source. What I want to do is print only 5 lines, cause that would look a lot better in my page lay-out. Can someone give me a hint?
THx H0RNET
ps, can u also tell me if I posted this in the right newsgroup?
attached mail follows:
surely it should be limit 0,4 (0,1,2,3,4) = 5 items! remember 0 is row 1 not 1
""Dennis Haller"" <dennis.haller
iie.nl> wrote in message
news:99cs5b$bj4$1
toye.p.sourceforge.net...
> Hi all, im using the following scripts:
>
> <?php
> include("connect.php");
>
> $query = "SELECT threadid, title, postusername FROM thread order by
threadid
> DESC LIMIT 0,5";
> $result = mysql_db_query ("vbdforum", $query);
>
> if ($result){
> echo "<table width=\"100%\">";
>
> $numOfRows = mysql_num_rows ($result);
> for ($i = 0; $i < $numOfRows; $i++){
> $threadid = mysql_result ($result, $i, "threadid");
> $posts = mysql_result ($result, $i, "title");
> $postusername = mysql_result ($result, $i, "postusername");
> echo "<tr><td width=\"50%\"><a
> href=_forum/showthread.php?threadid=$threadid
> target="_blank">$posts</a></td><td
> width=\"50%\">$postusername</td></tr>";
> }
> echo "</table>";
> }
> else{
> echo mysql_errno().": ".mysql_error()."<BR>";
> }
>
> mysql_close ();
>
> ?>
>
> Everything works perfect, but it prints out 6 lines, cause there are 6
lines
> it grabbed from the source. What I want to do is print only 5 lines, cause
> that would look a lot better in my page lay-out. Can someone give me a
hint?
>
> THx
> H0RNET
>
> ps, can u also tell me if I posted this in the right newsgroup?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
if this message duplicates - sorry. some weirdness on my news client!
dennis, i think your limit should read 0,4 because 0 is actually row 1 (we count from 0 not 1) so limit 0,4 gives you rows 0,1,2,3,4 - which is 5! not 4!
""Dennis Haller"" <dennis.haller
iie.nl> wrote in message
news:99cs5b$bj4$1
toye.p.sourceforge.net...
> Hi all, im using the following scripts:
>
> <?php
> include("connect.php");
>
> $query = "SELECT threadid, title, postusername FROM thread order by
threadid
> DESC LIMIT 0,5";
> $result = mysql_db_query ("vbdforum", $query);
>
> if ($result){
> echo "<table width=\"100%\">";
>
> $numOfRows = mysql_num_rows ($result);
> for ($i = 0; $i < $numOfRows; $i++){
> $threadid = mysql_result ($result, $i, "threadid");
> $posts = mysql_result ($result, $i, "title");
> $postusername = mysql_result ($result, $i, "postusername");
> echo "<tr><td width=\"50%\"><a
> href=_forum/showthread.php?threadid=$threadid
> target="_blank">$posts</a></td><td
> width=\"50%\">$postusername</td></tr>";
> }
> echo "</table>";
> }
> else{
> echo mysql_errno().": ".mysql_error()."<BR>";
> }
>
> mysql_close ();
>
> ?>
>
> Everything works perfect, but it prints out 6 lines, cause there are 6
lines
> it grabbed from the source. What I want to do is print only 5 lines, cause
> that would look a lot better in my page lay-out. Can someone give me a
hint?
>
> THx
> H0RNET
>
> ps, can u also tell me if I posted this in the right newsgroup?
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Thx Michael, but as u can see I already posted a new msg cause I copy pasted the wrong script :) THx for ure reply
----- Original Message -----
From: ""Michael Bartlett"" <cataract
eye2eye.net>
Newsgroups: php.general
Sent: Thursday, March 22, 2001 1:52 PM
Subject: Re: [PHP] Only 5 lines
> if this message duplicates - sorry. some weirdness on my news client!
>
> dennis, i think your limit should read 0,4
> because 0 is actually row 1 (we count from 0 not 1)
> so limit 0,4 gives you rows 0,1,2,3,4 - which is 5!
> not 4!
>
>
> ""Dennis Haller"" <dennis.haller
iie.nl> wrote in message
> news:99cs5b$bj4$1
toye.p.sourceforge.net...
> > Hi all, im using the following scripts:
> >
> > <?php
> > include("connect.php");
> >
> > $query = "SELECT threadid, title, postusername FROM thread order by
> threadid
> > DESC LIMIT 0,5";
> > $result = mysql_db_query ("vbdforum", $query);
> >
> > if ($result){
> > echo "<table width=\"100%\">";
> >
> > $numOfRows = mysql_num_rows ($result);
> > for ($i = 0; $i < $numOfRows; $i++){
> > $threadid = mysql_result ($result, $i, "threadid");
> > $posts = mysql_result ($result, $i, "title");
> > $postusername = mysql_result ($result, $i, "postusername");
> > echo "<tr><td width=\"50%\"><a
> > href=_forum/showthread.php?threadid=$threadid
> > target="_blank">$posts</a></td><td
> > width=\"50%\">$postusername</td></tr>";
> > }
> > echo "</table>";
> > }
> > else{
> > echo mysql_errno().": ".mysql_error()."<BR>";
> > }
> >
> > mysql_close ();
> >
> > ?>
> >
> > Everything works perfect, but it prints out 6 lines, cause there are 6
> lines
> > it grabbed from the source. What I want to do is print only 5 lines,
cause
> > that would look a lot better in my page lay-out. Can someone give me a
> hint?
> >
> > THx
> > H0RNET
> >
> > ps, can u also tell me if I posted this in the right newsgroup?
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
The question I asked before was for this script:
<? $open = fopen("http://nu.nl/deeplink_html", "r");
$read = fread($open, 1000);
fclose($open);
$search = eregi("<DIV><B>nieuws.hoofd</B><UL><LI>(.*)</UL></DIV><DIV><B>nieuws.overig< /B><UL><LI>", $read, $printing);
$printing[1] = str_replace("<LI>", "", $printing[1]); $printing[1] = str_replace("</LI>", "<br>", $printing[1]); $printing[1] = str_replace("<A HREF=", "<A target="_blank" HREF=", $printing[1]);
$content = $printing[1]; $content = explode("·", $content);
$headlines = sizeof($content);
for ($i = 0; $i < $headlines; $i++) {
print "$content[$i] $headlines[$i]";
} ?>
So is it posible to get only 5 lines out of this script?
Thx again
attached mail follows:
I'm guessing you are getting an extra blank....
If you get a result back in $headlines = sizeof($content) of 5, then you have 5 lines, but in your script you have the value of $i as ZERO ($i = 0; $i < $headlines; $i++) meaning 0,1,2,3,4,5 which is 6 lines, simply set your $i=1 and it should be correct.
Let me know. I did execute your script off of my server and resulted in only 1 line printing the value of "1" nothing else....
Jack
Dennis Haller wrote:
> The question I asked before was for this script:
>
> <?
> $open = fopen("http://nu.nl/deeplink_html", "r");
>
> $read = fread($open, 1000);
>
> fclose($open);
>
> $search =
> eregi("<DIV><B>nieuws.hoofd</B><UL><LI>(.*)</UL></DIV><DIV><B>nieuws.overig<
> /B><UL><LI>", $read, $printing);
>
> $printing[1] = str_replace("<LI>", "", $printing[1]);
> $printing[1] = str_replace("</LI>", "<br>", $printing[1]);
> $printing[1] = str_replace("<A HREF=", "<A target="_blank" HREF=",
> $printing[1]);
>
> $content = $printing[1];
> $content = explode("·", $content);
>
> $headlines = sizeof($content);
>
> for ($i = 0; $i < $headlines; $i++) {
>
> print "$content[$i] $headlines[$i]";
>
> }
> ?>
>
> So is it posible to get only 5 lines out of this script?
>
> Thx again
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Still doesnt work, I think the problem is that the $content exist out of 1 array. So u cant limit it like in a SELECT query. The script sees the content of that array as 1 and therefor can not be splitted.
THx for ure afford
"Jack Sasportas" <jack
innovativeinternet.com> wrote in message
news:3ABA0BF7.1C65D840
innovativeinternet.com...
> I'm guessing you are getting an extra blank....
>
> If you get a result back in $headlines = sizeof($content) of 5, then you
have 5
> lines, but in your script you have the value of $i as ZERO ($i = 0; $i <
> $headlines; $i++)
> meaning 0,1,2,3,4,5 which is 6 lines, simply set your $i=1 and it should
be
> correct.
>
> Let me know.
> I did execute your script off of my server and resulted in only 1 line
printing
> the value of "1" nothing else....
>
> Jack
>
> Dennis Haller wrote:
>
> > The question I asked before was for this script:
> >
> > <?
> > $open = fopen("http://nu.nl/deeplink_html", "r");
> >
> > $read = fread($open, 1000);
> >
> > fclose($open);
> >
> > $search =
> >
eregi("<DIV><B>nieuws.hoofd</B><UL><LI>(.*)</UL></DIV><DIV><B>nieuws.overig<
> > /B><UL><LI>", $read, $printing);
> >
> > $printing[1] = str_replace("<LI>", "", $printing[1]);
> > $printing[1] = str_replace("</LI>", "<br>", $printing[1]);
> > $printing[1] = str_replace("<A HREF=", "<A target="_blank"
HREF=",
> > $printing[1]);
> >
> > $content = $printing[1];
> > $content = explode("·", $content);
> >
> > $headlines = sizeof($content);
> >
> > for ($i = 0; $i < $headlines; $i++) {
> >
> > print "$content[$i] $headlines[$i]";
> >
> > }
> > ?>
> >
> > So is it posible to get only 5 lines out of this script?
> >
> > Thx again
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Is there any place in the internet gives free hosting like (freeservers.com,geocities.com ..) supporting PHP/MySQL?
Alaiddin
attached mail follows:
Head on over to http://members.evolt.org/ and have a look at what the wonderful folks over there are offering.
HTH Jon
-----Original Message-----
From: PIS Alaiddin Tayeh [mailto:atayeh
p-i-s.com]
Sent: 22 March 2001 13:23
To: php-general
lists.php.net
Subject: [PHP] Free Web Space
Is there any place in the internet gives free hosting like (freeservers.com,geocities.com ..) supporting PHP/MySQL?
Alaiddin
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
********************************************************************** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality'
**********************************************************************
attached mail follows:
Check out this list :
http://www.faqts.com/knowledge-base/view.phtml/aid/4058/fid/27
Regards,
Philip
On Thu, 22 Mar 2001, PIS Alaiddin Tayeh wrote:
> Is there any place in the internet gives free hosting like
> (freeservers.com,geocities.com ..) supporting PHP/MySQL?
>
> Alaiddin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Java have error handling like C and not C as Java, and Java is C like and so is PHP.
""Jason Cox"" <j-cox
home.com> wrote in message
news:002501c0a06d$4ce48ce0$c62a0541
ogden1.ut.home.com...
> No, PHP doesn't have the extensive error handling that Java does. It's a
> bit more like C.
>
> Jason
>
> ----- Original Message -----
> From: "Jeff" <jeff4e
rochester.rr.com>
> To: <php-general
lists.php.net>
> Sent: Monday, February 26, 2001 6:30 PM
> Subject: [PHP] try catch in php?
>
>
> > Is there any equivalent java try catch syntax in php ?
> >
> > Thanks,
> >
> > Jeff
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
ok i am usng php3.0.11 ,IIS4 and NT4 trying to connect to ldap server but i get a error Fatal error: Call to unsupported or undefined function ldap_connect() in ... i have included php3_ldap.dll in my php3.ini, i have even tried to include it dinamicaly with dl but then i get
Fatal error: Unable to load dynamic library './php3_ldap.dll'
yes the file is THERE i have tested it and that is the right directory i tested it with other .dll-s and it works just fine but this one is making problems i had a similar problem with oracle oci81 where i had to restart the server but in this case I realy dont know what to do
I also tryied with two different files from php 3.0.11 and 3.0.17 both of them are 56k (could be the same) but none of them works
-almir
attached mail follows:
I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine.
here is the code i'm trying to use.
$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);
the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34
i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database?
(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track?
thanks! -ken
attached mail follows:
I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas:
The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error?
The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'.
Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it?
-----Original Message-----
From: Brooks, Ken [mailto:KBrooks
netEPS.com]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; php-general
lists.php.net
Subject: Oracle ODBC sql [ORA-00972: identifier is too long]
I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine.
here is the code i'm trying to use.
$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);
the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34
i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database?
(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track?
thanks! -ken
************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
**************************************************************************
attached mail follows:
I only mentioned the part about the access, just to prove that I know i have a select statement working with an ODBC source.
I know that I am connecting to the Oracle database, because if i put in a bogus user/pass i get an error stating so, when I supply the correct credentials I get no errors.
So that just leaves something to do with possibly the table names. The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS by my count that is 32 characters. That could be a problem. Any way around that, or to alias a name to that? (Mind you, i don't have access to that database to change the table names). I can only query from it.
The exact offending line number that is returned is 37.
36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where ATMID = 'PN2000'"; 37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);
-ken
-----Original Message-----
From: Greig, Euan [mailto:Euan.Greig
brann.com]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: php-general
lists.php.net
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas:
The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error?
The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'.
Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it?
-----Original Message-----
From: Brooks, Ken [mailto:KBrooks
netEPS.com]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; php-general
lists.php.net
Subject: Oracle ODBC sql [ORA-00972: identifier is too long]
I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine.
here is the code i'm trying to use.
$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);
the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34
i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database?
(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track?
thanks! -ken
************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
**************************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Lets start at the basics.
What is the easiest way to *make sure* that i am connecting to that oracle db?
Anyway I can just list the tables, or something. odbc_tables or something like that?..
-ken
-----Original Message-----
From: Brooks, Ken [mailto:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:32 AM
To: php-general
lists.php.net
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
I only mentioned the part about the access, just to prove that I know i have a select statement working with an ODBC source.
I know that I am connecting to the Oracle database, because if i put in a bogus user/pass i get an error stating so, when I supply the correct credentials I get no errors.
So that just leaves something to do with possibly the table names. The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS by my count that is 32 characters. That could be a problem. Any way around that, or to alias a name to that? (Mind you, i don't have access to that database to change the table names). I can only query from it.
The exact offending line number that is returned is 37.
36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where ATMID = 'PN2000'"; 37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);
-ken
-----Original Message-----
From: Greig, Euan [mailto:Euan.Greig
brann.com]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: php-general
lists.php.net
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas:
The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error?
The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'.
Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it?
-----Original Message-----
From: Brooks, Ken [mailto:KBrooks
netEPS.com]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; php-general
lists.php.net
Subject: Oracle ODBC sql [ORA-00972: identifier is too long]
I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine.
here is the code i'm trying to use.
$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);
the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34
i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database?
(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track?
thanks! -ken
************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
**************************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I got it.
I had the table name listed as aradmin_eps_service_instructions when in fact it should have been aradmin.eps_service_instructions (with the dot).
I did not know this because all of the tables I had seen linked to this before used _ ,but the actual name (which i normally don't have priveledge to even view) uses the .
Whee!
-----Original Message-----
From: Brooks, Ken [mailto:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:52 AM
To: php-general
lists.php.net
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too
long]
Lets start at the basics.
What is the easiest way to *make sure* that i am connecting to that oracle db?
Anyway I can just list the tables, or something. odbc_tables or something like that?..
-ken
-----Original Message-----
From: Brooks, Ken [mailto:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:32 AM
To: php-general
lists.php.net
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
I only mentioned the part about the access, just to prove that I know i have a select statement working with an ODBC source.
I know that I am connecting to the Oracle database, because if i put in a bogus user/pass i get an error stating so, when I supply the correct credentials I get no errors.
So that just leaves something to do with possibly the table names. The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS by my count that is 32 characters. That could be a problem. Any way around that, or to alias a name to that? (Mind you, i don't have access to that database to change the table names). I can only query from it.
The exact offending line number that is returned is 37.
36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where ATMID = 'PN2000'"; 37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);
-ken
-----Original Message-----
From: Greig, Euan [mailto:Euan.Greig
brann.com]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: php-general
lists.php.net
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas:
The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error?
The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'.
Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it?
-----Original Message-----
From: Brooks, Ken [mailto:KBrooks
netEPS.com]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; php-general
lists.php.net
Subject: Oracle ODBC sql [ORA-00972: identifier is too long]
I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine.
here is the code i'm trying to use.
$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);
the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34
i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database?
(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track?
thanks! -ken
************************************************************************** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.
**************************************************************************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi All,
I currently have a small problem with my PHP form. I have made two PHP files (application.php and process_application.php).
On submitting the form, you then move to process_application.php. Any errors will force the form NOT to be submitted to me.
However, how do I stop people from accessing process_application.php directly? You can still type in the URL of this address without filling in any details.
Although it serves up an error, is there anyway I can prevent people from getting to this page unless they press "Submit" on the actual form on application.php?
Thanks,
SK _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
attached mail follows:
You could have a check for the HTTP_REFERER variable, if it doesn't contain "application.php", chances are they didn't come from that page.
There might be a neater way to do it, but I don't know it :-)
HTH Jon
-----Original Message-----
From: Good Fella [mailto:goodfella_gf
hotmail.com]
Sent: 22 March 2001 14:34
To: php-general
lists.php.net
Subject: [PHP] Form help
Hi All,
I currently have a small problem with my PHP form. I have made two PHP files (application.php and process_application.php).
On submitting the form, you then move to process_application.php. Any errors will force the form NOT to be submitted to me.
However, how do I stop people from accessing process_application.php directly? You can still type in the URL of this address without filling in any details.
Although it serves up an error, is there anyway I can prevent people from getting to this page unless they press "Submit" on the actual form on application.php?
Thanks,
SK _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
********************************************************************** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality'
**********************************************************************
attached mail follows:
A common way is to add a check for the pressing of the submit button, so assuming :
<input type="submit" name="submit" value="submit me!">
if ( isset($submit) ) {
// process form
} else {
echo 'oh dear, you did not use form.';
}
I usually use a hidden field instead as at times the submit button can be "skipped" as the user presses enter vs. clicks the button, not sure what browsers or setups allow this behavior but some do (maybe someone can expand on this thought). So, try something like :
<input type="hidden" name="form_submitted" value="1">
if ( $form_submitted == true ) {
That should do the job. Also doing an is_array check somewhere in there works if the form names are an array, like :
<input type="text" name="form[username]"> <input type="text" name="form[password]">
Other considerations apply but if $form is an array then most likely the user used the form. So :
if ( is_array($form) ) {
Regards,
Philip Olson http://www.cornado.com/
On Thu, 22 Mar 2001, Good Fella wrote:
> Hi All,
>
> I currently have a small problem with my PHP form. I have made two PHP
> files (application.php and process_application.php).
>
> On submitting the form, you then move to process_application.php. Any
> errors will force the form NOT to be submitted to me.
>
> However, how do I stop people from accessing process_application.php
> directly? You can still type in the URL of this address without filling in
> any details.
>
> Although it serves up an error, is there anyway I can prevent people from
> getting to this page unless they press "Submit" on the actual form on
> application.php?
>
> Thanks,
>
> SK
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
> > You could have a check for the HTTP_REFERER variable, if it doesn't > > contain "application.php", chances are they didn't come from that page.
> it's not a good idea to rely on $HTTP_REFERER for anything, and especially > for this. a referer is only reported when the user follows a hyperlink, so > in the hypothetical case given there would be no referer.
Isn't that the point? If there's no referer, they didn't come from the first page, so you send them back there. I could be completely wrong here - is HTTP_REFERER empty following a form submission, even if it's to a different page?
> what you need to do is combine your two scripts, which is really a neater > way handling forms anyway. point your form action to the same page > ($PHP_SELF works really well for this, since you can rename the file and > it will still run properly), and then add the following code to the top > of your application.php file > > if($GLOBALS["REQUEST_METHOD"] == "POST") { > > include("process_application.php"); > > exit; > > }
This is how I would handle it personally, but then he'd mentioned having two pages, so......
Cheers Jon
********************************************************************** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality'
**********************************************************************
attached mail follows:
not all browsers support the referrer or some people use software to block that, so that method is unreliable... the only way to do this is with a token. that is time sensitive from the database, even then there is no method that is hackproof.
Rick
At 03:41 PM 3/22/01 +0000, Jon Haworth wrote:
> > > You could have a check for the HTTP_REFERER variable, if it doesn't
> > > contain "application.php", chances are they didn't come from that page.
>
> > it's not a good idea to rely on $HTTP_REFERER for anything, and especially
> > for this. a referer is only reported when the user follows a hyperlink, so
> > in the hypothetical case given there would be no referer.
>
>Isn't that the point? If there's no referer, they didn't come from the first
>page, so you send them back there. I could be completely wrong here - is
>HTTP_REFERER empty following a form submission, even if it's to a different
>page?
>
> > what you need to do is combine your two scripts, which is really a neater
> > way handling forms anyway. point your form action to the same page
> > ($PHP_SELF works really well for this, since you can rename the file and
> > it will still run properly), and then add the following code to the top
> > of your application.php file
> >
> > if($GLOBALS["REQUEST_METHOD"] == "POST") {
> >
> > include("process_application.php");
> >
> > exit;
> >
> > }
>
>This is how I would handle it personally, but then he'd mentioned having two
>pages, so......
>
>Cheers
>Jon
>
>
>**********************************************************************
>'The information included in this Email is of a confidential nature and is
>intended only for the addressee. If you are not the intended addressee,
>any disclosure, copying or distribution by you is prohibited and may be
>unlawful. Disclosure to any party other than the addressee, whether
>inadvertent or otherwise is not intended to waive privilege or
>confidentiality'
>
>**********************************************************************
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
i'm still getting the hang of regexps, however i have on small problem - I can't seem to make one to work on a US telephone number. does anyone have something similar that i could work from?
~kurth
attached mail follows:
I'm new to php (and from Denmark:-) and I've just made my first guestbook, but I don't want people to be able to write there name like this <h1>name</h1>
How can I delete these signs?
Please help!!
attached mail follows:
You can use the strip_tags function to remove HTML tags from the user inputted data e.g. $name = strip_tags($name)
-Stewart
-----Original Message-----
From: Brian Rosenkrantz [mailto:brian
webhullet.dk]
Sent: 22 March 2001 15:50
To: php-general
lists.php.net
Subject: [PHP] Unwanted signs!
I'm new to php (and from Denmark:-) and I've just made my first guestbook, but I don't want people to be able to write there name like this <h1>name</h1>
How can I delete these signs?
Please help!!
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Check out :
http://www.php.net/manual/en/function.strip-tags.php
So :
$input = '<h1>name</h1>'; $input = strip_tags($input);
echo $input; // name
Regards,
Philip Olson http://www.cornado.com/
On Thu, 22 Mar 2001, Brian Rosenkrantz wrote:
> I'm new to php (and from Denmark:-) and I've just made my first guestbook,
> but I don't want people to be able to write there name like this
> <h1>name</h1>
>
> How can I delete these signs?
>
> Please help!!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Do you know where I can either:
1) download the PHP binaries for Digital True64 OSF1 V5.1 732 alpha
or
2) get a OSF specific configuration file for compilation ?
My goal is to run latest PHP under apache 1.3.19 with MySQL 3.22.20a on a dec osf.
Thanks in advance,
John Tran
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]