OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: php3 Digest 22 May 2000 15:54:13 -0000 Issue 1686
From: php3-digest-helplists.php.net
Date: Mon May 22 2000 - 10:54:13 CDT


php3 Digest 22 May 2000 15:54:13 -0000 Issue 1686

Topics (messages 91109 through 91166):

Displaying 20 most recent MySQL entries
        91109 by: "Mark Maggelet" <maggeletmminternet.com>
        91128 by: Paul DuBois <paulsnake.net>

about php3_gd.dll
        91110 by: ÌÆÎÄÃñ <tangwenmincitiz.net>

sort order numeric
        91111 by: "Ted Knudson" <tedkmichianatoday.com>

php 4 sessions
        91112 by: "Meir Kriheli - MKsoft" <mksoftnetvision.net.il>

PHP & E-Commerce
        91113 by: "Thomas Edison Jr." <thomasedisonjryahoo.com>

php3: distrutor
        91114 by: Marco Zaino <zainounipmn.it>

Other DLL's in php4
        91115 by: "Papagelis Athanasios" <papagelceid.upatras.gr>

PHP & MS Access
        91116 by: Darvin Andrioli <darvin.andriolicaricese.it>
        91122 by: Mark Nold <marknalverstone.com.au>

IPTC
        91117 by: Pike <pikekw.nl>

Encrypted php scripts
        91118 by: "Papagelis Athanasios" <papagelceid.upatras.gr>
        91119 by: "Papagelis Athanasios" <papagelceid.upatras.gr>

Displaying selected text in template according to ID number
        91120 by: Patrick Meisel <patrickkarlshof.de>
        91121 by: Patrick Meisel <patrickkarlshof.de>
        91124 by: Justin French <jfrenchsprint.com.au>

Retrival of web pages
        91123 by: Antony Stace <antonyclaire.co.jp>

small problem with PHP 3.0.14
        91125 by: "Bala, Kishore" <balastaff.juno.com>

Problem with ENCTYPE=multipart/form-data
        91126 by: Mohamed AMTOUN <amtounusa.net>

Graphic library
        91127 by: Alain.Tesioactfs.fr
        91132 by: "NickM" <nickregiocom.net>

printing output
        91129 by: Alain.Tesioactfs.fr

ODBC Mysql : Time in JScript
        91130 by: "Cak Usma" <usmadivre5.telkom.co.id>

New DLL!! How ???????
        91131 by: "Papagelis Athanasios" <papagelceid.upatras.gr>

how to create a jpeg image?
        91133 by: Patrick Meisel <patrickkarlshof.de>

MySql in ASP via ODBC ?
        91134 by: "Cak Usma" <usmadivre5.telkom.co.id>

code in else block is not executing
        91135 by: "Kathleen Ballard" <klb1316pressroom.com>

Php And Mysql Test Space required !!!
        91136 by: "Javed Siddiqui" <php5hotmail.com>

PostgreSQL or MySQL
        91137 by: "Andy W. K. Chan" <andychanmakewish.com>
        91138 by: "Brad Handy" <bhandyjack-of-all-trades.net>
        91145 by: Henrik Johansson <henrik.johanssonradius.se>
        91147 by: Rasmus Lerdorf <rasmuslinuxcare.com>
        91150 by: Rasmus Lerdorf <rasmuslinuxcare.com>
        91151 by: Henrik Johansson <henrik.johanssonradius.se>
        91152 by: "Brad Handy" <bhandyjack-of-all-trades.net>
        91153 by: Rasmus Lerdorf <rasmuslinuxcare.com>

search engine - what to do with data
        91139 by: Marcin Badtke <marcin.badtkepolkomtel.com.pl>
        91140 by: "Jean de Lavarene" <breuxonline.fr>

ODP: [PHP3] search engine - what to do with data
        91141 by: Marcin Badtke <marcin.badtkepolkomtel.com.pl>

Will header("Location: http://www.php.net"); work in fhttpd?
        91142 by: "Deepak Jeevankumar" <deepak_jkhotmail.com>

code in else block is not executing-part 2!
        91143 by: "Kathleen Ballard" <klb1316pressroom.com>

whats wrong with test (sybase)connection code please
        91144 by: david.tansleyacelondon.co.uk
        91146 by: Rasmus Lerdorf <rasmusphp.net>

Displaying Log Files in Browser Window
        91148 by: Graham Pearson <gpearsonsupport.niesc.k12.in.us>
        91149 by: Rasmus Lerdorf <rasmusphp.net>

session_register
        91154 by: Kevin Waterson <kevinkevin.oceania.net>
        91158 by: "Martin Edelius" <martin.edeliusspirex.se>

Using shell commands (exec, passthru and system)
        91155 by: "Mike Graziano" <grazmulticastisp.com>

MySQL & PHP problem - calculation of data issue
        91156 by: "K Old" <kevsurfhotmail.com>

GD libraries works in part!!!
        91157 by: David Scatigna <davidtomato.it>

Now you see, now you don't
        91159 by: Rino Mardo <dotslashlinif.org>
        91162 by: "frank joerdens" <frankjoerdens.de>

how to make a anchor link be a submit?
        91160 by: "Eric Wood" <ericinterplas.com>
        91161 by: "Pavel Kalian" <pkalianssw.cz>
        91164 by: Matt McClanahan <cardinaldodds.net>
        91166 by: "Rossi Designs" <webmasterrossidesigns.net>

Perl-->PHP
        91163 by: Greg Billock <billgroptics.caltech.edu>

will header() work in fhttpd?
        91165 by: "Deepak Jeevankumar" <deepak_jkhotmail.com>

Administrivia:

To subscribe to the digest, e-mail:
        php3-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php3-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php3lists.php.net

----------------------------------------------------------------------

attached mail follows:


***********************************************

On 5/20/00 at 4:20 PM Paul DuBois wrote:

>At 1:12 PM -0700 2000-05-20, Tyler Longren wrote:
>>Is there a way to display the 20 most recent entries into a MySQL
>>table? Thanks!
>>
>>Tyler Longren
>
>
>SELECT * FROM tbl_name ORDER BY some_column DESC LIMIT 20
>
>where some_column contains the time the column was entered into
>the table.
>
>I'm assuming you have such a column. If you don't, there is
>no way to determine the time that rows were entered.

not the time, but you can get the last 20 because they're at the end, right?
assuming no indexes got sorted.

you can go:
$row=mysql_fetch_array(mysql_query("select count(*) as count from table"));
$result=mysql_query("select * from table limit ".$row["count"]-20.",20");

- Mark

attached mail follows:


At 11:03 PM -0700 2000-05-21, Mark Maggelet wrote:
>***********************************************
>
>On 5/20/00 at 4:20 PM Paul DuBois wrote:
>
>>At 1:12 PM -0700 2000-05-20, Tyler Longren wrote:
>>>Is there a way to display the 20 most recent entries into a MySQL
>>>table? Thanks!
>>>
>>>Tyler Longren
>>
>>
>>SELECT * FROM tbl_name ORDER BY some_column DESC LIMIT 20
>>
>>where some_column contains the time the column was entered into
>>the table.
>>
>>I'm assuming you have such a column. If you don't, there is
>>no way to determine the time that rows were entered.
>
>not the time, but you can get the last 20 because they're at the end, right?
>assuming no indexes got sorted.
>
>you can go:
>$row=mysql_fetch_array(mysql_query("select count(*) as count from table"));
>$result=mysql_query("select * from table limit ".$row["count"]-20.",20");
>
>- Mark

This is not reliable. You're assuming that rows are stored in the table
in the same order in which they were inserted. Relational databases
make guarantee about that order, or the order in which rows will be
retrieved, unless you use an ORDER BY clause.

For example, if you at some time delete a row from a table, the next
row may very well be stored where that row was, not at the end.

-- 
Paul DuBois, paulsnake.net

attached mail follows:


Hi. I have got a promblem. I have got php3.0.16 win32 version. its php3_gd.dll support function imagewbmp() .but its php3_gd.dll does not support function imagecreatefromjpeg() ,imagejpeg(). its php3_gd.dll does not support function imagestring() when string is Chinese gb code.

where can i get pgp3_gd.dll (win32)(support Chinese gb code string.

tangwenmincitiz.net

attached mail follows:


You still did not answer my questions.

It is possible to write a regular expression to extract the data from your text field then sort the data. But that is the hard way to do it. Look up regular expressions in the manual.

I do not know enough about your tables and how the data gets into the text field.

What I would do from the information given is set up a second table.

Table Exhibits ID Exhibit Date etc.

Table Objects ID Artist Object ExhibitID

Optional third table Table Artist ID Artist Address Phone etc.

This way you can do all kinds of look ups and sorts. You can look up all objects in all exhibits and sort. Look up exhibit and sort the objects in that exhibit. Look up Object, find the exhibit or exhibits. Look up Artist find Object and Exhibits. Look up Object, find Artist and/or Exhibits. etc.

With all the information in one field like you have it, it is impossible the do the above.

If this does not help sent more information.

Ted Knudson http://www.automatedcabinets.com http://www.pulsarusa.com

> -----Original Message----- > From: Chris Mason [mailto:chrisnet.ai] > Sent: Sunday, May 21, 2000 5:45 AM > To: Ted Knudson > Subject: RE: sort order numeric > > > It's a text field in MySQL. The format would literally be "Item #1" up to > maybe Item #100". That's it. They signify the item numbers of > objects in an > art exhibition. > > > Chris Mason > Box 340, The Valley, Anguilla, British West Indies > Tel: 264 497 5670 Fax: 264 497 8463 > USA Fax (561) 382-7771 > Take a virtual tour of the island > http://net.ai/ The Anguilla Guide > Find out more about NetConcepts > www.netconcepts.ai > bwz*mq > > -----Original Message----- > From: Ted Knudson [mailto:tedkcyberlink.com] > Sent: Sunday, May 21, 2000 2:37 AM > To: chrisnet.ai > Cc: php3lists.php.net > Subject: sort order numeric > > > 1. Yes it can be done but first were is the data coming from? Some how it > had to get in the MySQL database. > 2. What is the exact format of the data? > 3. How constant is the format? > 4. Can you include some samples? > > Ted Knudson > http://www.automatedcabinets.com > http://www.pulsarusa.com > > > -----Original Message----- > > From: Chris Mason [mailto:chrisnet.ai] > > Sent: Saturday, May 20, 2000 3:36 PM > > To: Php3 > > Subject: sort order numeric > > > > > > I have a text field in a MySQL database with text - numbers, i.e. item > > 1..item 20. I'd like to sort the entries so that "item 2" came > after "item > > 1", presently "item 10" comes after "item 1". Is there a way to do this? > > > > Chris Mason > > Box 340, The Valley, Anguilla, British West Indies > > Tel: 264 497 5670 Fax: 264 497 8463 > > USA Fax (561) 382-7771 > > Take a virtual tour of the island > > http://net.ai/ The Anguilla Guide > > Find out more about NetConcepts > > www.netconcepts.ai > > bwz*mq > > > > > > > > > > >

attached mail follows:


look at here

http://www.phpbuilder.com/columns/mattias20000105.php3 http://www.phpbuilder.com/columns/mattias20000312.php3

Meir Kriheli MKsoft computer systems

----- Original Message ----- From: "Bjorn Sodergren" <sweedegallatinriver.net> To: "php list" <php3lists.php.net> Sent: Monday, May 22, 2000 5:58 AM Subject: [PHP3] php 4 sessions

> anyone know of any really good php4 session toturials/sites where i can > learn about session management ?? > > thanks > bjorn > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

attached mail follows:


hey,

I'm here running a little web engineering firm. We have started to use php & mySQL strongly for all our projects.

Just a few Querries. How far can we implement PHP3 for solving our e-commerce applications? Basically what e-commerce brings about are applications and sites which deal with consumers & manufacturers and commercial transactions over the web. Most apparent implementations involve :

Internet Banking - Commercial Transactions Purchasing products Placing an order Review billing information Checking delivery status Online Credit Card Verification Managing Inventory Updating customer profile data There could be other applications & Utilities i missed, i would appreciate those suggested.

Does PHP and a database like mySQL provide the capabilities to implement such applications and utilities?

Any responses appreciated.

Regards, T. Edison jr.

__________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/

attached mail follows:


Which is the distructor of a class?

I have a pg_pconnect that make a too much process of my postgreSQL daemon and I need to close the connection autamatically.

Otherwise:

------------------------------------------

Warning: PostgresSQL query failed: pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. in

auth/db_pgsql.inc on line 52

Database error: Invalid SQL: SELECT val FROM active_sessions WHERE sid = '78ef185829ab83a052318808aeb6ee29' AND name = 'SId'

PostgreSQL Error: 1 (pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. )

Session halted.

------------------------------------------

> ps -ef | grep postmaster|wc -l 32 >

Thank's.

attached mail follows:


Hi to all,

I have downloaded php4 for win32 release 2. In my computer I'm using odbc drivers to connect with databases from php but I don't seem to find the good old dll's with the needed functions for that job. It seems that only mySql is supported.

S.

attached mail follows:


You must use ODBC. If you have installed php on Win32 box, you needn't any extra software. Define an ODBC entry for your MsAccess database, comment out the line "extension=php3_odbc.dll" in php3.ini and see ODBC section in php manual.

Bye

Darvin Andrioli darvin.andriolicaricese.it

-----Original Message----- From: Gene James [SMTP:genehotpop.com] Sent: Monday, May 22, 2000 5:14 AM To: php3lists.php.net Subject: PHP & MS Access

Hi Please let me know details regarding how to connect PHP and MS Access, do I need any extra s/w for the same. Thank you for reading. Gene << File: ATT00019.html >>

attached mail follows:


Gene,

You will need; 1. A Webserver (on WIndows use PWS, IIS or even Apache) 2. An Access ODBC Driver (You should get this with MS Access) 3. A System DSN (Set this up in Control Panel) 4. PHP with ODBC compiled in (The later versions of PHP3 include this , and i think PHP4 RC2 does as well)

mn

Mark Nold marknalverstone.com.au Systems Consultant

Change is inevitable, except from vending machines.

On Monday, 22 May 2000 11:14, Gene James [SMTP:genehotpop.com] wrote: > Hi > Please let me know details regarding how to connect PHP and MS Access, do I need any extra s/w for the same. > Thank you for reading. > Gene > << File: ATT00002.html >>

attached mail follows:


Hi

is anyone using the iptcparse() function ? I can't seem to get it to work .. unless the garbage I retrieve _is_ the IPTC info. In that case, does anyone know how to decode this ?

http://www.v2.nl/~pike/php/tests/iptc.php

thanks upfront, *-pike-* ========================= pikekw.nl =========================

what will you do if we let you go home and the plastic is melting and so is the chrome

who are the brain police?

attached mail follows:


Hi to all,

I would like to know if there is a way to encrypt php scripts so that they cannot be seen even by the server administrator. In other words I would like to store scripts not in plain text format.

I undrestand that this can be accomplished using a DLL version of a collection of php scripts (which means to create a library's extension) but this solution seems complicated. Can I create a DLL and inside it use plain php3 code (using a wrapper???)

I also know that Zend is sheduling a new php compiler which would be the ideal solution to my problem (but this solution is a far one)

Please help.

S

attached mail follows:


Hi to all,

I would like to know if there is a way to encrypt php scripts so that they cannot be seen even by the server administrator. In other words I would like to store scripts not in plain text format.

I undrestand that this can be accomplished using a DLL version of a collection of php scripts (which means to create a library's extension) but this solution seems complicated. Can I create a DLL and inside it use plain php3 code (using a wrapper???)

I also know that Zend is sheduling a new php compiler which would be the ideal solution to my problem (but this solution is a far one)

Please help.

S

attached mail follows:


Hi, I don't quite see where your problem is. What have you tried? In what way does it not work. You do know, that your table is not really very efficient, don`t you? There are DATE-Types in mySQL and they take far less than 255 bytes. And for an ID you should probably use an Integer of some kind. Type sounds like you could use an ENUM.

Patrick Meisel

> Tyler Longren schrieb: > > I hope somebody can help me out here. The people that reply to my > problems seem to know what they're talking about, so help please. :) > Here's my problem: > > I need to be able to display text on a template. The template name is > view.php. There will be a page with links to all of these templates. > The links would need to look like > http://www.foobar.com/view.php?id=12 or something like that. Then > when they click that link, it will take the visitor to that page, and > display the text which has the ID number of 12. Also note that this > text is stored in a MySQL table...here's how I made my table: > > CREATE TABLE user_text ( > name char (255) NOT NULL, > email char (255) NOT NULL, > type char (255) NOT NULL, > description blob NOT NULL, > text blob NOT NULL, > date char (255) NOT NULL, > id char (255) NOT NULL, > ); > > If I wasn't clear enough with my explanation, please let me know so I > can try to better explain myself. Thanks for paying attention and > than you for your help!!! > > Thanks, > Tyler Longren

attached mail follows:


Is this what you are looking for?:

echo "<A HREF='http://www.foobar.com/view.php?id=$row[id]'>http://www.foobar.com/view.php?id=$row[id]</a>\n";

Partick Meisel

> I konw to do that...I just don't know how to set up the url part. I don't > know how to make it look like http://www.foobar.com/view.php?id=12 and then > have that display the text with the id of 12. > > Do you know how to do that? > > ----- Original Message ----- > From: "Cynic" <cynicmail.cz> > To: "Tyler Longren" <tyler.longrenmidiowa.net>; "PHP Help" > <php3lists.php.net> > Sent: Sunday, May 21, 2000 7:22 AM > Subject: Re: [PHP3] Displaying selected text in template according to ID > number > > > $query = "select name , email , type , description , text , date from > user_text where id = $id" ; > > mysql_connect( ... ) ; > > $result = mysql_query( $query ) ; > > list( $name , $email , $type , $description , $text , $date ) = > mysql_fetch_row( $result ) ; > > > > At 09:13 21.5.2000 -0700, Tyler Longren wrote the following: > > -------------------------------------------------------------- > > >I hope somebody can help me out here. The people that reply to my > problems seem to know what they're talking about, so help please. :) > Here's my problem: > > > > > >I need to be able to display text on a template. The template name is > view.php. There will be a page with links to all of these templates. The > links would need to look like > > > ><http://www.foobar.com/view.php?id=12>http://www.foobar.com/view.php?id=12 > or something like that. Then when they click that link, it will take the > visitor to that page, and display the text which has the ID number of 12. > Also note that this text is stored in a MySQL table...here's how I made my > table: > > > > > >CREATE TABLE user_text ( > > > name char (255) NOT NULL, > > > email char (255) NOT NULL, > > > type char (255) NOT NULL, > > > description blob NOT NULL, > > > text blob NOT NULL, > > > date char (255) NOT NULL, > > > id char (255) NOT NULL, > > >); > > > > > >If I wasn't clear enough with my explanation, please let me know so I can > try to better explain myself. Thanks for paying attention and than you for > your help!!! > > > > > >Thanks, > > >Tyler Longren > > ------end of quote------ > > > > > > ____________________________________________________________ > > Cynic: > > > > A member of a group of ancient Greek philosophers who taught > > that virtue constitutes happiness and that self control is > > the essential part of virtue. > > > > cynicmail.cz > > ICQ: 2808 2505 > > > > > > > > > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


I have had no problems with what you have descibed (although I must admit that I'm not using SQL, just php and text files named (eg home_main.txt) then you can just use a simple include statement using the variables.

Of course this is of less use if you are talking about tons of data.

I even use txt files for use-supplied text.

Yes, I know, should get into mySQL, but not enough hours in the day :)

Justin French

attached mail follows:


Hi Folks

Is it possible to retrieve web pages from a remote site with PHP3 or do I have to do it with Perl. If I do have to do it with Perl, how do I call a Perl Script from within a PHP script?

Cheers

Tony

attached mail follows:


> Hi, > > I am trying to develop a PHP script, that contacts a server running on > some other machine. > When I run it, the script is able to connect but unable to do any > operations on the socket. I used fsockopen() funstion call. And the error > I get is : > > ------------------------------------------- > Connecting to Tcl Server... Connected successfully : 1 > Warning: Unable to find file identifier 1 in > /u/bala/webprofile_test/apache/htdocs/dl_system/examples/connect.php3 on > line 23 > > Warning: Unable to find file identifier 1 in > /u/bala/webprofile_test/apache/htdocs/dl_system/examples/connect.php3 on > line 24 > first response : > Warning: Unable to find file identifier 1 in > /u/bala/webprofile_test/apache/htdocs/dl_system/examples/connect.php3 on > line 26 > > Warning: Unable to find file identifier 1 in > /u/bala/webprofile_test/apache/htdocs/dl_system/examples/connect.php3 on > line 27 > second response : > > -------------------------------- > > The PHP script I used is as follows : > > -------------- > <html> > > <body> > > <?php echo ("Your name : " . $name); ?> <p> > <?php echo ("Your password : " . $pass); ?> <p> > <?php echo ("Your age : " . $age); ?> <p> > > <?php > > $str1 = "first client str : " . $name . "-" . $pass . "-" . $age; > $str2 = "second client str"; > > echo ("Connecting to Tcl Server...\n"); > flush(); > $fp = fsockopen ("cs2.hyd.office.juno.com", 11001, &$errno, &$errstr, 30); > if ($fp == false) { > echo ("Could not connect because : $errstr, Exiting ..."); > exit (2); > } else { > set_file_buffer($fp, 0); > echo ("Connected successfully : $fp\n"); > fwrite ($fp, $str1, strlen ($str1)); > $res = fread ($fp, 128); > echo ("first response : $res \n"); > fputs ($fp, $str2, strlen ($str1)); > $res = fread ($fp, 128); > echo ("second response : $res \n"); > fclose ($fp); > } > > ?> > > </body> > .</html> > -------------------- > > Could you please let me know whats the problem with this script. > > Thanks a ton in advance, > bala > > -------------------------------------------------------------------------- > -------- > If you love PEACE and PEACEFUL WORLD, visit : > http://www.bkwsu.com/manifesto2000 to share your thoughts. > > Have a peaceful day. > -------------------------------------------------------------------------- > ------- >

attached mail follows:


Hi all, I am using a form in which I send attachment data to the server. My script used to work fine! suddenly it stopped : variables are not posted anymore! ...Actually I don't remember what I've done meanwhile in the script, but what I am sure of is that when I remove ENCTYPE="multipart/form-data" it works! Can anyone help ??

many thanx in advance

Mohamed Amtoun, Web/PHP Developer (http://www.resotel.net.ma/amtoun/ )

____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1

attached mail follows:


Hello,

Does someone know about a graphic library (free, open-source) based on GD to display standard graphics like pie charts or histograms ?

Thanks, Alain

______________________________________________________________________________

signoff end

______________________________________________________________________________

The views and opinions expressed in this email message are the sender's and do not necessarily represent the views and opinions of ACT Financial Systems S.A. ______________________________________________________________________________

attached mail follows:


Here's a graph package: http://www.advgraph.regiocom.net

Nick

----- Original Message ----- From: <Alain.Tesioactfs.fr> To: <php3lists.php.net> Sent: Monday, May 22, 2000 1:33 PM Subject: [PHP3] Graphic library

> > > > Hello, > > Does someone know about a graphic library (free, open-source) based on GD to > display > standard graphics like pie charts or histograms ? > > Thanks, > Alain > > > > ____________________________________________________________________________ __ > > signoff > end > > ____________________________________________________________________________ __ > > The views and opinions expressed in this email message are the sender's and do > not necessarily represent the views and opinions of ACT Financial Systems S.A. > ____________________________________________________________________________ __ > > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


Hi,

I prefer the first form, it's not really significant in your example but the second form is a pain to read when you have to escape some characters, for example when you want to print an hyperlink using the <a href ... syntax.

Alain

> I know both methods are acceptable, but which is used more widely... the > entire page scripted in PHP and using echo or print to output HTML elements > or merely outputing PHP specific things... > > brief examples: > > <TR><TD><? echo $variable; ?></TD></TR> > > or > > print( "<TR><TD>$variable</TD></TR>" ); > > Just curious... > > Joseph E. Sheble ______________________________________________________________________________

signoff end

______________________________________________________________________________

The views and opinions expressed in this email message are the sender's and do not necessarily represent the views and opinions of ACT Financial Systems S.A. ______________________________________________________________________________

attached mail follows:


Thank a lot friends,

but, I've a new problem when I want to stored .getTime() value in mysql via odbc in NT Server with asp page. How must I solve this problem ?

Here it's in asp:

<% Language="JScript" %> <% var tanggal = new Date(); var waktu=tanggal.getTime();

objConn = Server.CreateObject("ADODB.Connection"); objConn.open("test"); objRst = Server.CreateObject("ADODB.Recordset"); objRst.LockType = 3; objRst.Open ("SELECT * FROM test", objConn,3); objRst.Addnew(); objRst("nama").Value =waktu; objRst.Update(); objRst.Close(); objConn.Close(); %>

'test' Table with 'nama' field and char(200) in Mysql.

-usma-

attached mail follows:


Hi,

I am writing a new extension DLL for php3. I would like to know if it is an easy way to wrap php3 commands inside that DLL. I'm looking for functions like the following one: // This is php core C++ code php3_parse("print (/" test/"));

Please help

S.

attached mail follows:


Hi,

> > Hi! > > I am using php 3.0.16 compiled with GD 1.8. Creating Gifs works fine, > but my ISP does not support Gifs.

If you can create gifs, you can´t be using gd 1.8 as gif support was dropped (in 1.6 or 1.4). > My question is: how to create a jpeg image instead of a gif? is there > something equal to imageGif()?

imageJPEG()!

Patrick Meisel > TIA Jan M.

attached mail follows:


Dear All,

How Can I save my data request on ASP page into Mysql databse ? Via ODBC ? what's version ? I try ODBC Mysql version 30, It can not work properly.

How ....

-usma-

attached mail follows:


Dear List, I am trying to use the following code to control the display to the user if there is a problem connecting to mysql or the required database.

When I test it by setting an incorrect server name or user/password, it works like a charm. The page prints out with a polite "I am sorry the database is unavailable" and an error message is sent to notify the client there is a problem.

However, I currently have the chance to test it for real. The mysql server is down. But the page stops printing at the mysql_connect statement. The code in the else block is not executing.

Can anyone see what I have done wrong?

if ($db = mysql_connect($dbServer,$dbUser,$dbPassword)) { print "getting ready to select db<br>"; // Connection to mySQL has been made, now select the data base. if (!(mysql_select_db($dbName, $db)))// Cannot open selected database { // Replace this text with the required file that will be prettied up $dbErrorMsg->SendBlat("Unable to connect to inciid database!", "dbError", "Pathways Journal database error!"); $Submit="dbError";

} } else// Cannot connect to mySQL { // Replace this text with the required file that will be prettied up $dbErrorMsg->SendBlat("Unable to connect to mySQL!", "dbError", "Pathways Journal database error!"); $Submit="dbError";

}

Kathleen

attached mail follows:


Hi there Everyone !!!

Thanks for all the help till now !!!

Is there any website on the web offering free Php and Mysql WebSpace where I can test my Php and Mysql Scripts....

Any hwlp will be appreciated....

Thanks in Advance !!!

Javed Siddiqui. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

attached mail follows:


I am new in programming. My first project is Inventory Program. I have no idea which Back-End is suitable for my project. Some people tell me that the transaction function is important for my project. Anyone can give me some suggestion ?

Best Regards, Andy

attached mail follows:


As for as I know, MySQL does not support transactions so if transactions are essential to your project then I wouldn't use MySQL.

-----Original Message----- From: Andy W. K. Chan [mailto:andychanmakewish.com] Sent: Monday, May 22, 2000 8:54 AM To: php3lists.php.net Subject: [PHP3] PostgreSQL or MySQL

I am new in programming. My first project is Inventory Program. I have no idea which Back-End is suitable for my project. Some people tell me that the transaction function is important for my project. Anyone can give me some suggestion ?

Best Regards, Andy

attached mail follows:


Hi!

MySQL does not, at this point, support transactions as is, but there is an excellent way around this ?limitation? as described in the MySQL online manual: http://www.mysql.com/php/manual.php3?section=Missing_Transactions

So I think the proper question one must ask oneself is, do I need to perform many flat database-queries at blazing speed even on a lowend server or do I need a complex database-environment with multiple syncronization schemes and nested queries at the cost of poor perfomance on a low- or mid-end server solution?

If You fall into the first category, You ought to have a close look at the MySQL database server. ;-) Otherwise, I would go with *gres SQL or even Oracle 8.2 or higher if economy would permit.

Regards, Henrik J.

> ---------- > From: Brad Handy[SMTP:bhandyjack-of-all-trades.net] > Sent: den 22 maj 2000 15:00 > To: Andy W. K. Chan > Cc: PHP LIST > Subject: RE: [PHP3] PostgreSQL or MySQL > > As for as I know, MySQL does not support transactions so if transactions > are essential to your project then I wouldn't use MySQL. > > > -----Original Message----- > From: Andy W. K. Chan [mailto:andychanmakewish.com] > Sent: Monday, May 22, 2000 8:54 AM > To: php3lists.php.net > Subject: [PHP3] PostgreSQL or MySQL > > > I am new in programming. My first project is Inventory Program. I have no > idea which Back-End is suitable for my project. Some people tell me that > the transaction function is important for my project. Anyone can give me > some suggestion ? > > Best Regards, > Andy >

attached mail follows:


> MySQL does not, at this point, support transactions as is, but there is an > excellent way around this > ?limitation? as described in the MySQL online manual: > http://www.mysql.com/php/manual.php3?section=Missing_Transactions

Not actually true anymore. MySQL-3.23.16 supports transactions. See: http://www.mysql.com/download_3.23.html

-Rasmus

attached mail follows:


> As for as I know, MySQL does not support transactions so if transactions are > essential to your project then I wouldn't use MySQL.

Not true

http://web.mysql.com/php/manual.php3?section=BDB

-Rasmus

attached mail follows:


Coolness!

I stand corrected, and will accrodingly download the latest source and docs for inquireous, entagled sessions all evening long, using php-scripting of course. |-)

Happy hacking, Henrik J!

> ---------- > From: Rasmus Lerdorf[SMTP:rasmuslinuxcare.com] > Sent: den 22 maj 2000 15:38 > To: Henrik Johansson > Cc: Andy W. K. Chan; 'Brad Handy'; PHP LIST > Subject: RE: [PHP3] PostgreSQL or MySQL > > > MySQL does not, at this point, support transactions as is, but there is > an > > excellent way around this > > ?limitation? as described in the MySQL online manual: > > http://www.mysql.com/php/manual.php3?section=Missing_Transactions > > Not actually true anymore. MySQL-3.23.16 supports transactions. > See: http://www.mysql.com/download_3.23.html > > -Rasmus >

attached mail follows:


Has transaction support always been in MySQL? Because in some of my scripts that I've written in PERL before, I used the "AutoCommit" attribute of the DBI with a MySQL database and I got an error saying that MySQL didn't support transactions.

-Brad

-----Original Message----- From: Rasmus Lerdorf [mailto:rasmuslinuxcare.com] Sent: Monday, May 22, 2000 9:53 AM To: Brad Handy Cc: Andy W. K. Chan; PHP LIST Subject: RE: [PHP3] PostgreSQL or MySQL

> As for as I know, MySQL does not support transactions so if transactions are > essential to your project then I wouldn't use MySQL.

Not true

http://web.mysql.com/php/manual.php3?section=BDB

-Rasmus

attached mail follows:


> Has transaction support always been in MySQL? Because in some of my scripts > that I've written in PERL before, I used the "AutoCommit" attribute of the > DBI with a MySQL database and I got an error saying that MySQL didn't > support transactions.

No, it is a new feature.

-Rasmus

attached mail follows:


OK I know how to search for data in database but what to do with data I found ? Let's say I found 44 records with keyword "bond" and I want to show 10 links per page, with next, previous buttons and "This link is 16 of 44" message. Something like all search engines do (Yahoo, Altavista, Google etc.) How to do it ? Should I store found records in temp table or a file ? When should I delete temp table, file ? I am looking forward your comments.

Thanx in advance.

Marcin Badtke

attached mail follows:


If you are using a MySQL server, you can use LIMIT 0,10 to get only the first 10 results of your request... Knowing this you can set up a page number variable and display the results page per page :

$from = 20*$page; (if you want to display 20 results per page and if $page is the number of your page), $to = $from + 20; $sql = "select.... from... where ... LIMIT $from,$to";

Regards,

Jean

----- Original Message ----- From: "Marcin Badtke" <marcin.badtkepolkomtel.com.pl> To: <php3lists.php.net> Sent: Monday, May 22, 2000 3:05 PM Subject: [PHP3] search engine - what to do with data

> OK I know how to search for data in database but what to do with data I > found ? Let's say I found 44 records with keyword "bond" and I want to show > 10 links per page, with next, previous buttons and "This link is 16 of 44" > message. Something like all search engines do (Yahoo, Altavista, Google > etc.) How to do it ? Should I store found records in temp table or a file ? > When should I delete temp table, file ? I am looking forward your comments. > > Thanx in advance. > > Marcin Badtke > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

attached mail follows:


This is a good idea but, unfortunately, I use sybase.

If you are using a MySQL server, you can use LIMIT 0,10 to get only the first 10 results of your request... Knowing this you can set up a page number variable and display the results page per page :

$from = 20*$page; (if you want to display 20 results per page and if $page is the number of your page), $to = $from + 20; $sql = "select.... from... where ... LIMIT $from,$to";

Regards,

Jean

> OK I know how to search for data in database but what to do with data I > found ? Let's say I found 44 records with keyword "bond" and I want to show > 10 links per page, with next, previous buttons and "This link is 16 of 44" > message. Something like all search engines do (Yahoo, Altavista, Google > etc.) How to do it ? Should I store found records in temp table or a file ? > When should I delete temp table, file ? I am looking forward your comments.

attached mail follows:


I am not running apache. I am running fhttpd. I couldn't get the below function to work in the way I want in fhttpd: header("Location: http://www.php.net");

Is there anyother way I can do file redirection in fhttpd?

10x Deepak

________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

attached mail follows:


I just spoke to the isp and I think I know why the code was failing in this instance, but not how to trap the problem.

Apparently, the mysql server was overloaded with a runaway cgi script. So the mysql_connect call was not completing causing the script to time out. Is there a way to catch this? Can I tell php that if the mysql_connect doesn't fail/succeed in x seconds, the code should skip it and move on?

Kathleen

attached mail follows:


hello, I am tryin gto do a simple connect to a sybase server but get a error........ "Warning: 0 is not a Sybase link index in /home/httpd/html/testcon.php3 on line 10"

<HTML><BODY> <?php $host="DEVSRV"; $user="viewer"; $password="pipe"; sybase_connect($host,$user,$password); sybase_select_db("SANITY"); $sqltxt="SELECT * from DETAILS"; $result=sybase_query($sqltxt,$linkId); echo $result; ?> </BODY></HTML>

What am I doing wrong ?. I just want he results from the query stores in the var

$result !

D.T. ________________________________________________________________________

CONFIDENTIALITY This e-mail and any attachments are confidential and may also be privileged. If you are not the intended recipient(s) please note that any distribution, copying or use of this communication or the information in it is strictly prohibited.If you are not the named recipient(s), please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information in any medium.

> ************

attached mail follows:


> hello, > I am tryin gto do a simple connect to a sybase server but get a error........ > "Warning: 0 is not a Sybase link index in /home/httpd/html/testcon.php3 on line > 10" > > <HTML><BODY> > <?php > $host="DEVSRV"; > $user="viewer"; > $password="pipe"; > sybase_connect($host,$user,$password); > sybase_select_db("SANITY"); > $sqltxt="SELECT * from DETAILS"; > $result=sybase_query($sqltxt,$linkId); > echo $result; > ?> > </BODY></HTML> > > What am I doing wrong ?. I just want he results from the query stores in the var > $result !

What is that $linkId variable on your sybase_query line? You haven't defined that anywhere. Chances are you want:

$linkId = sybase_connect(...)

-Rasmus

attached mail follows:


Group:

I have been using php for the past 4 months and have come from the Cold Fusion Realm. I just finished my first website with php/mysql/apache and now onto my second application.

Here is my code that I have come up with and what I am trying to do, is to display the apache log file in a browser window that has each line in the log file on a new line of the browser. I understand that these log files can be very long, and want only to display the last 500 - 1000 lines of the file.

Any Ideas on where I can go with this?

<?php $NumberOfCharactersToDisplay = 500; if (!$ApacheErrorLogFopen = fopen ("/d1s0/apache/logs/error_log", "r-")) { Print ("Unable to open /d1s0/apache/logs/error_log"); }

if (!$ApacheErrorLogFile = file ("/d1s0/apache/logs/error_log")) { Print ("Unable to open /d1s0/apache/logs/error_log"); }

$ApacheErrorLogStartingPosition = filesize ("/d1s0/apache/logs/error_log") - $NumberOfCharactersToDisplay; $ApacheErrorLogSeekFopen = fseek ( $ApacheErrorLogFopen, $ApacheErrorLogStartingPosition); $ApacheErrorLogPositionFopen = ftell($ApacheErrorLogFopen); $DisplayApacheErrorLogTestFopen = fpassthru($ApacheErrorLogFopen);

$ApacheErrorLogSeekFile = fseek ($ApacheErrorLogFile, $ApacheErrorLogStartingPosition);

// $DisplayApacheErrorLog = fread ($ApacheErrorLog, $NumberOfCharactersToDisplay);

Print ("<BR>Apache Error Log Value: $ApacheErrorLog"); Print ("<BR>ApacheErrorLogStartingPosition Value: $ApacheErrorLogStartingPosition"); Print ("<BR>ApacheErrorLogSeek: $ApacheErrorLogSeek"); Print ("<BR>ApacheErrorLogPosition: $ApacheErrorLogPosition");

Print ("<BR>$DisplayApacheErrorLogTest");

--
Get Paid to Surf the Net -- The Rules have changed
http://www.alladvantage.com/home.asp?refid=EOW694

================================================================ Graham Pearson, Technology Support Center Supervisor Northern Indiana Educational Services Center http://support.niesc.k12.in.us Voice (219) 254-0111 Fax: (219) 254-0148

Email: gpearsonsupport.niesc.k12.in.us

attached mail follows:


Personally I'd just do:

<PRE> <?system("tail -500 /apache/logs/error_log")?> </PRE>

-Rasmus

On Mon, 22 May 2000, Graham Pearson wrote:

> Group: > > I have been using php for the past 4 months and have come from the Cold > Fusion Realm. I just finished my first website with php/mysql/apache and > now onto my second application. > > Here is my code that I have come up with and what I am trying to do, is to > display the apache log file in a browser window that has each line in the > log file on a new line of the browser. I understand that these log files > can be very long, and want only to display the last 500 - 1000 lines of the > file. > > Any Ideas on where I can go with this? > > > <?php > $NumberOfCharactersToDisplay = 500; > if (!$ApacheErrorLogFopen = fopen ("/d1s0/apache/logs/error_log", > "r-")) { > Print ("Unable to open /d1s0/apache/logs/error_log"); > } > > if (!$ApacheErrorLogFile = file ("/d1s0/apache/logs/error_log")) { > Print ("Unable to open /d1s0/apache/logs/error_log"); > } > > $ApacheErrorLogStartingPosition = filesize > ("/d1s0/apache/logs/error_log") - $NumberOfCharactersToDisplay; > $ApacheErrorLogSeekFopen = fseek ( $ApacheErrorLogFopen, > $ApacheErrorLogStartingPosition); > $ApacheErrorLogPositionFopen = ftell($ApacheErrorLogFopen); > $DisplayApacheErrorLogTestFopen = fpassthru($ApacheErrorLogFopen); > > $ApacheErrorLogSeekFile = fseek ($ApacheErrorLogFile, > $ApacheErrorLogStartingPosition); > > // $DisplayApacheErrorLog = fread ($ApacheErrorLog, > $NumberOfCharactersToDisplay); > > Print ("<BR>Apache Error Log Value: $ApacheErrorLog"); > Print ("<BR>ApacheErrorLogStartingPosition Value: > $ApacheErrorLogStartingPosition"); > Print ("<BR>ApacheErrorLogSeek: $ApacheErrorLogSeek"); > Print ("<BR>ApacheErrorLogPosition: $ApacheErrorLogPosition"); > > Print ("<BR>$DisplayApacheErrorLogTest"); > > > -- > Get Paid to Surf the Net -- The Rules have changed > http://www.alladvantage.com/home.asp?refid=EOW694 > > ================================================================ > Graham Pearson, Technology Support Center Supervisor > Northern Indiana Educational Services Center > http://support.niesc.k12.in.us Voice (219) 254-0111 Fax: (219) 254-0148 > > Email: gpearsonsupport.niesc.k12.in.us > > >

attached mail follows:


I am having troubles with session register not showing

The first file is a form that contains some login username and password and the second contains the session_start and the session_register but it does not appear in the third file as a variable. What might be the error here

The files look like this

<? PRINT" <HTML><BODY BGCOLOR=#FFFFFF> <table border=\"0\" bgcolor=\"#FFFFFF\" cellspacing=\"5\" > <tr> <td><b>Please Login Here:</b></td> </tr> <FORM action=\"include/login.php\" method=\"post\"> <TR><TD>User Name<TD>Password</TD></TR> <TR><TD><INPUT TYPE=\"text\" NAME=\"UserName\" SIZE=\"15\" MAXLENGTH=\"30\"></TD> <TD><INPUT TYPE=\"PASSWORD\" NAME=\"Password\" SIZE=\"15\" MAXLENGTH=\"30\"></TD><TR> <TR><TD><INPUT TYPE=\"submit\" VALUE=\"Login!\"> </FORM> </TABLE></BODY></HTML>"; ?>

Then the second file, login.php looks like this <? session_start(); if ($UserName && $Password) { // make connection to database MYSQL_CONNECT("localhost", "$UserName", "$Password") OR DIE("Unable to connect to database"); // select the database mysql_select_db("mysql") OR DIE ("Unable to select database"); $res = mysql_query("SELECT User FROM user WHERE User='$UserName' AND password='$Password'"); if(mysql_num_rows($res) != 0) { $verified_user = $UserName; session_register("verified_user"); } } Header( "Location: useradmin.php"); ?>

And the third file useradmin.php is where it should be printed

<? session_start(); PRINT" <HTML><BODY BGCOLOR=#FFFFFF> <H3>Welcome $verified_user</H3> </TABLE></BODY></HTML>"; ?>

All suggestions kindly recieved

Kevin

attached mail follows:


At a glance it seems as you're not passing on the session ID to the next script. Or are you using transparent SID's?

Add this to all the scripts to see if they are using the same SID: echo "<p>SID: ".session_id();

If the SID's aren't identical, it won't work.

HTH.

Best regards, Martin Edelius

Spirex Digital Design -------------------------------- www: http://www.spirex.se Mail: martin.edeliusspirex.se Phone: +46-31-514651, 0708-113711 Fax: +46-31-514331 Aröds Industriväg 3c S-422 43 Hisings Backa -------------------------------- If I haven't got back to you or done what I'm supposed to, let me know again as I have too much to do for my own good...

----- Original Message ----- From: "Kevin Waterson" <kevinkevin.oceania.net> To: <php3lists.php.net> Sent: Monday, May 22, 2000 5:28 AM Subject: [PHP3] session_register

> I am having troubles with session register not showing > > The first file is a form that contains some login username and password > and the second contains the session_start and the session_register but > it does not appear in the third file as a variable. What might be the error here > > The files look like this > > <? > PRINT" > <HTML><BODY BGCOLOR=#FFFFFF> > <table border=\"0\" bgcolor=\"#FFFFFF\" cellspacing=\"5\" > > <tr> > <td><b>Please Login Here:</b></td> > </tr> > <FORM action=\"include/login.php\" method=\"post\"> > <TR><TD>User Name<TD>Password</TD></TR> > <TR><TD><INPUT TYPE=\"text\" NAME=\"UserName\" SIZE=\"15\" MAXLENGTH=\"30\"></TD> > <TD><INPUT TYPE=\"PASSWORD\" NAME=\"Password\" SIZE=\"15\" > MAXLENGTH=\"30\"></TD><TR> > <TR><TD><INPUT TYPE=\"submit\" VALUE=\"Login!\"> > </FORM> > </TABLE></BODY></HTML>"; > ?> > > Then the second file, login.php looks like this > <? > session_start(); > if ($UserName && $Password) { > // make connection to database > MYSQL_CONNECT("localhost", "$UserName", "$Password") OR DIE("Unable to > connect to database"); > // select the database > mysql_select_db("mysql") OR DIE ("Unable to select database"); > $res = mysql_query("SELECT User FROM user WHERE User='$UserName' AND > password='$Password'"); > if(mysql_num_rows($res) != 0) { > $verified_user = $UserName; > session_register("verified_user"); > } > } > Header( "Location: useradmin.php"); > ?> > > > And the third file useradmin.php is where it should be printed > > <? > session_start(); > PRINT" > <HTML><BODY BGCOLOR=#FFFFFF> > <H3>Welcome $verified_user</H3> > </TABLE></BODY></HTML>"; > ?> > > All suggestions kindly recieved > > Kevin > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

attached mail follows:


To all,

I am new to PHP and am having trouble getting shell commands exec, passthru and system to work. My Webserver is running NT 4.0 and IIS 4.0. I have followed all the directions concerning proper installation of version 4.0 and have liberally set IIS permissions to ensure that this wasn’t the problem.

The script is trivial:

<HTML>

<HEAD> <TITLE>Run of My First PHP Test Program</TITLE> </HEAD>

<BODY>

<? system("dir c:\\"); ?>

</BODY>

</HTML>

The error that is returned is

Warning: Unable to fork [dir c:\] in C:\Inetpub\wwwroot\mjg\test1.php on line 10

This same script executed properly on a Linux Webserver. In addition, the NT Webserver executes other PHP scripts not containing shell commands.

Any clues?

Rgds

mjg (grazmulticastisp.com)

attached mail follows:


Hello,

I am having problems with the following PHP code. I input data via form and it is posted to this page. This page calculates some of the data and the inserts it into a MySQL database. The problem is that $temp_one is always coming out as a value of 2 no matter what the others are.

Any ideas?

Here is the code.

//-------------------- //Variables to be set //-------------------- $host = "localhost"; $username = ""; $password = ""; $db_name = ""; $table_to_use = "nash"; $admin_table = "nash_admin"; //----------------------------- //Setup Connection to Database //----------------------------- $db = mysql_connect($host, $username) or die("Unable to connect to database"); mysql_select_db($db_name, $db) or die("Unable to select database"); //---------------------------------- //First calculate appropriate fields //---------------------------------- $avg_sp = $revenue/$gallons; $temp_one = mysql_query("SELECT admin_cyls FROM nash_admin WHERE id='1'", $db); echo "admin gallons1: $temp_one "; $cost_sales = $gallons*$temp_one; echo "admin gallons2: $temp_one "; $gross_profit = $revenue+$other_income-$cost_sales; $temp_two = mysql_query("SELECT admin_daily_goal FROM nash_admin WHERE id='1'", $db); $daily_goal = $temp_two+gross_profit; //---------------------------------------------------------- //Print Out Variables Entered into Database for Verification //---------------------------------------------------------- echo "Avg_Sp: $avg_sp "; echo "Gross Profit: $gross_profit "; echo "Daily Goal: $daily_goal "; echo "Deposit: $act_deposit "; echo "Cyls: $cyls "; echo "Gallons: $gallons "; echo "Revenue: $revenue "; echo "Other Income: $other_income "; echo "Cost Sales: $cost_sales "; echo "Admin Gallons: $temp_one "; //----------------------- //Now put data into table //----------------------- $sql = "INSERT INTO $table_to_use (date,act_deposits,cyls,gallons,revenue,avg_sp,other_income,cost_sales,gross_profit,daily_goal) VALUES ('$date','$act_deposits','cyls','gallons','revenue','avg_sp','other_income','cost_sales','gross_profit','daily_goal')"; $result = mysql_query($sql); print ("Thank you! The daily information has been successfully entered.\n"); print ("Continue\n"); mysql_close(); ?>

________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

attached mail follows:


I have made this script:

<?php header("Content type: image/gif"); $image=imagecreate(200,200);

$colorRed=imagecolorallocate($image, 255, 0, 0); imagefill($image, 0, 0, $colorRed);

$colorBlack=imagecolorallocate($image, 0, 0, 0); imagestringup($image, 4, 10, 150, "Hello World!", $colorBlack);

imagegif($image); ?>

the browser send me this error:

Fatal error: Call to unsupported or undefined function imagegif() in C:\www\intranet.tomato.it\progetti\test\hs~testo.php3 on line 11

Is it possible that only imagegif() is unsupported????

My system work under Windows NT - Php3 - ISS4

Some ideas??

Thanks in advance

See ya

Dave

attached mail follows:


Hi. I have Slackware 7 of which I installed Apache 1.3.12, MySQL 3.22.32, and PHP 3.0.16. Since I'm new to this three packages I created a small "test.php3" with the following contents:

<html> <body>

<?php $myvar = "Hello World"; echo $myvar; ?>

</body> </html>

Last night this code was working and I can view it in lynx and Netscape. Today it only shows the above code whenever I open "test.php3" from both browsers. If I view the page source I can see the code loaded alright. What am I doing wrong here?

attached mail follows:


Looks like your code is not being parsed by PHP. Did you change anything in httpd.conf? There should be a line for the php3 file extension, as in

AddType application/x-httpd-php3 .php3

or even, if you want to send everything through the parser (which may be convenient -provided you don't need to squeeze every last bit of performance out of your apache server, since this is not optimal from a performance point of view):

AddType application/x-httpd-php3 .html

Cheers Frank

--
                frank joerdens

joerdens new media e: frankjoerdens.de heinrich-roller str. 16/17 t: +49 30 44055471 10405 berlin f: +49 30 44055475 germany h: http://www.joerdens.de ----- Original Message ----- From: "Rino Mardo" <dotslashlinif.org> To: <php3lists.php.net> Sent: Monday, May 22, 2000 5:05 PM Subject: [PHP3] Now you see, now you don't

> Hi. I have Slackware 7 of which I installed Apache 1.3.12, MySQL > 3.22.32, and PHP 3.0.16. Since I'm new to this three packages I created > a small "test.php3" with the following contents: > > <html> > <body> > > <?php > $myvar = "Hello World"; > echo $myvar; > ?> > > </body> > </html> > > > Last night this code was working and I can view it in lynx and > Netscape. Today it only shows the above code whenever I open > "test.php3" from both browsers. If I view the page source I can see the > code loaded alright. What am I doing wrong here? > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


Basically, the only way I know how to submit form is by using an ugly button or an image. I would like to submit a form using a plain old anchored hyperlink.

Is this possible?

-Eric Wood

attached mail follows:


Hi Eric, if you don't mind using javascript than yes, it's possible with href="javascript:document.YourFormName.submit();"

Pavel

----- Original Message ----- From: "Eric Wood" <ericinterplas.com> To: <php3lists.php.net> Sent: Monday, May 22, 2000 5:20 PM Subject: [PHP3] how to make a anchor link be a submit?

> Basically, the only way I know how to submit form is by using an ugly > button > or an image. I would like to submit a form using a plain old anchored > hyperlink. > > Is this possible? > > -Eric Wood > > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: > http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net >

attached mail follows:


On Mon, 22 May 2000, Eric Wood wrote:

> Basically, the only way I know how to submit form is by using an ugly button > or an image. I would like to submit a form using a plain old anchored > hyperlink. > > Is this possible?

With just html? Nope. You -might- be able to cobble some messy JavaScript together that could build up a URL string from form values, but I don't have enough JavaScript to even begin to know how that'd work.

Matt

attached mail follows:


<a href="javascript:document.formname.submit()">Submit Me</a>

You'd need to replace formname with the name of your form or its index in the forms[] array

Rossi Designs PO Box 1084 Holly Hill, FL 32125-1084 Phone : (904) 226-8979 URL : http://rossidesigns.net ----- Original Message ----- From: Eric Wood <ericinterplas.com> To: <php3lists.php.net> Sent: Monday, May 22, 2000 11:20 AM Subject: [PHP3] how to make a anchor link be a submit?

| Basically, the only way I know how to submit form is by using an ugly button | or an image. I would like to submit a form using a plain old anchored | hyperlink. | | Is this possible? | | -Eric Wood | | | -- | PHP 3 Mailing List <http://www.php.net/> | To unsubscribe, send an empty message to php3-unsubscribelists.php.net | To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net | To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 | To contact the list administrators, e-mail: php-list-adminlists.php.net | |

attached mail follows:


You probably want this:

$allowed = ( "www.somehost.com" => 1, "another.host" => 1);

if ($allowed[$thishost]) { print "YES"; } else { print "NO"; }

It should be done much the same way in perl. Let the language take care of looking through the array for you. It can do it faster. :-)

-Greg

Kaspars wrote:

> Hello! > > I) > > I want to port some script from > perl to PHP but have some difficulties. > I dont know how to realise these lines > in PHP: > > -------------(PERLSCRIPTSTARTSHERE)----------- > #!/whatever/to/perl > > print "Content-type: text/html\n\n"; > > $from = $ENV{'HTTP_REFERER'}; > > allowed = ('www.somehost.net', 'www.some.anotherhost.net'); > > foreach $element (allowed) { > next unless ($from =~ $element); > print "YES!\n"; > } > print "NO!\n"; > } > -------------(PERLSCRIPTSTARTSHERE)----------- > > Idea is: If HTTP_REFERER does not contain anything that is > in allowed, it prints "NO". > > Of course script is snipped as possible. :) > > II) > Question about ereg(); > > How this perl line looks in PHP: > if ($string =~ /[\/[..]\#]/) { blablabla(); ) > > 10x > ,---------- -- --- - - - - - > | Kaspars (housemt.lv) > | MSG: http://www.mt.lv/~house > | Webmastering www.mikrotik.com > `---------------- ------- --- - --- -- -- -- - - -- - > > -- > PHP 3 Mailing List <http://www.php.net/> > To unsubscribe, send an empty message to php3-unsubscribelists.php.net > To subscribe to the digest, e-mail: php3-digest-subscribelists.php.net > To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 > To contact the list administrators, e-mail: php-list-adminlists.php.net

attached mail follows:


I am not running apache. I am running fhttpd. I couldn't get the below function to work in fhttpd in the same way it works in apache : header("Location: http://www.php.net");

Is there anyother way I can do URL redirection in fhttpd?

10x Deepak

________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com