php-general Digest 13 Apr 2001 02:13:07 -0000 Issue 624
Topics (messages 48299 through 48387):
Re: Creating Arrays
48299 by: Rodney J. Woodruff
48358 by: Jeffrey Greer
48359 by: Jeffrey Greer
Re: www.php.net - gateway timeout?
48300 by: Plutarck
48302 by: maatt
48305 by: Plutarck
Re: Editors ... calling them, or PHP-based one?
48301 by: maatt
48307 by: Dezider G�ra
48312 by: Plutarck
Geeklog or phpSlash?
48303 by: Charlie Llewellin
48331 by: Charlie Llewellin
48341 by: Altunergil, Oktay
48346 by: Charlie Llewellin
sending mail.. PLEASE HELP!
48304 by: Jude Sanglitan
48308 by: Plutarck
48309 by: Data Driven Design
48310 by: Jude Sanglitan
48314 by: Jude Sanglitan
48316 by: Michael Hall
48317 by: Jude Sanglitan
48318 by: Tobias Talltorp
Easy News Script
48306 by: Zeus
48340 by: Chris Anderson
48383 by: Zeus
Re: syntax
48311 by: Renze Munnik
Re: .htpasswd encryption
48313 by: Ryan Hilton
Re: Editors ... calling them, or PHP-based one? (doh!)
48315 by: Plutarck
48329 by: Dezider G�ra
HTTP_POST_VARS
48319 by: Mat Marlow
48320 by: Dominick Vansevenant
48335 by: Plutarck
48361 by: Steve Edberg
Re:Passing Parameter
48321 by: Miguel Loureiro
48322 by: Miguel Loureiro
What is Dynamic Library support
48323 by: Jennifer
Error Handling class
48324 by: Boget, Chris
48328 by: Taylor, Stewart
Re: foreach vs. while(list() = each())
48325 by: Maxim Derkachev
48327 by: Tim Ward
48333 by: Philip Olson
Re: Updating a value in a session
48326 by: Tim Ward
Re: Loop issue
48330 by: Chris Lee
Re: $8 PHP hosting from Jeffrey Greer
48332 by: Kurth Bemis
passthru Problems
48334 by: Jason Mowat
48339 by: Krznaric Michael
48353 by: Jason Mowat
48357 by: Morgan Curley
Do any of you provide hosting?
48336 by: Chris Anderson
48342 by: Matt McClanahan
48343 by: Lindsay Adams
48344 by: Chris Anderson
48350 by: Lindsay Adams
Newbie MySQL Table Work
48337 by: Chris Anderson
48338 by: Phillip Bow
Problem?
48345 by: Wee Chua
"show tables" in oracle 8-i
48347 by: Dennis Gearon
48349 by: Brian S. Dunworth
Need HOWTO on field-update code.
48348 by: Erin Quick-Laughlin
48351 by: Lindsay Adams
48352 by: Philip Olson
Re: mail function????
48354 by: Terence Truong
resultset array
48355 by: Mike
48356 by: Mark Maggelet
Re: Newsgroups like this one?
48360 by: John R.Marshall
48386 by: Alvin Tan
Sr. PHP Developer Needed
48362 by: Marcin Miszczak
form validation
48363 by: george
48365 by: Morgan Curley
48366 by: george
Re: HELP! URGENT Upload file issue
48364 by: g0thic
Problem Reading session files
48367 by: Schulz, Evan
48371 by: Tobias Talltorp
no reponse -- Need FTP help
48368 by: David Minor
48374 by: SED
48384 by: Lindsay Adams
preg question
48369 by: Michael Geier
48370 by: mark.amtmedia.com
is_null
48372 by: Jennifer
48377 by: Yasuo Ohgaki
What variable are being sent to my script?
48373 by: Brandon Orther
48375 by: Ashley M. Kirchner
Re: Delivery Notification: Delivery has failed]
48376 by: Ashley M. Kirchner
Writing... But the permission is denied!
48378 by: Richard
48381 by: Michael A. Peters
48382 by: Richard
stdin/stderr
48379 by: Jake Fan
webdav and php howto
48380 by: Michael A. Peters
Upcoming PHP training course
48385 by: Michael Kimsal
ROUND inconsistency
48387 by: Lee Howard
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
Do you understand the options that the other people have explained?
-- Rodney
"Ashley M. Kirchner" wrote:
> "Rodney J. Woodruff" wrote:
>
> > http://www.php.net/manual/en/function.msql-fetch-array.php
>
> Okay, call me dense. I can't figure this out. This is what I'm trying to
> do:
>
> $sql = "select p_id, project from proj where uid=$uid";
> $result = mysql_db_query($database,$sql);
>
> (the resulting table in mysql is as follows:
> +------+-----------+
> | p_id | project |
> +------+-----------+
> | 0 | Undefined |
> | 1 | Work |
> | 2 | Personal |
> +------+-----------+
> 3 rows in set (0.00 sec)
>
> ...yes, that 'Undefined' IS a valid project, and the p_id's don't
> necessarily start at 0 either.)
>
> I need that result into the following:
> $items = array(0 => "Undefined", 1 => "Work", 2 => "Personal");
>
> Reason is, I pass that $items variable to the following function:
>
> function MakeSelect($items, $selected) {
> $str = "";
> while(list($value, $name) = each($items)) {
> $str .= "<option value=\"$value\"" . ($value != $selected ? \
> ">" : " selected>") . "$name\n";
> }
> return $str;
> }
>
> ...which then creates (assuming the person had 'Work' previously
> selected):
>
> <select name=whatever_i_specify>
> <option value="0">Undefined
> <option value="1" selected>Work
> <option value="2">Personal
> </select>
>
> How do I create that $items array?
>
> AMK4
>
> --
> W |
> | I haven't lost my mind; it's backed up on tape somewhere.
> |____________________________________________________________________
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
> SysAdmin / Websmith . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . eFax 248.671.0909
> http://www.pcraft.com . 3550 Arapahoe Ave #6
> .................. . . . . Boulder, CO 80303, USA
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
[posted and emailed]
If you're looking for a simple way to work with databases I would use
phplib. Phplib is a db abstraction layer which supports over a dozen
databases including mysql. You can get the libraries at
http://phplib.netuse.de/download/phplib-7.2c.tar.gz You will need to
use "db_mysql.inc"
I think using mysql specific functions is bad programming. Database
specific calls should be abstracted out whenever possible.
To do something like you would want to do you would use code like
this:
// create the db object
$db = new DB_Sql;
// initialize db parameters
$this->Host = <your host>;
$this->Database = <db>;
$this->User = <user name>;
$this->Password = <password>;
// E.g. make a simple query
$db->query("select username, uid, security_level from access where
username='$f_username' and password='$f_password';");
$db->next_record();
$db_username = $db->f("username");
$si_userid = (int)($db->f("uid"));
$si_security_level = (int)($db->f("security_level"));
// putting the values in an array is trivial, but you should do it
like this
// or you will confuse your numeric ids with the ids that php
puts in an array automatically
$my_array["username"] = $db_username;
$my_array["userid"] = $si_userid;
On 11 Apr 2001 09:09:09 -0700, [EMAIL PROTECTED] ("Ashley M.
Kirchner") wrote:
>
> I need to convert an MySQL result into an Array...somehow. The
>query returns the following:
>
> +----+-----------+
> | ID | Project |
> +----+-----------+
> | 1 | Home |
> | 2 | Work |
> | 3 | Family |
> | 4 | Misc. |
> | . | ... |
> | . | ... |
> +----+-----------+
>
> ...which I want to convert into:
>
>Array(1 => "Home", 2 => "Work", 3 => "Family", 4 => Misc.", etc....);
>
> What's the best way to do this.
>
> AMK4
>
>--
>W |
> | I haven't lost my mind; it's backed up on tape somewhere.
> |____________________________________________________________________
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
> SysAdmin / Websmith . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . eFax 248.671.0909
> http://www.pcraft.com . 3550 Arapahoe Ave #6
> .................. . . . . Boulder, CO 80303, USA
--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- I do web hosting and development. Details
at http://www.singlesconnection.org/services/
[posted and emailed]
On 12 Apr 2001 12:48:52 -0700, [EMAIL PROTECTED] (Jeffrey
Greer) wrote:
>
>// putting the values in an array is trivial, but you should do it
>like this
>// or you will confuse your numeric ids with the ids that php
>puts in an array automatically
Whoops. I was wrong about array. Keys are only filled in
automatically if you do this:
$my_array[] = 'some value';
now $my_array[0] = 'some value';
>--
>Jeff Greer
>- B.S. computer science - Univ. MO - Rolla
>- I do web hosting and development. Details
> at http://www.singlesconnection.org/services/
--
Jeff Greer
- B.S. computer science - Univ. MO - Rolla
- I do web hosting and development. Details
at http://www.singlesconnection.org/services/
I ran a few tracers and it seems that the server php.net is on is the
problem.
My packets are fine all the way along till final hop 13, which seems to be
located in Rochester NY, on the network of Choice One Communications, IP
208.247.106.187, running Apache/1.3.12 (Unix) DAV/0.9.18-dev PHP/4.0.5-dev.
The site loads fine now, but last time I did it it was all being rejected on
that hop. The server was refusing packets.
Maybe they are having problems with their server lately? It's been really
sporatic, so I switched my links to use us.php.net...annoying ;(
--
Plutarck
Should be working on something...
...but forgot what it was.
""maatt"" <[EMAIL PROTECTED]> wrote in message
9b4ahg$q9v$[EMAIL PROTECTED]">news:9b4ahg$q9v$[EMAIL PROTECTED]...
> Anyone else having probs getting through? Or is it just me? Been trying
> since the wee hours (GMT).
>
> --
> Matt Kynaston
> remove the green eggs before replying
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> 208.247.106.187, running Apache/1.3.12 (Unix) DAV/0.9.18-dev
PHP/4.0.5-dev.
Dearly hope it's not 4.0.5-dev that's the prob! Been wanting to try it,
which is why I can't use uk.php.net!
> The site loads fine now, but last time I did it it was all being rejected
on
> that hop. The server was refusing packets.
Yup, fine for me too.
Matt
> Dearly hope it's not 4.0.5-dev that's the prob! Been wanting to try it,
> which is why I can't use uk.php.net!
LOL! That's exactly what I was thinking...hehe.
Maybe the people in charge just got back from apachecon, and figured out
what was wrong? Or maybe just getting back from apachecon was what was
wrong? ;)
--
Plutarck
Should be working on something...
...but forgot what it was.
""maatt"" <[EMAIL PROTECTED]> wrote in message
9b4cbu$hdt$[EMAIL PROTECTED]">news:9b4cbu$hdt$[EMAIL PROTECTED]...
> > 208.247.106.187, running Apache/1.3.12 (Unix) DAV/0.9.18-dev
> PHP/4.0.5-dev.
>
> Dearly hope it's not 4.0.5-dev that's the prob! Been wanting to try it,
> which is why I can't use uk.php.net!
>
> > The site loads fine now, but last time I did it it was all being
rejected
> on
> > that hop. The server was refusing packets.
>
> Yup, fine for me too.
>
> Matt
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
What you're trying to do sounds a lot like content management. I'm no
expert, but you should be able to do all this through the browser serverside
(no need to download/upload). Have you checked out www.midgard-project.org,
www.dotvoid.com/firesite.php, or http://phpwebsite.appstate.edu/?
Matt
"The Hermit Hacker" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Sorry for vague subject, only so many things you can put in there ...
>
> I'm looking for someone way, in PHP4, to take a "form/template" for a
> letter on the server side, pass it to the client, let them edit it
> (including markup tags like bold and underline) and then pass it back to
> the server ...
>
> It has to be relatively transparent to the end user ... I don't want to
> have to teach them to put <B></B> tags around where they want bold ...
>
> I'm not particular on editor ... right now, if I have to force the client
> to install StarOffice for commonality across platforms, I'll do that and
> expand from that ... but some way of 'click here, download doc to
> computer, open up file with <insert editor of choice>, save back to server
> (if possible)' ...
>
> Ideas?
>
> thanks ...
>
> Marc G. Fournier ICQ#7615664 IRC Nick:
Scrappy
> Systems Administrator @ hub.org
> primary: [EMAIL PROTECTED] secondary:
scrappy@{freebsd|postgresql}.org
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Thinking about this, about a week ago, there was a discussion about parsing word
document. Just to dig the text from doc. It sounds interesting, and since I have
in my crazy mind an idea, that I'd create a database of all documents that were
ever created in our company and put them in to the database, I'd also need to
know what's in those docs. So I followed the given link and it seems to be
pretty easy. Just install a program and pass it a document and it will parse the
text. The link is:
http://wvware.sourceforge.net/
Check out the site, may be you could find something similiar for rtf documents,
'cause I think its format is much easier to "crack".
hth
Dezider.
Plutarck wrote:
> Ick...I'd say it's a good idea, but it's going to be a bi...tter fight with
> technology.
>
> First, you have to have some application do the loading/unloading. PHP can't
> do that, of course.
>
> But, you could use some form of java...but you'd have to get fancy. Or you
> could just use file upload in a form, which is easier.
>
> If you do that, you need only parse out the file.
>
> The best way to do that is pick a text format that does what you want it to
> do, and is universal across platforms. You don't even need to worry about
> the editor they use, as long as it's saved in the proper format.
>
> I reccomend you use either a word document, or perhaps Rich Text Format is
> best (rtf).
>
> Then you just have to figure out how text is saved in that format, and
> viola. You just use PHP to go from there...
>
> ....I'm sure it's easier said than done, and I have absolutely no clue how
> the content of rtf files is different from txt (but I'd love to know!), but
> I can see it being very possible if you pick only a few standard file
> formats, and use the file upload features.
>
> It's actually a very good idea. I'm surprised no one has done it...which
> should probably worry you ;)
>
> --
> Plutarck
> Should be working on something...
> ....but forgot what it was.
Jackpot! Cha-ching!
That site triggered my memory!
I remember downloading a program from some obscure site which was suppose to
be able to view a huge amount of files which are most often used in games. I
wanted to see the art :)
Anyhoo, it reminded me of another site which is linked on that website,
which is:
http://www.wotsit.org/
*dances*
For the RTF:
http://www.wotsit.org/search.asp?page=3&s=text
Oooo I'm soo happy...toys toys toys! So many wonderful bits and bytes to
play with now...
--
Plutarck
Should be working on something...
...but forgot what it was.
"Dezider G�ra" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Thinking about this, about a week ago, there was a discussion about
parsing word
> document. Just to dig the text from doc. It sounds interesting, and since
I have
> in my crazy mind an idea, that I'd create a database of all documents that
were
> ever created in our company and put them in to the database, I'd also need
to
> know what's in those docs. So I followed the given link and it seems to be
> pretty easy. Just install a program and pass it a document and it will
parse the
> text. The link is:
> http://wvware.sourceforge.net/
> Check out the site, may be you could find something similiar for rtf
documents,
> 'cause I think its format is much easier to "crack".
>
> hth
> Dezider.
>
> Plutarck wrote:
>
> > Ick...I'd say it's a good idea, but it's going to be a bi...tter fight
with
> > technology.
> >
> > First, you have to have some application do the loading/unloading. PHP
can't
> > do that, of course.
> >
> > But, you could use some form of java...but you'd have to get fancy. Or
you
> > could just use file upload in a form, which is easier.
> >
> > If you do that, you need only parse out the file.
> >
> > The best way to do that is pick a text format that does what you want it
to
> > do, and is universal across platforms. You don't even need to worry
about
> > the editor they use, as long as it's saved in the proper format.
> >
> > I reccomend you use either a word document, or perhaps Rich Text Format
is
> > best (rtf).
> >
> > Then you just have to figure out how text is saved in that format, and
> > viola. You just use PHP to go from there...
> >
> > ....I'm sure it's easier said than done, and I have absolutely no clue
how
> > the content of rtf files is different from txt (but I'd love to know!),
but
> > I can see it being very possible if you pick only a few standard file
> > formats, and use the file upload features.
> >
> > It's actually a very good idea. I'm surprised no one has done it...which
> > should probably worry you ;)
> >
> > --
> > Plutarck
> > Should be working on something...
> > ....but forgot what it was.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
I'm setting up a slashdot style site using PHP, and am looking for
recommendations for ready-to-use packages, such as geeklog and PhpSlash. Has
anybody used either of these, got any comments, or suggestions for other
software.
TIA,
Charlie
Yes, this looks very good, thanks for the recommendation
----- Original Message -----
> phpnuke would be my recommendation
>
> www.phpnuke.org
>
Do you still need to create a seperate database for phpnuke or did they add
functionality to customize the table names.?
oktay
-----Original Message-----
From: Charlie Llewellin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 2:27 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Geeklog or phpSlash?
Yes, this looks very good, thanks for the recommendation
----- Original Message -----
> phpnuke would be my recommendation
>
> www.phpnuke.org
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
By the way, I am having problems with the javascripts that are enabled by
default with PHPNuke..
I'm going to disable them for now until I can figure out what is wrong.
Charlie
If I was to send mail could I possibly send it using mail() function or I
need to setup some things to make it work properly? Everytime I run my PHP
script, it always gives me an Error: Failed to Connect to
c:\inetpub\wwwroot\ and it was pointing to my mail() function.
I just followed what the book says and I guess there is a part of it that I
missed or whatever. Could someone help me? Thanks!!!
Jithy
You need to alter your php.ini file in the mail section to point the proper
path to sendmail, and you need some form of sendmail there for PHP to point
to in the first place!
So there's no just calling mail() without setting stuff up.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Jude Sanglitan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> If I was to send mail could I possibly send it using mail() function or I
> need to setup some things to make it work properly? Everytime I run my PHP
> script, it always gives me an Error: Failed to Connect to
> c:\inetpub\wwwroot\ and it was pointing to my mail() function.
>
> I just followed what the book says and I guess there is a part of it that
I
> missed or whatever. Could someone help me? Thanks!!!
>
>
> Jithy
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
I couldn't get it to work by changing php.ini either, I guess my isp mail
server wouldn't relay. I downloaded a mailserver from www.tnsoft.com , its
not free but it is an option if you get too frustrated trying to make it
work.
Data Driven Design
P.O. Box 1084
Holly Hill, Florida 32125-1084
http://www.datadrivendesign.com
http://www.rossidesigns.net
----- Original Message -----
From: Jude Sanglitan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 10:16 AM
Subject: [PHP] sending mail.. PLEASE HELP!
>
> If I was to send mail could I possibly send it using mail() function or I
> need to setup some things to make it work properly? Everytime I run my PHP
> script, it always gives me an Error: Failed to Connect to
> c:\inetpub\wwwroot\ and it was pointing to my mail() function.
>
> I just followed what the book says and I guess there is a part of it that
I
> missed or whatever. Could someone help me? Thanks!!!
>
>
> Jithy
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
Hi thanks!!!
I should've change my SMTP first.. geezz!! That makes me 10 times smarter
than before.
It is working now.! Thanks a lot!
-----Original Message-----
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 10:12 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] sending mail.. PLEASE HELP!
You need to alter your php.ini file in the mail section to point the proper
path to sendmail, and you need some form of sendmail there for PHP to point
to in the first place!
So there's no just calling mail() without setting stuff up.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Jude Sanglitan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> If I was to send mail could I possibly send it using mail() function or I
> need to setup some things to make it work properly? Everytime I run my PHP
> script, it always gives me an Error: Failed to Connect to
> c:\inetpub\wwwroot\ and it was pointing to my mail() function.
>
> I just followed what the book says and I guess there is a part of it that
I
> missed or whatever. Could someone help me? Thanks!!!
>
>
> Jithy
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Oops! How can I prevent this?
Fatal error: Maximum execution time of 30 seconds exceeded in
C:\Inetpub\wwwroot\TFC Survey Form\mailform.php on line 17
-JS
Are you doing a bulk mail out or something like that?
Your script is timing out. The max_execution_time can be changed in
php.ini
Mick
On Thu, 12 Apr 2001, Jude Sanglitan wrote:
> Oops! How can I prevent this?
>
> Fatal error: Maximum execution time of 30 seconds exceeded in
> C:\Inetpub\wwwroot\TFC Survey Form\mailform.php on line 17
>
>
> -JS
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
It might be a time-out but can I avoid this message by writing an Error
handler to my PHP script? f it is possible, how? Thanks
-----Original Message-----
From: Michael Hall [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 9:05 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] sending mail.. PLEASE HELP!
Are you doing a bulk mail out or something like that?
Your script is timing out. The max_execution_time can be changed in
php.ini
Mick
On Thu, 12 Apr 2001, Jude Sanglitan wrote:
> Oops! How can I prevent this?
>
> Fatal error: Maximum execution time of 30 seconds exceeded in
> C:\Inetpub\wwwroot\TFC Survey Form\mailform.php on line 17
>
>
> -JS
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
Or just adding this to the top of the page that is taking forever to
process:
set_time_limit(60); // 60 seconds before timeout, change to more if you want
to
This way you don�t have to change the time limit for all of the pages.
// Tobias Talltorp
> Are you doing a bulk mail out or something like that?
> Your script is timing out. The max_execution_time can be changed in
> php.ini
>
> Mick
>
> On Thu, 12 Apr 2001, Jude Sanglitan wrote:
>
> > Oops! How can I prevent this?
> >
> > Fatal error: Maximum execution time of 30 seconds exceeded in
> > C:\Inetpub\wwwroot\TFC Survey Form\mailform.php on line 17
I'm sure many of you heard of newsphp ? (the newspro-clone).
Somehow I felt attached to it except that it doesn't use databases for its file
storing.
Does anyone know a good similar script (easy to setup) that uses mySQL?
I prefer to write my own
----- Original Message -----
From: "Zeus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 10:11 AM
Subject: [PHP] Easy News Script
I'm sure many of you heard of newsphp ? (the newspro-clone).
Somehow I felt attached to it except that it doesn't use databases for its
file storing.
Does anyone know a good similar script (easy to setup) that uses mySQL?
True but hehe I can't seem to do it witht he datetime thing.
I'm not sure how am I going to insert the date and time into the mySQL
database.
----- Original Message -----
From: Chris Anderson <[EMAIL PROTECTED]>
To: Zeus <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, 13 April, 2001 1:27 AM
Subject: Re: [PHP] Easy News Script
> I prefer to write my own
> ----- Original Message -----
> From: "Zeus" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, April 12, 2001 10:11 AM
> Subject: [PHP] Easy News Script
>
>
> I'm sure many of you heard of newsphp ? (the newspro-clone).
>
> Somehow I felt attached to it except that it doesn't use databases for its
> file storing.
>
> Does anyone know a good similar script (easy to setup) that uses mySQL?
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
elias wrote:
>
> Hey, i didn't write 'echo' in the origin but i just double-quoted what he
> wrote in the first place w/o even noticing the 'echo' ;)
Ehhh... this wasn't specifically addressed to you Elias. It was more
like a general wondering...
--
* R&zE:
***************************
** Renze Munnik
**
** E: [EMAIL PROTECTED]
** M: +31 6 218 111 43
***************************
Your can use the php crypt() function to encrypt the passwords in the
.htpasswd file
$newPwd = crypt( trim( $newPwd) ); // encrypt the new password
Brandon Orther wrote:
> Hello,
>
> I am trying to make a script that creates .htpasswd files. Does anyone
> know what encryption is used?
>
> Thanks
> Brandon
>
It can be crypt() or MD5 or SHA, you could call htpasswd.
See man htpasswd under *nix.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Well after looking at the file I just downloaded...the specification of RTF
is 164 pages long.
Good lord...*chokes an all the information*
Ever considered just forcing the people to learn HTML instead? *smile*
--
Plutarck
Should be working on something...
...but forgot what it was.
""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9b4e3u$eoj$[EMAIL PROTECTED]">news:9b4e3u$eoj$[EMAIL PROTECTED]...
> Jackpot! Cha-ching!
>
> That site triggered my memory!
>
> I remember downloading a program from some obscure site which was suppose
to
> be able to view a huge amount of files which are most often used in games.
I
> wanted to see the art :)
>
> Anyhoo, it reminded me of another site which is linked on that website,
> which is:
>
> http://www.wotsit.org/
>
> *dances*
>
> For the RTF:
>
> http://www.wotsit.org/search.asp?page=3&s=text
>
> Oooo I'm soo happy...toys toys toys! So many wonderful bits and bytes to
> play with now...
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
>
>
> "Dezider G�ra" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Thinking about this, about a week ago, there was a discussion about
> parsing word
> > document. Just to dig the text from doc. It sounds interesting, and
since
> I have
> > in my crazy mind an idea, that I'd create a database of all documents
that
> were
> > ever created in our company and put them in to the database, I'd also
need
> to
> > know what's in those docs. So I followed the given link and it seems to
be
> > pretty easy. Just install a program and pass it a document and it will
> parse the
> > text. The link is:
> > http://wvware.sourceforge.net/
> > Check out the site, may be you could find something similiar for rtf
> documents,
> > 'cause I think its format is much easier to "crack".
> >
> > hth
> > Dezider.
> >
> > Plutarck wrote:
> >
> > > Ick...I'd say it's a good idea, but it's going to be a bi...tter fight
> with
> > > technology.
> > >
> > > First, you have to have some application do the loading/unloading. PHP
> can't
> > > do that, of course.
> > >
> > > But, you could use some form of java...but you'd have to get fancy. Or
> you
> > > could just use file upload in a form, which is easier.
> > >
> > > If you do that, you need only parse out the file.
> > >
> > > The best way to do that is pick a text format that does what you want
it
> to
> > > do, and is universal across platforms. You don't even need to worry
> about
> > > the editor they use, as long as it's saved in the proper format.
> > >
> > > I reccomend you use either a word document, or perhaps Rich Text
Format
> is
> > > best (rtf).
> > >
> > > Then you just have to figure out how text is saved in that format, and
> > > viola. You just use PHP to go from there...
> > >
> > > ....I'm sure it's easier said than done, and I have absolutely no clue
> how
> > > the content of rtf files is different from txt (but I'd love to
know!),
> but
> > > I can see it being very possible if you pick only a few standard file
> > > formats, and use the file upload features.
> > >
> > > It's actually a very good idea. I'm surprised no one has done
it...which
> > > should probably worry you ;)
> > >
> > > --
> > > Plutarck
> > > Should be working on something...
> > > ....but forgot what it was.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Well, based on your previous post:
Plutarck wrote:
> Well after looking at the file I just downloaded...the specification of RTF
> is 164 pages long.
<quotation start>
Oooo I'm soo happy...toys toys toys! So many wonderful bits and bytes to
play with now...
<quotation stop>
you should change it to:
Oooo I'm soo happy...toys toys toys! So many wonderful PAGES and PAGES to
play with now...
D.
Hi all,
I'm having trouble retrieving data from $HTTP_POST_VARS. Whenever I try to
print something from it using print($HTTP_POST_VARS[0]); it just prints
"Array". And I know it works because I've done it once and can't do it
again!
Am I missing something glaringly obvious?
Thanks for the help,
Mat
PS. track_vars is ON!
Mat,
did you put in a reset?
reset($HTTP_POST_VARS);
D.
-----Original Message-----
From: Mat Marlow [mailto:[EMAIL PROTECTED]]
Sent: donderdag 12 april 2001 16:49
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP_POST_VARS
Hi all,
I'm having trouble retrieving data from $HTTP_POST_VARS. Whenever I try to
print something from it using print($HTTP_POST_VARS[0]); it just prints
"Array". And I know it works because I've done it once and can't do it
again!
Am I missing something glaringly obvious?
Thanks for the help,
Mat
PS. track_vars is ON!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Try doing a print_r in the place where you are trying to print data.
So you can see if a second dimension slipped in there, or if there is some
other problem.
I know that the post/get vars are always associative arrays, but I assume
refering to them by their numeric keys should work...don't see why it
wouldn't.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Mat Marlow"" <[EMAIL PROTECTED]> wrote in message
9b4f3s$3uo$[EMAIL PROTECTED]">news:9b4f3s$3uo$[EMAIL PROTECTED]...
> Hi all,
> I'm having trouble retrieving data from $HTTP_POST_VARS. Whenever I try to
> print something from it using print($HTTP_POST_VARS[0]); it just prints
> "Array". And I know it works because I've done it once and can't do it
> again!
> Am I missing something glaringly obvious?
>
> Thanks for the help,
>
> Mat
> PS. track_vars is ON!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
At 4:50 PM +0200 4/12/01, Dominick Vansevenant <[EMAIL PROTECTED]> wrote:
>Mat,
>
>did you put in a reset?
>
>reset($HTTP_POST_VARS);
>
>D.
Yes, you'll need the reset() there if you're looping through the
$HTTP_POST_VARS array more than once. However:
I take it that you were trying something like
echo $HTTP_POST_VARS[0];
? If so, you will indeed get the output 'array' if element 0 is an
array. As someone suggested, you can use the print_r() or var_dump()
functions (print_r, I think, is PHP4 only) to display it. You can
also do something like
...
if (is_array($HTTP_POST_VARS[0])) {
while (list($k,$v)=each($HTTP_POST_VARS[0])) {
echo '$HTTP_POST_VARS[0]', "[$k] = $v<br>";
}
} else {
echo '$HTTP_POST_VARS[0] = ', $HTTP_POST_VARS[0];
}
...
In PHP3, POST/GET elements could only be one dimensional arrays, at
most. In PHP4, though, these can have 2+ dimensions, so for maximum
generality you'd have to have somewhat more complex code than this.
-steve
>-----Original Message-----
>From: Mat Marlow [mailto:[EMAIL PROTECTED]]
>Sent: donderdag 12 april 2001 16:49
>To: [EMAIL PROTECTED]
>Subject: [PHP] HTTP_POST_VARS
>
>
>Hi all,
>I'm having trouble retrieving data from $HTTP_POST_VARS. Whenever I try to
>print something from it using print($HTTP_POST_VARS[0]); it just prints
>"Array". And I know it works because I've done it once and can't do it
>again!
>Am I missing something glaringly obvious?
>
>Thanks for the help,
>
>Mat
>PS. track_vars is ON!
>
--
+----------- 12 April 2001: Forty years of manned spaceflight -----------+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Computer Consultant |
| http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ |
+-------------------------- www.yurisnight.net --------------------------+
By my understanding what Jack said,the problem can be solved with something like this:
echo "<a href="namefrom.ext?part_no=".$partvalue."">"
and in nameform.ext you can use the partvalue...
Hope that help, if its not what you want, well, sorry, and good luck, and code
Best Regards
Miguel Loureiro <[EMAIL PROTECTED]>
By my understanding what Jack said,the problem can be solved with something like this:
echo "<a href="namefrom.ext?part_no=".$partvalue."">"
and in nameform.ext you can use the partvalue...
Hope that help, if its not what you want, well, sorry, and good luck, and code.
Best Regards
Miguel Loureiro <[EMAIL PROTECTED]>
When I do phpinfo() on my server one of the things it says is
PHP_DL
Dynamic Library support enabled.
What does that mean?
Jennifer
I've looked around but haven't really found one...
Does anyone know where I can find a class (or a
set of functions) that handles errors gracefully?
I'm about to write something to do this but would
rather not reinvent the wheel.
thnx,
Chris
the PEAR library has an error class
-Stewart.
-----Original Message-----
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: 12 April 2001 16:19
To: Php (E-mail)
Subject: [PHP] Error Handling class
I've looked around but haven't really found one...
Does anyone know where I can find a class (or a
set of functions) that handles errors gracefully?
I'm about to write something to do this but would
rather not reinvent the wheel.
thnx,
Chris
Hello Tim,
Thursday, April 12, 2001, 1:43:53 PM, you wrote:
TW> you can't nest foreach as you should be able to. Ecah foreach is supposed to
TW> have it's own pointer in the array, but it doesn't ... this is a known bug.
What do you mean? Foreach() can be nested, and it works perfect.
<?php
$a = array (array (1, 2, 3), array(4,5,6), array(7,8,9));
foreach ($a as $k => $first) {
print "$k:\n";
foreach ($first as $second) {
print "\t$second\n";
}
}
?>
output:
0:
1
2
3
1:
4
5
6
2:
7
8
9
--
Best regards,
Maxim Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
�
not for the same array it can't, the pointer in the first foreach is moved
by the second one
try:
$array = array("a", "b", "c");
foreach($array as $val1)
{ foreach($array as $val2) echo "$val1:$val2<br>";
}
it gives
a:a
a:b
a:c
then stops, the manual says that the foreach creates it's own pointer which
it obviously doesn't.
I can't remember what I was trying to do when I found this, it might have
been writing a recursive function
Tim Ward
Senior Systems Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Maxim Derkachev [mailto:[EMAIL PROTECTED]]
> Sent: 12 April 2001 16:23
> To: Tim Ward
> Cc: [EMAIL PROTECTED]
> Subject: Re[2]: [PHP] foreach vs. while(list() = each())
>
>
> Hello Tim,
>
> Thursday, April 12, 2001, 1:43:53 PM, you wrote:
>
> TW> you can't nest foreach as you should be able to. Ecah
> foreach is supposed to
> TW> have it's own pointer in the array, but it doesn't ...
> this is a known bug.
>
> What do you mean? Foreach() can be nested, and it works perfect.
>
> <?php
> $a = array (array (1, 2, 3), array(4,5,6), array(7,8,9));
> foreach ($a as $k => $first) {
> print "$k:\n";
> foreach ($first as $second) {
> print "\t$second\n";
> }
> }
> ?>
>
> output:
> 0:
> 1
> 2
> 3
> 1:
> 4
> 5
> 6
> 2:
> 7
> 8
> 9
>
>
>
>
> --
> Best regards,
> Maxim Derkachev mailto:[EMAIL PROTECTED]
> Symbol-Plus Publishing Ltd.
> phone: +7 (812) 324-53-53
> http://www.Books.Ru -- All Books of Russia
> �
>
>
From Changelog :
http://php.net/ChangeLog-4.php
Version 4.0.2 29-Aug-2000
Fixed problem with nested foreach()'s. (Andi, Zend Engine)
Just tested the below example code with 4.0.1 and 4.0.3 and above changed
fixed it.
regards,
philip
On Thu, 12 Apr 2001, Tim Ward wrote:
> not for the same array it can't, the pointer in the first foreach is moved
> by the second one
>
> try:
>
> $array = array("a", "b", "c");
> foreach($array as $val1)
> { foreach($array as $val2) echo "$val1:$val2<br>";
> }
>
> it gives
> a:a
> a:b
> a:c
> then stops, the manual says that the foreach creates it's own pointer which
> it obviously doesn't.
>
> I can't remember what I was trying to do when I found this, it might have
> been writing a recursive function
>
> Tim Ward
> Senior Systems Engineer
>
> Please refer to the following disclaimer in respect of this message:
> http://www.stivesdirect.com/e-mail-disclaimer.html
>
>
> > -----Original Message-----
> > From: Maxim Derkachev [mailto:[EMAIL PROTECTED]]
> > Sent: 12 April 2001 16:23
> > To: Tim Ward
> > Cc: [EMAIL PROTECTED]
> > Subject: Re[2]: [PHP] foreach vs. while(list() = each())
> >
> >
> > Hello Tim,
> >
> > Thursday, April 12, 2001, 1:43:53 PM, you wrote:
> >
> > TW> you can't nest foreach as you should be able to. Ecah
> > foreach is supposed to
> > TW> have it's own pointer in the array, but it doesn't ...
> > this is a known bug.
> >
> > What do you mean? Foreach() can be nested, and it works perfect.
> >
> > <?php
> > $a = array (array (1, 2, 3), array(4,5,6), array(7,8,9));
> > foreach ($a as $k => $first) {
> > print "$k:\n";
> > foreach ($first as $second) {
> > print "\t$second\n";
> > }
> > }
> > ?>
> >
> > output:
> > 0:
> > 1
> > 2
> > 3
> > 1:
> > 4
> > 5
> > 6
> > 2:
> > 7
> > 8
> > 9
> >
> >
> >
> >
> > --
> > Best regards,
> > Maxim Derkachev mailto:[EMAIL PROTECTED]
> > Symbol-Plus Publishing Ltd.
> > phone: +7 (812) 324-53-53
> > http://www.Books.Ru -- All Books of Russia
> > �
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
another good way is to use an associative array $session[] as your only
session variable, that way you don't need to worry abopout session variables
overwriting local or vice versa, so $value as a session variable becomes
$session["value"]
Tim Ward
Senior Systems Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Plutarck [mailto:[EMAIL PROTECTED]]
> Sent: 12 April 2001 13:24
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Updating a value in a session
>
>
> What happens is when you use session_start(), all variables
> in the session
> become initialized to the values they have previously been given.
>
> So when you call session_start the second time, a variable
> named $value is
> created with the value it was given earlier.
>
> The problem is, it over-writes the variable $value which was
> submitted in
> the form.
>
> The way to get around this is to rename your form to
> "form_value". Then
> right after you register value in your session, insert this:
>
> $value = $form_value;
>
> It should work without error.
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
>
> ""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message
> 9b431b$fau$[EMAIL PROTECTED]">news:9b431b$fau$[EMAIL PROTECTED]...
> > On my first page I have a form that posts a value to page2
> where it gets
> > registered in a session. Works like a charm...
> > When I try to do this again, but send another value, the
> session doesn�t
> > update the new value.
> > Why?
> >
> > PAGE 1 --->
> > <form action="page2.php" method="post">
> >
> > <input type="text" name="value" size="30">
> > <input type="submit" name="submit">
> >
> > </form>
> >
> >
> > PAGE 2 --->
> > <?
> > session_start();
> > session_register("value");
> > ?>
> >
> > Thanks,
> > // Tobias
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
>
>
>
ok, if Im understanding this right, you want to have categories, with multiple sub
categories, you want to have links inside any category (inc sub-categories) right?
well I use three tables.
link
- link_id
- link_name
- link_url
link_cat
- link_id
- link_cat
cat
- cat_id
- cat_name
- cat_parent
I use two tables for links for a reason, I wanted to be able to have a link in
multiple categories, this is the simplest method. I'll put some values in the tables
so you can get an idea how it works.
link
001 mediawave www.mediawaveonline.com
002 slashdot www.slashdot.org
003 google www.google.com
004 yahoo www.yahoo.com
link_cat
001 001
002 002
003 003
004 003
cat
001 category1 000
002 category2 001
003 category3 001
004 category4 002
005 category5 003
there we go, we some data to play with.
now to make a pretty category tree we use recursion. everyone say 'oi' together now.
class cat
{
function make_tree($cat_id = 0)
{
static $padding = 0;
$padding++;
foreach($database->select_array('', 'cat', "WHERE cat_id = $cat_id") as $pos =>
$result)
{
$cat_id = $result['cat_id'];
$this->cat_id[$cat_id] = $result['cat_id'];
$this->cat_name[$cat_id] = $result['cat_name'];
$this->cat_parent[$cat_id] = $result['cat_parent'];
$this->cat_space[$cat_id] = $padding;
make_tree($cat_id);
}
$padding--;
}
}
(I havent checked this code, its just an example)
to get the links, not a problem either.
class link
{
function get_links($cat = '')
{
if ($cat)
$query = "WHERE l.link_id = lc.link_id AND lc.link_cat = $cat":
else
$query = "WHERE l.link_id = lc.link_id":
foreach($database->select_array('', 'link as l, link_cat as lc', $query) as $pos =>
$result)
{
$id = $result['link_id'];
$cat = $result['link_cat'];
$this->link_id[$id] = $result['link_id'];
$this->link_cat[$id][$cat] = $result['link_cat'];
$this->link_url[$id] = $result['link_url'];
$this->link_name[$id] = $result['link_name'];
}
}
}
ok this is a supper basic example, but try it, modify it, play around. it'll give you
a basic idea.
--
Chris Lee
[EMAIL PROTECTED]
"Fates" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I am trying to make a simple HTML menu system. I am having problems
displaying
menu links under the correct submenu from a loop. I want to be able to
change web menus on the fly.
I have a database with two tables. One table holds menu and sub menu
headings and the other table holds the contents of each submenu (the
actual menu links and
names). I need to display the menu title and then the sub menu title
from table 1 and
then display the submenu contents or links from table 2 and then display
the next set
of links under the correct submenu
Example output would look like this:
Say person clicks on Admin menu which is already displayed then the
networking
submenu heading will display along with the submenu links:
Example: Admin (main menu title from db
table 1)
Networking (submenu title , from
db table 1
ping (Link to ping
from db table 2)
traceroute (Link to ping from
db table 2)
nsloopup etc........
I don't know how to go about outputing the links under the correct
submenu. The
main menu is no problem. I am thinking I would need a loop within a
loop.
The query I use: $query = "SELECT * FROM menutable, elementstable WHERE
menutable.menutable_id = elementstable.menuid AND menutable.mainmenu =
'Admin' ";
$result = mysql_db_query("menus", $query);
This loop simply assigns variables and prints out all output under the
main menu
called Admin. The problem is how do I display
while ($r = mysql_fetch_array($result)) {
// start menu table (table holds main menu/sub menu headings
$menutable_id = $r["menutable_id"];
$menunumber = $r["menunumber"];
$mainmenu = $r["mainmenu"];
$submenu = $r["submenu"];
// start elements table (table that holds the links and names of each
link)
// element_id references menu table
$element_id = $r["element_id"];
$element = $r["element"];
$url = $r["url"];
$menuid = $r["menuid"];
// next display data this is wrong cause it displays 1 submenu and 1
link looping
?>
<TD><? echo "$submenu"; ?></TD>
<TD><a href="<? echo "$url"; ?> "> <? echo "$element"; ?></a> </TD>
<?
// this doesn't work
if ($menutable_id == $menuid) {
?>
<TD><? echo "equal $submenu"; ?></TD>
<?
// print "both equal";
//
// $b = $a;
}
?>
Notes:
// outer loop display submenus (when submenu changes display next set
of elements
or links from inner loop) if submenu changes then display next set of
menu links for
that submenu
// inner loop display elements or links for that submenu until sub menu
changes
MySQL and PHP4 latest using Linux OS
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Thats what i was thinking...we have flamed him enough...and i hope that he
gets the message that we don't need to know about 8 dollar hosting...:-)
~kurth
On Thu, 12 Apr 2001, Greig, Euan wrote:
> Date: Thu, 12 Apr 2001 09:39:31 +0100
> From: "Greig, Euan" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: FW: [PHP] $8 PHP hosting from Jeffrey Greer
>
>
> Isn't it time to give this poor guy a rest?!?
>
> -----Original Message-----
> From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
> Sent: 11 April 2001 15:21
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] $8 PHP hosting from Jeffrey Greer
>
>
> Jeffrey Greer wrote:
>
> > Is 1/2 per
> > year too much down time?
>
> <sarcasm>
> Half a year downtime? Yes, I would have a BIG problem with that.
> </sarcasm>
>
> AMK4
>
> --
> W |
> | I haven't lost my mind; it's backed up on tape somewhere.
> |____________________________________________________________________
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
> SysAdmin / Websmith . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . eFax 248.671.0909
> http://www.pcraft.com . 3550 Arapahoe Ave #6
> .................. . . . . Boulder, CO 80303, USA
>
>
>
>
> **************************************************************************
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
Greetings,
I am having a small problem displaying PDF files to my users via passthru.
This is the situation: I have a bunch of PDF files on my server directory.
I show the user a listing of the PDF files they can view, and allow them to
hyperlink click on the PDF they wish to browse. When the user clicks the
link, I execute a header() and then my passthru on my PDF file. The code is
essentially:
header("Content-type: application/pdf");
passthru($pdf_file);
Now, my problem is that the title of the HTML window that pops up is of the
URL path. I want to set the title to something meaningful (like the name of
the PDF file the user is looking at). But, if I try to print a "<TITLE>PDF
File</TITLE>" after the header, my PDF document does not show up (it shows
the raw encoding of the PDF document).
Does anyone have any suggestions to allow me to show a title on a
header/passthru page? Is there a better way to do this?
Cheers,
Jason
I believe there is header called "Content-disposition: filename.pdf" which
is defined in the proper RFC. And as far as I know some browsers don't
respect it. Search the list for it, you should find allot of info.
Mike
-----Original Message-----
From: Jason Mowat [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 12:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] passthru Problems
Greetings,
I am having a small problem displaying PDF files to my users via passthru.
This is the situation: I have a bunch of PDF files on my server directory.
I show the user a listing of the PDF files they can view, and allow them to
hyperlink click on the PDF they wish to browse. When the user clicks the
link, I execute a header() and then my passthru on my PDF file. The code is
essentially:
header("Content-type: application/pdf");
passthru($pdf_file);
Now, my problem is that the title of the HTML window that pops up is of the
URL path. I want to set the title to something meaningful (like the name of
the PDF file the user is looking at). But, if I try to print a "<TITLE>PDF
File</TITLE>" after the header, my PDF document does not show up (it shows
the raw encoding of the PDF document).
Does anyone have any suggestions to allow me to show a title on a
header/passthru page? Is there a better way to do this?
Cheers,
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Greets,
Just to elaborate: I want my user to be able to click on a hyperlink that
points to my PDF file, and have a new window pop up, displaying the contents
of the PDF file in the browser window (without prompting if they should save
the file) as well as set the HTML <TITLE> tag to the name of the report.
My passthru() function works fine, when I send a header() of PDF first, and
then dump the raw PDF out. But, I cannot set any HTML properties with tags
(like <TITLE>); it doesn't show the PDF in PDF format then, it shows it all
raw encoded.
Hope that helps clarifying my wants and needs :-)
Cheers,
Jason
""Jason Mowat"" <[EMAIL PROTECTED]> wrote in message
9b4lso$2gb$[EMAIL PROTECTED]">news:9b4lso$2gb$[EMAIL PROTECTED]...
> Greetings,
>
> I am having a small problem displaying PDF files to my users via passthru.
> This is the situation: I have a bunch of PDF files on my server directory.
> I show the user a listing of the PDF files they can view, and allow them
to
> hyperlink click on the PDF they wish to browse. When the user clicks the
> link, I execute a header() and then my passthru on my PDF file. The code
is
> essentially:
> header("Content-type: application/pdf");
> passthru($pdf_file);
>
> Now, my problem is that the title of the HTML window that pops up is of
the
> URL path. I want to set the title to something meaningful (like the name
of
> the PDF file the user is looking at). But, if I try to print a
"<TITLE>PDF
> File</TITLE>" after the header, my PDF document does not show up (it shows
> the raw encoding of the PDF document).
>
> Does anyone have any suggestions to allow me to show a title on a
> header/passthru page? Is there a better way to do this?
>
> Cheers,
> Jason
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
You need to use a frameset to do what you want.
the problem is the browser will only launch the Acrobat control if it
receives the content type app/pdf, an html page uses the content type
text/html.
your links should point to another page that outputs something like the
following based on input of the pdf file path and name
( HTML shamelessly stolen from http://www.php4.net/ :-)
<HTML>
<HEAD>
<TITLE><?php echo $your_title ?></TITLE>
<FRAMESET rows="100%,*" frameborder="0"framespacing="0" border="0"
align=CENTER>
<FRAME SRC="<?php echo $your_pdf_file_path ?>" Name="pdf" scrolling="auto">
<FRAME SRC="empty.htm" Name="invisible" scrolling="no">
</FRAMESET>
</HTML>
if you are using track_vars and don't have the auto globalizing of form
elements, use
$HTTP_GET_VARS[ 'your_title']
$HTTP_GET_VARS[ 'your_pdf_file_path ']
or
$HTTP_POST_VARS[ 'your_title']
$HTTP_POST_VARS[ 'your_pdf_file_path ']
depending on your form method
morgan
At 03:20 PM 4/12/2001, you wrote:
>Greets,
>
>Just to elaborate: I want my user to be able to click on a hyperlink that
>points to my PDF file, and have a new window pop up, displaying the contents
>of the PDF file in the browser window (without prompting if they should save
>the file) as well as set the HTML <TITLE> tag to the name of the report.
>
>My passthru() function works fine, when I send a header() of PDF first, and
>then dump the raw PDF out. But, I cannot set any HTML properties with tags
>(like <TITLE>); it doesn't show the PDF in PDF format then, it shows it all
>raw encoded.
>
>Hope that helps clarifying my wants and needs :-)
>
>Cheers,
>Jason
>
>
>""Jason Mowat"" <[EMAIL PROTECTED]> wrote in message
>9b4lso$2gb$[EMAIL PROTECTED]">news:9b4lso$2gb$[EMAIL PROTECTED]...
> > Greetings,
> >
> > I am having a small problem displaying PDF files to my users via passthru.
> > This is the situation: I have a bunch of PDF files on my server directory.
> > I show the user a listing of the PDF files they can view, and allow them
>to
> > hyperlink click on the PDF they wish to browse. When the user clicks the
> > link, I execute a header() and then my passthru on my PDF file. The code
>is
> > essentially:
> > header("Content-type: application/pdf");
> > passthru($pdf_file);
> >
> > Now, my problem is that the title of the HTML window that pops up is of
>the
> > URL path. I want to set the title to something meaningful (like the name
>of
> > the PDF file the user is looking at). But, if I try to print a
>"<TITLE>PDF
> > File</TITLE>" after the header, my PDF document does not show up (it shows
> > the raw encoding of the PDF document).
> >
> > Does anyone have any suggestions to allow me to show a title on a
> > header/passthru page? Is there a better way to do this?
> >
> > Cheers,
> > Jason
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
I currently am using Thehostpros.com for my hosting, but I can't say its been a
pleasant experience. I had to have them install PHP because they are more ASP
oriented. So that cost me more. Then I wanted MySQL and they have spent 3 months
saying they'll install that. Basicly here's what I need:
Someone who can host my domain (I own the domain already)
Can provide MySQL and PHP. Both up-to-date.
Can give around 60 meg of space (ballpark, less should be fine)
Also a way to set up subdomains without needing to go through the admin (some hosts
can do his). But this isn't necessary.
Can anyone help with that?
On Thu, Apr 12, 2001 at 10:34:26AM -0400, Chris Anderson wrote:
> Someone who can host my domain (I own the domain already)
> Can provide MySQL and PHP. Both up-to-date.
> Can give around 60 meg of space (ballpark, less should be fine)
> Also a way to set up subdomains without needing to go through the admin (some hosts
>can do his). But this isn't necessary.
> Can anyone help with that?
Handy PHP hosting directory:
http://hosts.php.net
Matt
Check out aitcom.net
get a resellers account, and go hog wild. you can even edit the httpd.conf
page for custom liasing of directories, and anything else.
I wasn't able to get them to compile PHP with some of the extras, at least
not as an apache module, BUT I was able to compile PHP as a cgi for a few
custom features.(libpdf.so)
and setting up new domains is a breeze. Just order it, and wait an hour.
So, if you are wanting to host other sites (and charge for them) a
reseller's account with AIT is a great way to go. A couple of paid sites can
quickly cover the costs for your own site.
I am up to 27 virtual hosts on my account
On 4/12/01 10:28 AM, "Matt McClanahan" <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 12, 2001 at 10:34:26AM -0400, Chris Anderson wrote:
>
>> Someone who can host my domain (I own the domain already)
>> Can provide MySQL and PHP. Both up-to-date.
>> Can give around 60 meg of space (ballpark, less should be fine)
>> Also a way to set up subdomains without needing to go through the admin (some
>> hosts can do his). But this isn't necessary.
>> Can anyone help with that?
>
> Handy PHP hosting directory:
>
> http://hosts.php.net
>
> Matt
i'll have to try that. But can they use my current domain. Also do setting
up sub-domains in an hour cost me anything?
----- Original Message -----
From: "Lindsay Adams" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 1:36 PM
Subject: Re: [PHP] Do any of you provide hosting?
> Check out aitcom.net
>
> get a resellers account, and go hog wild. you can even edit the httpd.conf
> page for custom liasing of directories, and anything else.
>
> I wasn't able to get them to compile PHP with some of the extras, at least
> not as an apache module, BUT I was able to compile PHP as a cgi for a few
> custom features.(libpdf.so)
>
> and setting up new domains is a breeze. Just order it, and wait an hour.
>
> So, if you are wanting to host other sites (and charge for them) a
> reseller's account with AIT is a great way to go. A couple of paid sites
can
> quickly cover the costs for your own site.
>
> I am up to 27 virtual hosts on my account
>
> On 4/12/01 10:28 AM, "Matt McClanahan" <[EMAIL PROTECTED]> wrote:
>
> > On Thu, Apr 12, 2001 at 10:34:26AM -0400, Chris Anderson wrote:
> >
> >> Someone who can host my domain (I own the domain already)
> >> Can provide MySQL and PHP. Both up-to-date.
> >> Can give around 60 meg of space (ballpark, less should be fine)
> >> Also a way to set up subdomains without needing to go through the admin
(some
> >> hosts can do his). But this isn't necessary.
> >> Can anyone help with that?
> >
> > Handy PHP hosting directory:
> >
> > http://hosts.php.net
> >
> > Matt
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
yes, the subdomains cost you $20/setup, and $2/month extra.
the reason for the setup? they won't let you mess with the dns (which makes
a lot of sense)
overall, it is worth it. you will of course pass the setup fee on to your
clients, and charge more than $2/month, but you can see, that the return
comes pretty quickly.
On 4/12/01 11:01 AM, "Chris Anderson" <[EMAIL PROTECTED]> wrote:
> i'll have to try that. But can they use my current domain. Also do setting
> up sub-domains in an hour cost me anything?
> ----- Original Message -----
> From: "Lindsay Adams" <[EMAIL PROTECTED]>
> To: "PHP" <[EMAIL PROTECTED]>
> Sent: Thursday, April 12, 2001 1:36 PM
> Subject: Re: [PHP] Do any of you provide hosting?
>
>
>> Check out aitcom.net
>>
>> get a resellers account, and go hog wild. you can even edit the httpd.conf
>> page for custom liasing of directories, and anything else.
>>
>> I wasn't able to get them to compile PHP with some of the extras, at least
>> not as an apache module, BUT I was able to compile PHP as a cgi for a few
>> custom features.(libpdf.so)
>>
>> and setting up new domains is a breeze. Just order it, and wait an hour.
>>
>> So, if you are wanting to host other sites (and charge for them) a
>> reseller's account with AIT is a great way to go. A couple of paid sites
> can
>> quickly cover the costs for your own site.
>>
>> I am up to 27 virtual hosts on my account
>>
>> On 4/12/01 10:28 AM, "Matt McClanahan" <[EMAIL PROTECTED]> wrote:
>>
>>> On Thu, Apr 12, 2001 at 10:34:26AM -0400, Chris Anderson wrote:
>>>
>>>> Someone who can host my domain (I own the domain already)
>>>> Can provide MySQL and PHP. Both up-to-date.
>>>> Can give around 60 meg of space (ballpark, less should be fine)
>>>> Also a way to set up subdomains without needing to go through the admin
> (some
>>>> hosts can do his). But this isn't necessary.
>>>> Can anyone help with that?
>>>
>>> Handy PHP hosting directory:
>>>
>>> http://hosts.php.net
>>>
>>> Matt
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>>
>
Alright I finally got around to installing MySQL on my cpu, and I sucessfully created
a database. Now I have a reeeeaaaallllyyy dumb question. In the manual I see no
functions for creating tables in a database through code. Maybe I'm just missing the
function. Can someone help me?
Check out mysql_query. It will allow you to execute any query that you
would normally do via the command line interface to MySQL.
--
phill
""Chris Anderson"" <[EMAIL PROTECTED]> wrote in message
000301c0c373$a3522960$b01012d1@null">news:000301c0c373$a3522960$b01012d1@null...
Alright I finally got around to installing MySQL on my cpu, and I
sucessfully created a database. Now I have a reeeeaaaallllyyy dumb question.
In the manual I see no functions for creating tables in a database through
code. Maybe I'm just missing the function. Can someone help me?
Hi all,
I have a question that can I do my dynamic web application in one page
without any other hyperlink page if I have all the classes needed to run the
dynamic web application? Are there any Pros and Cons for running application
on one page? The application is mainly used for ERP. Thank you.
Calvin Chua
Systems Analyst
InterClean Equipment, Inc.
734-975-2967
www.InterClean.com
I've been looking through the book, and so far, I can't find the command
for 'show tables' in Oracle 8i. Anyone know it? It should be
programmatically available, I would think, as an SQL command.
At 11:09 AM 4/12/01 -0700, Dennis Gearon wrote:
>I've been looking through the book, and so far, I can't find the command
>for 'show tables' in Oracle 8i. Anyone know it? It should be
>programmatically available, I would think, as an SQL command.
SELECT TABLE_NAME FROM ALL_TABLES;
- Brian
-------------------------------------
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.
(850) 875-1500 x225
<[EMAIL PROTECTED]>
-------------------------------------
Can PHP update a second field on the form, based on the contents chosen
from the first field (I'm thinking of JavaScript's function) ?
I'm pulling a list of id,name,email from MySQL and displaying name for
the first field. After the user picks it, I want the appropriate email
address to show up
in the second field.
1. I want to do this without sending a second select request to the
server.
2. What PHP functions should I be looking at to build this?
3. If not PHP, where can I find the appropriate JavaScript examples?
Thanks,
Eman
php is server side only
so you are going to have to use javascript.
You can have php build an array, or two in javascript so that your menu
canchange.
checkout hotscripts.com, resourceindex.com, devshed.com,
http://wsabstract.com/
to name a few.
On 4/12/01 11:14 AM, "Erin Quick-Laughlin" <[EMAIL PROTECTED]>
wrote:
> Can PHP update a second field on the form, based on the contents chosen
> from the first field (I'm thinking of JavaScript's function) ?
>
> I'm pulling a list of id,name,email from MySQL and displaying name for
> the first field. After the user picks it, I want the appropriate email
> address to show up
> in the second field.
>
> 1. I want to do this without sending a second select request to the
> server.
> 2. What PHP functions should I be looking at to build this?
> 3. If not PHP, where can I find the appropriate JavaScript examples?
>
> Thanks,
> Eman
>
>
>
Check out these two tutorials, might help :
chainedSelectors: A Better Way to Drop-down a PHP List :
--------------------------------------------------------
http://zend.com/zend/tut/drop-down.php
Loading JavaScript Arrays with MySQL Data :
--------------------------------------------------------
http://devshed.com/Server_Side/MySQL/JS_Arrays/
regards,
philip
On Thu, 12 Apr 2001, Erin Quick-Laughlin wrote:
> Can PHP update a second field on the form, based on the contents chosen
> from the first field (I'm thinking of JavaScript's function) ?
>
> I'm pulling a list of id,name,email from MySQL and displaying name for
> the first field. After the user picks it, I want the appropriate email
> address to show up
> in the second field.
>
> 1. I want to do this without sending a second select request to the
> server.
> 2. What PHP functions should I be looking at to build this?
> 3. If not PHP, where can I find the appropriate JavaScript examples?
>
> Thanks,
> Eman
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Thanks for your replies...
This is how my php.ini looks like:
[mail function]
SMTP = "smtp.we.mediaone.net" ; for Win32 only
sendmail_from = "[EMAIL PROTECTED]" ; for Win32 only
;sendmail_path = ;for unix only, may supply arguments as well (default is
'sendmail -t -i')
Hope this helps any???? Thanks again...
-Terence
I would like to put a mysql resultset into an array of type
row(rownunber)(data).Any Ideas?
Mike P
[EMAIL PROTECTED]
On Thu, 12 Apr 2001 15:42:54 -0400, Mike ([EMAIL PROTECTED])
wrote:
>I would like to put a mysql resultset into an array of type
>row(rownunber)(data).Any Ideas?
>Mike P
>[EMAIL PROTECTED]
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: php-list-
>[EMAIL PROTECTED]
while($row[]=mysql_fetch_array($result));
On 11 Apr 2001 21:07:01 -0700 Alvin Tan said...
> Hi Plutarck,
>
> The 'mailing list' at MySQL _is_ very much like this one and is also very
> active. Send mail to [EMAIL PROTECTED] to subscribe.
Except that it is a *mailing* list not a *newsgroups* format (like
news.php.net) which was what the Plutark was asking about. ;-)
Personally I don't know how anyone can stand getting this many posts
cluttering up their mail reader. I'll stick with Gravity thank you very
much. :-)
And sorry I don't know about any mySQL newsgroups..
--
John R. Marshall
JRM Studios.com - http://www.jrmstudios.com
The Hotrodding Network - http://www.hotrodding.net
yes you're right - i seem to have misread plutarck's mail. apologies ;)
@lvin
-----Original Message-----
From: John R.Marshall [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 4:04 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Newsgroups like this one?
On 11 Apr 2001 21:07:01 -0700 Alvin Tan said...
> Hi Plutarck,
>
> The 'mailing list' at MySQL _is_ very much like this one and is also very
> active. Send mail to [EMAIL PROTECTED] to subscribe.
Except that it is a *mailing* list not a *newsgroups* format (like
news.php.net) which was what the Plutark was asking about. ;-)
Personally I don't know how anyone can stand getting this many posts
cluttering up their mail reader. I'll stick with Gravity thank you very
much. :-)
And sorry I don't know about any mySQL newsgroups..
--
John R. Marshall
JRM Studios.com - http://www.jrmstudios.com
The Hotrodding Network - http://www.hotrodding.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi: we are an alexandria, va small travel dot.com (small but robust and
profitable!) and I am looking for a senior php developer to join our
team. for a full
job description please see http://www.HotelsCentral.com/jobs
thanks,
marcin miszczak
ceo
hotelscentral.com
I have to make sure that a number entered into a field is divisible by 50
but I am unsure how to validate the number to make sure that is the case
before it goes into the db.
george
<?php
if( $my_form_var % 50 ){
echo "$my_form_var is not a multiple of 50!";
}
?>
the % is the modulus operator meaning it returns the remainder of a
division operation. If the number is divisible by 50 the remainder is 0 (
aka false for the if statement ) other wise it is not 0 ( aka true )
http://www.php.net/manual/nl/language.operators.php
morgan
At 04:42 PM 4/12/2001, you wrote:
> I have to make sure that a number entered into a field is divisible by 50
>but I am unsure how to validate the number to make sure that is the case
>before it goes into the db.
>
>george
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
Thanks.
george
Andrew,
Thanks for the help! It worked!
:)
Gee, how happy I am, now I get to work on the unlink file portion, and
confirmation texts :)
THANKS!
Sean
On 4/12/01 6:25 AM, "Andrew Rush" <[EMAIL PROTECTED]> wrote:
> on 4/12/01 7:32 AM, g0thic at [EMAIL PROTECTED] wrote:
>
>> copy($f_loc,$destination.''.$f_loc_name);
>
> instead of doing this, do:
>
> $path=$destination.$f_loc_name;
>
> copy($f_loc, $path) or die("unable to copy $f_loc_name to location $path");
>
> your path is probably getting concatenated incorrectly.
>
>
> have a great day
> andy
>
> --
> *******************************************************
> Andrew Rush :: Lead Systems Developer :: MaineToday.com
> *******************************************************
>
> "A friend of the devil is a friend of mine" - R. Hunter
>
>
>
>
>
I am about to pull my hair out trying to figure out why this isn't working.
I figured I would wait and hope that someone else's eyes would pick
something up, though. I am running it on 4.04pl1 CGI / Win 2k / IIS 5. I
am trying to read from the session files that are in C:\php\sessiondata in
order to create an administration script to open up each session file, grab
each username variable that I have registered in it, and print the names to
the screen.
This is the code I have with comments describing what is happening when I
run it:
function show_loggedin_users() {
$loopcounter=0;
if ($dir = opendir('c:/php/sessiondata')) {
while($files = readdir($dir)) {
if (substr($files,0,1) != '.') { //don't want the '.' or '..' files
$sess_id[$loopcounter]=substr($files, 5); //get the sid from the
filename (removes the sess_ from the filename)
$fullfilepath='c:/php/sessiondata/'.$files;
$fp = fopen($fullfilepath, "r"); //open up the session's file
$fcontents = fread($fp, filesize($fullfilepath)); //get the
contents of the file - it won't, though!
echo $fcontents; //just to check to see if it worked - it doesn't
print anything
fclose($fp);
...
There is a session file in the directory, there are registered variables in
the file, and I can print $fullfilepath and get a correct path and filename
to the file. I also tried fgets instead of fread. Nothing seems to work,
though...
Any corrections/thoughts/comments are appreciated.
Just a comment...
I tried your code and it worked just fine for me, I could see the session
contents.
The only thing that is different in my setup is that I use PHP 4.03pl1...
Try downgrading and see if it works...
// Tobias
""Schulz, Evan"" <[EMAIL PROTECTED]> wrote in message
919AAA764477D31189A00060942F0B8F142C7F@EXCHANGE">news:919AAA764477D31189A00060942F0B8F142C7F@EXCHANGE...
> I am about to pull my hair out trying to figure out why this isn't
working.
> I figured I would wait and hope that someone else's eyes would pick
> something up, though. I am running it on 4.04pl1 CGI / Win 2k / IIS 5. I
> am trying to read from the session files that are in C:\php\sessiondata in
> order to create an administration script to open up each session file,
grab
> each username variable that I have registered in it, and print the names
to
> the screen.
>
> This is the code I have with comments describing what is happening when I
> run it:
>
> function show_loggedin_users() {
> $loopcounter=0;
> if ($dir = opendir('c:/php/sessiondata')) {
> while($files = readdir($dir)) {
> if (substr($files,0,1) != '.') { file://don't want the '.' or '..'
files
> $sess_id[$loopcounter]=substr($files, 5); file://get the sid from
the
> filename (removes the sess_ from the filename)
>
> $fullfilepath='c:/php/sessiondata/'.$files;
>
> $fp = fopen($fullfilepath, "r"); file://open up the session's
file
>
> $fcontents = fread($fp, filesize($fullfilepath)); file://get the
> contents of the file - it won't, though!
> echo $fcontents; file://just to check to see if it worked - it
doesn't
> print anything
> fclose($fp);
> ...
>
> There is a session file in the directory, there are registered variables
in
> the file, and I can print $fullfilepath and get a correct path and
filename
> to the file. I also tried fgets instead of fread. Nothing seems to work,
> though...
>
> Any corrections/thoughts/comments are appreciated.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Well, I didn't get a response from my previous post, so I'm trying again. I
need to collect a group of files in a form and ftp them to a different
server than the script is located on. Can this be done? how?
Thank you,
David Minor
Hafu check out the ftp funtions build in PHP? You can find them on their
website www.php.net.
Regards,
Sumarlidi Einar Dadason
SED - Graphic Design
------------------------------------------
Phone: (+354) 4615501
Mobile: (+354) 8960376
Fax: (+354) 4615503
E-mail: [EMAIL PROTECTED]
Homepage: www.sed.is <- New Homepage!
------------------------------------------
-----Original Message-----
From: David Minor [mailto:[EMAIL PROTECTED]]
Sent: 12. april 2001 22:13
To: [EMAIL PROTECTED]
Subject: [PHP] no reponse -- Need FTP help
Well, I didn't get a response from my previous post, so I'm trying again. I
need to collect a group of files in a form and ftp them to a different
server than the script is located on. Can this be done? how?
Thank you,
David Minor
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
sure.
keep track of the files on the server drive, then open a connection using
fopen() and fputs the contents of each file.
On 4/12/01 3:13 PM, "David Minor" <[EMAIL PROTECTED]> wrote:
> Well, I didn't get a response from my previous post, so I'm trying again. I
> need to collect a group of files in a form and ftp them to a different
> server than the script is located on. Can this be done? how?
>
> Thank you,
> David Minor
>
on http://www.php.net/manual/en/function.preg-match-all.php there is a
regex:
$url = "http://www.catho.com.br/index.phtml";
$contents = Implode("", File($url));
preg_match_all("|href=\"?([^\"' >]+)|i", $contents, $arrayoflinks);
While(List(,$link) = Each($arrayoflinks[1]))
Echo "$link<Br>";
that pulls allthe urls out of a document by finding the href=.
What I need to find is all the urls in the document and make hrefs out of
them.
ie:
http://www.mysite.com becomes <a
href="http://www.mysite.com">http://www.mysite.com</a>
any ideas? TIA!
Michael Geier
CDMSports Systems Administration
EMail: [EMAIL PROTECTED]
Phone: 314.991.1511 x 6505
"Michael Geier" <[EMAIL PROTECTED]> wrote:
> What I need to find is all the urls in the document and make hrefs out of
> them.
>
> ie:
> http://www.mysite.com becomes <a
> href="http://www.mysite.com">http://www.mysite.com</a>
>
> any ideas? TIA!
I use this code in my PHPost project:
$s = ereg_replace("([[:alpha:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])",
"<a href=\"\\1://\\2\\3\" target=\"_blank\">\\0</a>", $s );
Mark
I wanted to use is_null, but it isn't available in my version
(4.0B2)
What would be an equivalent? I'm fairly new to PHP.
I was using isset, but sometimes it is set to Null.
Null values are unacceptable, but zero is a perfectly acceptable
value for what I want.
Jennifer
It's supported from 4.0.4, I think.
Regards,
--
Yasuo Ohgaki
"Jennifer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I wanted to use is_null, but it isn't available in my version
> (4.0B2)
>
> What would be an equivalent? I'm fairly new to PHP.
>
> I was using isset, but sometimes it is set to Null.
>
> Null values are unacceptable, but zero is a perfectly acceptable
> value for what I want.
>
> Jennifer
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Hello,
I there a way for me to find out what variables are being sent to script?
Example:
http://www.myscript.com/myscript.php?var1=asdf&var2=asdf
that above would be $var1 and $var2
Thanks
Brandon
Brandon Orther wrote:
> I there a way for me to find out what variables are being sent to script?
> Example:
> http://www.myscript.com/myscript.php?var1=asdf&var2=asdf
>
> that above would be $var1 and $var2
Stick <? phpinfo() ?> at the end of your script, and go through it so you
can see all the nifty variables that PHP sets for you when you pass arguments
to it. Good way to learn too.
AMK4
--
W |
| I haven't lost my mind; it's backed up on tape somewhere.
|____________________________________________________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
SysAdmin / Websmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . eFax 248.671.0909
http://www.pcraft.com . 3550 Arapahoe Ave #6
.................. . . . . Boulder, CO 80303, USA
Is anyone else getting these messages when posting to the PHP list?
They're starting to get annoying. If this individual can't be bothered
to change their email subscription, they should be dropped all together.
-------- Original Message --------
Subject: Delivery Notification: Delivery has failed
Date: Fri, 13 Apr 2001 01:28:28 +0200 (MET DST)
From: PMDF e-Mail Interconnect <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Message-id: <[EMAIL PROTECTED]>
Date: Fri Apr 13 01:28:28 2001
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP] What variable are being sent to my script?
Your message cannot be delivered to the following recipients:
Recipient address: [EMAIL PROTECTED]
Reason: Not found in directory
--- NOTE. MESSAGE SENT TO YOUR OLD E-MAIL ADDRESS!----------
'[EMAIL PROTECTED]' sent this mail to your old address
'[EMAIL PROTECTED]'.
Please let the sender know that your new address is
'[EMAIL PROTECTED]'
Your old address will cease to function on 2nd of May 2001
--- MESSAGE ABOVE ADDED BY MAILSERVER ---------------------------
Greetings.
What can I do about file writing to a local folder, except for making
the entire folder WRITE/EXECUTE, and ALL for me.. Is there any way I can
program my scripts to be able to write or what is the problem? I have tryied
making the folder WRITE/EXECUTE, and I had READ also for all at first, but
then who wants folder browsing?
Thanks alot,
Richard
Needs to be read/writeable by the web server.
Sorry dude, no other way that doesn't open up huge security risks.
If you can't give your webserver write permission in the content
directories- then write to /tmp.
On Fri, 13 Apr 2001 01:57:40 +0200
"Richard" <[EMAIL PROTECTED]> wrote:
> Greetings.
>
> What can I do about file writing to a local folder, except for
making
> the entire folder WRITE/EXECUTE, and ALL for me.. Is there any way I can
> program my scripts to be able to write or what is the problem? I have
tryied
> making the folder WRITE/EXECUTE, and I had READ also for all at first,
but
> then who wants folder browsing?
>
> Thanks alot,
> Richard
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
Abriasoft Senior Developer
http://www.abriasoft.com/
Greetings.
(wrote an email too)
> If you can't give your webserver write permission in the content
directories
Does that have anything to do with .HTACCESS and files such as that?
- Richard
Is there a way to execute a system command and get both stdin and stderr into separate
variables?
I've put together a howto for setting up apache with mod_dav with dynamic
content so that you can use a webdav client to update the site while still
keeping the php source hidden from non authenticated users.
My solution uses a virtual host (With using ForceType directive in an
Alias, it works- but I was unable to limit get through the alias without
also having the limit effect normal path for calling the app).
I'm interested in knowing what people think about it- if its helpful,
confusing, same goal could be more easily accomplished in a different way,
yada yada bing boom.
It can be viewed at http://devel.omnilinux.com/~mpeters/README.moddav.html
--
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
Abriasoft Senior Developer
http://www.abriasoft.com/
Hello all.
We've written here before some time ago offering PHP training
courses. Unfortunately, we've had to postpone previously
scheduled classes. These issues are now behind us, and we are
pleased to post the following information on our next class.
In response to many requests for a combined 5 day course, we have
restructured our course to take advantage of a full week. Our next
course will be June 25-29, located in Ypsilanti, Michigan, just
outside Ann Arbor. We are located about 20 minutes from the Detroit
Metro airport (DTW), and the class facilities are located in the
local Marriott Hotel, so accomodations will be on-site.
The course price will be $2000. To register for this class, we will
need a refundable $399 deposit from you for each person attending.
Deposits need to be received by April 23, 2001. Deposits are
refundable until 40 days before the class is set to begin. We are
limiting the class to 15 students to maximize the instructor/student
ratio and hands-on course time. We are accepting deposits on a
first-come, first-served basis. Companies interested in sending more
than one person can contact us directly for discount information.
To register, email your contact information [EMAIL PROTECTED]
or phone us directly at 734-480-9961.
Our course is aimed at individuals familiar with web programming
concepts, but who are not yet PHP experts. Individuals with
ASP, Java, ColdFusion or Perl skills will be well prepared for this
course, which will offer individualized migration information for
those are moving from another environment to PHP.
Topics we will cover include
Basics of PHP - syntax, variables, arrays, etc.
Databases - native drivers usage, database abstraction techniques
Templating
Image creation
PDF creation
Form handling techniques
Session handling
Architecture planning - issues to consider regarding server farms,
security, load balances, scalability, and more.
We are excited to be providing you with an excellent PHP learning
experience, and look forward to hearing from you soon regarding
this upcoming course. :)
Sincerely,
Michael Kimsal
Director, Tap Internet
http://www.tapinternet.com/php/
734-480-9961
734-480-9962 (fax)
Using MySQL 3.23.32 on RedHat Linux 7.0...
MySQL's ROUND function rounds 5 up when the preceding digit is odd and down
when the preceding digit is even.
mysql> select round(1.5);
+------------+
| round(1.5) |
+------------+
| 2 |
+------------+
1 row in set (0.00 sec)
mysql> select round(2.5);
+------------+
| round(2.5) |
+------------+
| 2 |
+------------+
1 row in set (0.00 sec)
I think that this is technically the correct behavior, scientifically,
anyway. However, this is not the common "lay-man's" method of rounding,
which is to always round 5 up, as exhibited by PHP-4.0.4pl1...
<? echo round(1.5); ?>
<br>
<? echo round(2.5); ?>
Apache 1.3.14 output for this is:
2
3
This discrepancy causes a difficulty in programming PHP and MySQL together,
for example, because all of the rounding must be done in either PHP or
MySQL but not both partially unless you want conflicting data.
I would like to see MySQL ROUND() syntax expand to be ROUND(X,D,M) where
optional M value indicates the method of rounding, the default being the
current method.
I would also like to see PHP round() syntax expand to be
double round (double val [, int precision] [, char method])
where the optional method value indicates the method of rounding, the
default being the current method.
Thanks.
Lee Howard