php-general Digest 27 Mar 2001 07:02:09 -0000 Issue 591

Topics (messages 45632 through 45700):

POP client available + mcrypt question
        45632 by: mark.amtmedia.com

GD problem
        45633 by: Brandon Orther
        45650 by: Sterling
        45673 by: David Robley

equivalent to PERL's qq
        45634 by: Michael Hall
        45635 by: Cal Evans

Re: Get info to a perl script and then continue without going to that perl script.
        45636 by: Matt Friedman

just a newbie in php, don't get mad
        45637 by: Martin Mark
        45638 by: Jeff Oien
        45639 by: Wade DeWerff
        45647 by: Johannes Janson
        45648 by: Philip Olson

Serializing/unserializing objects
        45640 by: Kevin Beckford
        45641 by: Chris Cocuzzo
        45643 by: Michael Kimsal

General question :)
        45642 by: FredrikAT
        45644 by: Godd
        45654 by: Henrik Hansen
        45655 by: Henrik Hansen
        45659 by: Godd

Re: offline reader for php generated websites
        45645 by: Godd
        45657 by: Christian Reiniger

Re: drop down used to redirect?
        45646 by: duirfire

Create new accounts with PHP
        45649 by: O.J. Alcaraz

Question from Rookie
        45651 by: Rob McMahan, Jr.
        45677 by: David Robley

sessions and javascript.
        45652 by: Larry Hotchkiss

Re: Problems passing data via GET and POST
        45653 by: Jason Stechschulte

Session handling and SSL
        45656 by: Sam Leibowitz

Unusual issue - saving state in an error class
        45658 by: Geoff Caplan

What could I be doing wrong here
        45660 by: YoBro
        45661 by: Samantha Savvakis
        45662 by: Jack Dempsey
        45664 by: Pierre-Yves Lemaire
        45665 by: CC Zona
        45668 by: YoBro

Is this possible?  PHP + Javascript
        45663 by: Michael Champagne
        45666 by: Reuben D Budiardja
        45667 by: Joe Sheble \(Wizaerd\)

PDF Output & Printing
        45669 by: dennis moore

Re: 'How to jump..' part 2
        45670 by: Christian Dechery
        45671 by: Christian Dechery

memory allocation in &$var...
        45672 by: Christian Dechery
        45679 by: Yasuo Ohgaki

getting number of days in agiven month
        45674 by: Juan Luis Baptiste
        45675 by: Jason Murray
        45676 by: David Robley

Re: The ubitquitous forum project
        45678 by: Stephan Ahonen
        45680 by: Pierre-Yves Lemaire

Re: sql problem
        45681 by: Brett Bandy

Strings in URL
        45682 by: Claudia
        45683 by: Jack Dempsey
        45684 by: David Robley
        45685 by: CC Zona
        45688 by: trogers

examine inner workings of functions
        45686 by: Jack Dempsey

Is it possible?
        45687 by: Deependra B. Tandukar
        45694 by: Luke Welling
        45699 by: Deependra B. Tandukar
        45700 by: Philip Olson

setting Check box
        45689 by: Peter Houchin
        45690 by: David Robley
        45692 by: Peter Houchin
        45693 by: Jason Murray
        45695 by: elists.elliston.net
        45696 by: Philip Olson
        45697 by: David Robley

Help with Posting Data
        45691 by: Peter Phillips

newbie question
        45698 by: Francis Xavier

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]


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


Hi folks,

Version 1.0 of my POP mail client "PHPost" is now available for download
(it's freeware) at http://webgadgets.com/

There's one problem that's bugging me though.  The script checks for the
mcrypt module and uses it to encrypt/decrypt the contents of the session
data file.  If it's not available it base 64 encodes it (not really secure,
but better than plain text storage).

Anyway, it seems to work fine with or without mcrypt except for one thing.
PHP is running as an Apache module (FreeBSD, latest Apache) and the Apache
process itself will die with a seg fault immediately after the php script
is processed.  From the users point of view everything seems fine since it
happens after the page is displayed, and Apache just fires up a new process
to replace the dead child.  This only happens if I use the mcrypt functions,
yet they appear to work properly (the file is encrypted and decrypted
properly).

Any thoughts?

You can see how I'm using the functions if you look at the source to PHPost.

Mark




Hello,

Using GD i get this error.  I know what it means I just wanted to know if
anyone knew how I resolve it.

Error: ImageCreateFromJpeg: No JPEG support in this PHP build in jpg.php on
line 5

Do I need to get new GD files and change php.ini or chan I just change the
library?

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





H-

You might want to make sure your version of GD supports JPG format. 

If I'm not mistaken newer versions of GD don't support GIF anymore and
the earlier versions of GD didn't support JPG but PNG format has always
been supported. 

Maybe it's related to GD and not PHP at all. 

Just a thought. 
-Sterling


Brandon Orther wrote:
> 
> Hello,
> 
> Using GD i get this error.  I know what it means I just wanted to know if
> anyone knew how I resolve it.
> 
> Error: ImageCreateFromJpeg: No JPEG support in this PHP build in jpg.php on
> line 5
> 
> Do I need to get new GD files and change php.ini or chan I just change the
> library?
> 
> Thank you,
> 
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




On Tue, 27 Mar 2001 05:09, Brandon Orther wrote:
> Hello,
>
> Using GD i get this error.  I know what it means I just wanted to know
> if anyone knew how I resolve it.
>
> Error: ImageCreateFromJpeg: No JPEG support in this PHP build in
> jpg.php on line 5
>
> Do I need to get new GD files and change php.ini or chan I just change
> the library?
>
> Thank you,
>

You probably don't have, or didn't point your compile to, the jpeg 
library. If you still have your PHP source and compiled stuff, look in 
config.log for clues - search for libjpeg.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hi.  I'm a converted Perl guy.  While I generally like PHP better than Perl,
I do severely miss the Perl operator qq, which allowed statements (in my
case, lengthy SQL statements) to be written on multiple lines.

$this = qq|Select *
                From xsdfs
                Group by date
                Order by id
                |;

Is there anything similar to this in PHP?  I've been unable to find it if
there is.

Michael Hall
Prairie Fire Internet Technologies
[EMAIL PROTECTED]





$this = "Select *
             From xsdfs
            Group by date
            Order by id";

Should work.

Cal
http://www.calevans.com


-----Original Message-----
From: Michael Hall [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 1:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] equivalent to PERL's qq


Hi.  I'm a converted Perl guy.  While I generally like PHP better than Perl,
I do severely miss the Perl operator qq, which allowed statements (in my
case, lengthy SQL statements) to be written on multiple lines.

$this = qq|Select *
                From xsdfs
                Group by date
                Order by id
                |;

Is there anything similar to this in PHP?  I've been unable to find it if
there is.

Michael Hall
Prairie Fire Internet Technologies
[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]






> http://php.net/manual/en/function.exec.php
>
> $return = exec("/pathtocgi/script.cgi VAR1 VAR2 &");
>
> if you want the data returned, its in $return.


If there are multiple lines returned, you'll only get the last line in
$return.

See the manual link to get the full info.

Matt Friedman


----- Original Message -----
From: "Chris Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 26, 2001 7:25 AM
Subject: Re: [PHP] Get info to a perl script and then continue without going
to that perl script.



>
>
> --
>
>  Chris Lee
>  [EMAIL PROTECTED]
>
>
>
> ""Brandon Orther"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I have a script that takes information and sends it to a cgi script using
> the header("location:
> http://www.domain.com/script.cgi?var1=VAR1&var2=VAR2").  Is there a way
for
> my script to send info to a cgi script but then keep the person connected
to
> the php script and not get the results of the cgi script?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP 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 as you got it already i am a newbie in php
could anyone please please post me what programs do I need or which could help me to 
make some php stuff 
sry for this may sound stupid to you all but all the manuals in the web just were just 
talkin' 'bout totally technical stuff

ok thnx :p




> ok as you got it already i am a newbie in php
> could anyone please please post me what programs do I need or which could 
> help me to make some php stuff 
> sry for this may sound stupid to you all but all the manuals in the web 
> just were just talkin' 'bout totally technical stuff
> 
> ok thnx :p

I hope this site will be helpful:
http://www.webdesigns1.com/php/

Jeff Oien 





buy Meloni's "PHP Essentials" or the "Teach yourself PHP in 24 hours" to
start. They are made for total beginners. Then move on to "Professional PHP
programming" or "PHP4 Bible". That will give you a better start.


>> ok as you got it already i am a newbie in php
>> could anyone please please post me what programs do I need or which could
>> help me to make some php stuff
>> sry for this may sound stupid to you all but all the manuals in the web
>> just were just talkin' 'bout totally technical stuff
>>
>> ok thnx :p
>
>I hope this site will be helpful:
>http://www.webdesigns1.com/php/
>
>Jeff Oien
>
>--
>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,

get an editor which suits your needs and demands, a server and
(if needed somr database app) and just do it by trial and error.

tutorials on php:
www.phpbuilder.com
www.webmonkey.com
www.devshed.com

feed any search engine with "php tutorials" and find more.

good luck
Johannes

p.s. what's this ":p" ??

>ok as you got it already i am a newbie in php
>could anyone please please post me what programs do I need or which could
help me to make some php stuff
>sry for this may sound stupid to you all but all the manuals in the web
just were just talkin' 'bout totally technical stuff
>
>ok thnx :p







Check out the tutorials found at :

    http://www.devshed.com/    (very basic php tutorials exist here)
    http://www.zend.com/       (quality tutorials and articles)
    http://www.phpbuilder.com/ (intermediate)
    http://php.faqts.com/      (useful words)
    http://www.php.net/manual/ (includes examples and useful 
                                user comments)
    http://www.google.com/     (prepend term 'php' and watch magic)

    http://marc.theaimsgroup.com/?l=php-general

That should be a good start :-)  The mailing list archive link is very 
valuable, or at least will be for you soon as within is an answer to
about any and all php questions.  Also check out :

    http://www.php.net/links.php

If you use windows and just want to get going, install a package :

    http://www.hotscripts.com/PHP/Scripts_and_Programs/Installation_Kits/

Some useful linux install instructions found here for apache/php/mysql...:

    http://www.e-gineer.com/instructions/

And lastly, don't fear the manual.  It may seem scary right now but soon
you'll find just how useful and wonderful it is.  Don't worry about
understanding it all but getting the words boucning around your head is a
good thing.  It's also good to know how to use a function first :)

The best way to learn is start reading and coding.  Code any and
everything your heart desires and be sure to add interesting features to
your code.  Also read and print out this :

    http://www.zend.com/zend/tut/using-strings.php


Good luck!


Regards,

Philip Olson
http://www.cornado.com/


On Mon, 26 Mar 2001, Martin Mark wrote:

> ok as you got it already i am a newbie in php
> could anyone please please post me what programs do I need or which could help me to 
>make some php stuff 
> sry for this may sound stupid to you all but all the manuals in the web just were 
>just talkin' 'bout totally technical stuff
> 
> ok thnx :p
> 





What I want to do is to use an object to create a site.I plan on 
initiaizing the object on my page index.php, and just recycling 
index.php with different variables, so that I get different pages. 
Ideally, I want the object to read a site config file, so that I can 
modify the site config file for different sites which use the same 
backend, and have each  sites page read that. What is the process of 
object creation in php4? What happens when you call new objectname? 
Where could I find this out (short of reading the source - I need to do 
this by tomorrow...)





wow. I really don't think you can pull this off in a day. In any case, I'd
recommend checking out www.phpbuilder.com and looking through the articles

-----Original Message-----
From: Kevin Beckford [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 3:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Serializing/unserializing objects


What I want to do is to use an object to create a site.I plan on
initiaizing the object on my page index.php, and just recycling
index.php with different variables, so that I get different pages.
Ideally, I want the object to read a site config file, so that I can
modify the site config file for different sites which use the same
backend, and have each  sites page read that. What is the process of
object creation in php4? What happens when you call new objectname?
Where could I find this out (short of reading the source - I need to do
this by tomorrow...)


--
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'll be reinitializing the object on every page request - objects
aren't perisistant across requests.  You can make the data in
that object persistent - basically recreate the object every page with
the old data (PHP4 sessions would be one way to go here) but you
 won't be able to make the objects themselves persistent.


Kevin Beckford wrote:

> What I want to do is to use an object to create a site.I plan on
> initiaizing the object on my page index.php, and just recycling
> index.php with different variables, so that I get different pages.
> Ideally, I want the object to read a site config file, so that I can
> modify the site config file for different sites which use the same
> backend, and have each  sites page read that. What is the process of
> object creation in php4? What happens when you call new objectname?
> Where could I find this out (short of reading the source - I need to do
> this by tomorrow...)





Hi!

What do you think is best..:
- have alot of small .php (files)?
- or a few big?

What's good & bad with these solutions?!

---------------------------------
Fredrik A. Takle
Bergen, Norway
[EMAIL PROTECTED]







Execution time!!!!!!
Big files if not well developed = large exec time meaning server timeouts.

small files = less timeouts and better debugging and modularity which ALWAYS
better. Modularity allows you to plug in and pull out pages with out
rendering you whole site unusable.

Of course you can have a few big files and some small files with it, depends
on what the big files do, Classes and common functions can be grouped
together.



""FredrikAT"" <[EMAIL PROTECTED]> wrote in message
99o8pm$480$[EMAIL PROTECTED]">news:99o8pm$480$[EMAIL PROTECTED]...
> Hi!
>
> What do you think is best..:
> - have alot of small .php (files)?
> - or a few big?
>
> What's good & bad with these solutions?!
>
> ---------------------------------
> Fredrik A. Takle
> Bergen, Norway
> [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]
>






"FredrikAT" <[EMAIL PROTECTED]> wrote:

 > Hi!
 > 
 > What do you think is best..:
 > - have alot of small .php (files)?
 > - or a few big?
 > 
 > What's good & bad with these solutions?!

Depends, usualy i dont have scripts over 1000 lines. I like to have a
few larger files in my directory seperating different similar
functionality in them, I think it's also a good idea to have all
functions in one file, makes them easy to find. But alot of small php
files can also work, I would reccommend you try some different
solutions out and find your own style.

-- 
Henrik Hansen





"Godd" <[EMAIL PROTECTED]> wrote:

 > Execution time!!!!!!
 > Big files if not well developed = large exec time meaning server timeouts.

you have any numbers for this? I think small files with slam code
takes as much memory?

 > 
 > small files = less timeouts and better debugging and modularity which ALWAYS
 > better. Modularity allows you to plug in and pull out pages with out
 > rendering you whole site unusable.

ok well depends on how you define small :) functionality for a special
function on a site can go up in many lines too.

 > 
 > Of course you can have a few big files and some small files with it, depends
 > on what the big files do, Classes and common functions can be grouped
 > together.

-- 
Henrik Hansen





If you are serious about developing PHP scripts one of the major advantages
of modularity is the ability to reuse with great ease. Developing large
files that contain many functions that are not related WILL reduce that.

Try using files that you can resue and adapt to any situation.


""FredrikAT"" <[EMAIL PROTECTED]> wrote in message
99o8pm$480$[EMAIL PROTECTED]">news:99o8pm$480$[EMAIL PROTECTED]...
> Hi!
>
> What do you think is best..:
> - have alot of small .php (files)?
> - or a few big?
>
> What's good & bad with these solutions?!
>
> ---------------------------------
> Fredrik A. Takle
> Bergen, Norway
> [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]
>






one of the nice things of dynamically created sites is the ability to
protect your site from people just using your code and potentially harming
not just your site but others.

The code that is used to the site sometimes have some very hesitive data and
data manipulation routines that you don't want getting out.



""Andre"" <[EMAIL PROTECTED]> wrote in message
99o1u7$9ep$[EMAIL PROTECTED]">news:99o1u7$9ep$[EMAIL PROTECTED]...
> Hello List,
> knows anybody an offline reader which can download not only static
websites
> but also dynamic websites especially dynamic generated links?
> Like websites which are only generated over one file over variables like
>
> "dynamic.php?siteID=3001"
>
> Thanks Andre!
>
>
>
>
>
>
>
> --
> 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]
>






On Monday 26 March 2001 20:31, you wrote:
> Hello List,
> knows anybody an offline reader which can download not only static
> websites but also dynamic websites especially dynamic generated links?
> Like websites which are only generated over one file over variables
> like
>
> "dynamic.php?siteID=3001"

Um, wget?

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

"World domination. Fast." (Linus Torvalds about Linux)




hmmm... thanks, but I want to use a directory.
I've tried "<option value="dir1/dir2/page.html">Page</option>

but the "/" url that get's passed is:

nav.php?loc=dir1%2Fdir2%2Fpage.html

can I escape the quotes somehow?

thanks!
duirfire

> -----Original Message-----
> From: Data Driven Design [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 26, 2001 2:11 AM
> To: duirfire; PHP User Group
> Subject: Re: [PHP] drop down used to redirect?
>
>
> You can do it with javascript like this.
>
> <script language="javascript">
> function go(selectBox) {
> var where = selectBox.options[selectBox.selectedIndex].value;
> if (where != "") window.location = where;
> }
> </script>
>
> <form>
> <select onchange="go(this)">
> <option value="page.html">Page</option>
> ...
>
> Or you can use PHP like this.
>
> <form action="nav.php" method="post">
> <select name="loc">
> <option value="page.html">page</option>
> ...
>
> --- nav.php ---
> <?php
> header("Location:$loc");
> ?>
>
> ----- Original Message -----
> From: duirfire <[EMAIL PROTECTED]>
> To: PHP User Group <[EMAIL PROTECTED]>
> Sent: Sunday, March 25, 2001 2:39 PM
> Subject: [PHP] drop down used to redirect?
>
>
> >
> > Hi, can anyone point me towards an example of how to use a drop down
> select
> > as a navigation jump, maybe by sending a redirect header?
> >
> > thanks!
> > duirfire
> >
> >
> >
> >
> > --
> > 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'm beginning to implement an application for a webhost that will administer
accounts (create users, mailboxes, FTP, etc.) and will be using PHP to do
this.  Are there any problems with using PHP to do this?  I have done some
research but haven't come across anything related to PHP.  Just looking to
be pointed in the right direction.  Thanks.

O.J. Alcaraz




Hi All,

Quick rookie question for you......   

I have a PHP page where I'm manipulated data and re-organized the data in
table.  Now I want to write out the page containing the table data with the
HTML file extension.  How would I go about writing out an HTML file from
within a PHP Page.

Thank you,
Rob McMahan, Jr.
Interlink Group Inc.
[EMAIL PROTECTED]




On Tue, 27 Mar 2001 07:01, Rob McMahan, Jr. wrote:
> Hi All,
>
> Quick rookie question for you......
>
> I have a PHP page where I'm manipulated data and re-organized the data
> in table.  Now I want to write out the page containing the table data
> with the HTML file extension.  How would I go about writing out an HTML
> file from within a PHP Page.
>
> Thank you,
> Rob McMahan, Jr.
> Interlink Group Inc.
> [EMAIL PROTECTED]

If you mean write to disk, you'll need the Filesystem functions; fopen, 
fwrite and fclose probably. You'll need to have the data you want to 
write out stored in an array, and you'll need to be aware of permission 
issues when trying to create files with fopen.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




        Running linux RH 7, apache and php 4.04 as a module. I have a web
pagewith an image that is chopped up and regrouped into a table. There
are a few spots on the image that link (a href="") to other pages and I
use some javascript for rollovers. Now, within the table, I have two
input fields and I have another word which is part of the larger image
that the user clicks to submit the form. This is done with <input
type="image" src="xxx">. The image can be clicked which in turn calls a
login script, if the form data is found in the database a session is
started and a few session vars are registered. The SID is passed along
with the URL and everything works fine. My sticking spot is that I would
like the image that is used as the "submit" button for the form to also
use "MouseOver". In my above outline, the image works fine as a submit
button, but I am afraid people may not think to click there to submit
thier login info.

I tried the following javascript to the form page which gives me my
"mouseOver" functionality but thats where it stops. 

<SCRIPT LANGUAGE="Javascript">
function sub()
{
document.mainlogin.submit();
}
</SCRIPT>

......

<a href="javascript: sub()" onMouseOver="if(document.images)
document.logo211.src='5x2over.gif';" onMouseOut="if(document.images)
document.logo211.src='5x2.gif';"><img SRC="5x2.gif" NAME="logo211"
BORDER=0 height=20 width=79></a>

        My login script creates a session and then uses header()(and I append
the SID) to forward the user to the main page where I again issue
"session_start" to continue the session. In the browser, after pressing
the submit image it just stays there, but on the server I am having two
sessions created. I presume one for the loging script and another when
session_start is called on the main page. One session contains the
appropriate registered vars but apparently the SID is not being passed
from the login script to the main page. The only thing I have played
with is the form, not the login script or the main page. When I dont use
javascript for submitting the form everything works fine, yet when I
implement javascript to submit the form it ceases to function. Anyone
have any ideas?  
-- 
Larry Hotchkiss




On Sat, Mar 24, 2001 at 05:05:59PM -0500, Matt Adams wrote:
> I recently wrote a (yet another) mailing portal which takes a certain
> action based on the contents of a hidden form field (i.e. if state==deliver
> then deliver mail to the recipient).  Although I am certain the code
> could be better etc. etc. it works fine.  I tested it on a Linux box
> running Apache-1.3.17 and PHP-4.0.4pl1 (as a module).  However, when I
> transferred the project to another Linux server running Apache-1.3.12 and
> PHP-4.0.0 (also running as a module), the mailing portal refused to
> function properly.  I discovered that the code that controls what action
> is taken was not picking up on the form contents passed to it.
> 
> For a brief example, I have a file named "compose.php" which contains a
> form that passes a hidden field called "state" with the value "compose" to
> a file called "control.php" using the POST method.  "control.php" is
> supposed to pick up on the "state" and sends the content of the
> "compose.php" form to the deliver stage.  Unfortunately, it appears that
> "control.php" is not seeing any of the form data from "compose.php".
> 
> My question is this: is there a setting in PHP (set either at compile or
> in the php.ini) that controls whether or not a PHP script will accept data
> passed to it via POST or GET?

I'm not sure but I think register_globals or something like that could
be the problem.  I'm pretty sure that with this set, you don't have to
use the $HTTP_GET_VARS or $HTT_POST_VARS arrays.  Without it set, you
are forced to use these arrays.

register_globals = on:
$HTTP_GET_VARS['testme']; // will have form info
$testme // will have form info

register_globals = off:
$HTTP_GET_VARS['testme'] // will have form info
$testme // will be empty

I could be completely wrong, but I think this is how that works.

-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
The prayer of serenity applies here.  To both of us.  :-)
             -- Larry Wall in <[EMAIL PROTECTED]>




Apologies if this has been addressed earlier.

I'm using session.auto_start under an apache-ssl driven site, and it seems
that the sesion ID cookies aren't being sent with the "secure" flag
set. As a result, the browser is effectively ignoring the cookie.

Is this an obvious configuration problem that I'm too dumb to figure out,
or should I actually be worried?

Thanks,

Sam Leibowitz ([EMAIL PROTECTED])
Project Manager
Business Technology Center (http://www.btcwcu.org)





Hi folks

An unusual problem (I think) with how to save state in an error class.

THE AIM is to consolodate PHP errors, user errors and failed asserts
into one common format, which can then be written to screen, logged,
emailed or written to a socket in any combination required.

THE MECHANISM is to a) register callbacks for the PHP generated errors
and assertions, and to b) put user errors into the php system with
trigger_error(), so PHP routes them to the error callback function.

The callback functions instantiate the error class and pass through
the parameters. The class then handles the error output and calls the
appropriate error handler.

THE ISSUE is that unlike a normal class, it may be called in the
background by the PHP error handler, so there is no calling function
to return a value to. Also, as the PHP errors are only WARNINGS and
NOTICES, the PHP error handler may call the class a number of times
during a single script. So as I understand it, any values stored in
the class properties will be lost as the class is re-instantiated.

So my question is this - given that the class can be called multiple
times in the background, how can state be saved so the application can
decide what action to take in response to the error?

The best I have come up with so far is to set a global constant:

function _set_error_state()
{
  if ( in_array( $this->error_number, $this->terminal_error_list ))
    {
      if ( !defined("REDIRECT_REQUIRED") && !DEBUGGING_ON )
      {
        define( "REDIRECT_REQUIRED", TRUE ) ;
      }
    }
}
This means that in production mode, the first terminal error
encountered will set a GLOBAL which can be accessed by the wider
application. The error handler is set in the same way.

This seems to work fine, but it feels like a bit of a hack. Is there a
better way to get this done?

I am very new to this game, so apologies in advance if any of this
doesn't make sense.

Thanks

Geoff Caplan
Caplan Associates






I can't figure out why this doesn't work. Rather than echo $myrow[0] which
works, I want to use the feild name. Like $myrow[make] to make reading the
code easier. IS this possible?

Here is some code:

$db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
database");

  mysql_select_db("database",$db) OR DIE("Unable to connect to database");

  $result = mysql_query("SELECT * FROM stock",$db);

while ($myrow = mysql_fetch_row($result))
{
echo "$myrow[id]<br>";      //Usually $myrow[0] etc
echo "$myrow[make]<br>";
echo "$myrow[model]<br>";
echo "$myrow[sub_model]<br>";
}

Thanks Heaps


--
Regards,


YoBro
-------------------------------------------------------------
DO NOT REPLY TO THIS VIA EMAIL
PLEASE USE THE NEWSGROUP
All emails sent to this address are automatically deleted.
This is to avoid SPAM!
-------------------------------------------------------------






You need to use:

mysql_fetch_array($result) to use the "column names".

And also, you must use quotes when referencing the column names.

eg.

printf("%s\n", $myrow["id"]);


> -----Original Message-----
> From: YoBro [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 27 March 2001 08:53
> To: [EMAIL PROTECTED]
> Subject: [PHP] What could I be doing wrong here
>
>
> I can't figure out why this doesn't work. Rather than echo $myrow[0] which
> works, I want to use the feild name. Like $myrow[make] to make reading the
> code easier. IS this possible?
>
> Here is some code:
>
> $db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
> database");
>
>   mysql_select_db("database",$db) OR DIE("Unable to connect to database");
>
>   $result = mysql_query("SELECT * FROM stock",$db);
>
> while ($myrow = mysql_fetch_row($result))
> {
> echo "$myrow[id]<br>";      //Usually $myrow[0] etc
> echo "$myrow[make]<br>";
> echo "$myrow[model]<br>";
> echo "$myrow[sub_model]<br>";
> }
>
> Thanks Heaps
>
>
> --
> Regards,
>
>
> YoBro
> -------------------------------------------------------------
> DO NOT REPLY TO THIS VIA EMAIL
> PLEASE USE THE NEWSGROUP
> All emails sent to this address are automatically deleted.
> This is to avoid SPAM!
> -------------------------------------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I forget the exact syntax, but it has to do with echoing a multidimensional
array in a string. Try
echo $myrow["make"] . "<br>";
you can also use {} to encapsulte the value.
there are posts in the archives about that
-jack

-----Original Message-----
From: YoBro [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 5:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] What could I be doing wrong here


I can't figure out why this doesn't work. Rather than echo $myrow[0] which
works, I want to use the feild name. Like $myrow[make] to make reading the
code easier. IS this possible?

Here is some code:

$db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
database");

  mysql_select_db("database",$db) OR DIE("Unable to connect to database");

  $result = mysql_query("SELECT * FROM stock",$db);

while ($myrow = mysql_fetch_row($result))
{
echo "$myrow[id]<br>";      //Usually $myrow[0] etc
echo "$myrow[make]<br>";
echo "$myrow[model]<br>";
echo "$myrow[sub_model]<br>";
}

Thanks Heaps


--
Regards,


YoBro
-------------------------------------------------------------
DO NOT REPLY TO THIS VIA EMAIL
PLEASE USE THE NEWSGROUP
All emails sent to this address are automatically deleted.
This is to avoid SPAM!
-------------------------------------------------------------



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






And like this?
echo $myrow["id"] ."<br>";      //Usually $myrow[0] etc

py

At 10:53 AM 3/27/01 +1200, you wrote:
>I can't figure out why this doesn't work. Rather than echo $myrow[0] which
>works, I want to use the feild name. Like $myrow[make] to make reading the
>code easier. IS this possible?
>
>Here is some code:
>
>$db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
>database");
>
>   mysql_select_db("database",$db) OR DIE("Unable to connect to database");
>
>   $result = mysql_query("SELECT * FROM stock",$db);
>
>while ($myrow = mysql_fetch_row($result))
>{
>echo "$myrow[id]<br>";      //Usually $myrow[0] etc
>echo "$myrow[make]<br>";
>echo "$myrow[model]<br>";
>echo "$myrow[sub_model]<br>";
>}
>
>Thanks Heaps
>
>
>--
>Regards,
>
>
>YoBro
>-------------------------------------------------------------
>DO NOT REPLY TO THIS VIA EMAIL
>PLEASE USE THE NEWSGROUP
>All emails sent to this address are automatically deleted.
>This is to avoid SPAM!
>-------------------------------------------------------------
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ======================
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ======================





In article <99oh2o$f95$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("YoBro") wrote:

> I can't figure out why this doesn't work. Rather than echo $myrow[0] which
> works, I want to use the feild name. Like $myrow[make] to make reading the
> code easier. IS this possible?
> 
> Here is some code:
> 
> $db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
> database");
> 
>   mysql_select_db("database",$db) OR DIE("Unable to connect to database");
> 
>   $result = mysql_query("SELECT * FROM stock",$db);
> 
> while ($myrow = mysql_fetch_row($result))
> {
> echo "$myrow[id]<br>";      //Usually $myrow[0] etc
> echo "$myrow[make]<br>";
> echo "$myrow[model]<br>";
> echo "$myrow[sub_model]<br>";
> }

Try quoting the index key (which is, after all, a string), and moving the 
variable outside the double quotes.  Since that leaves just plain string 
text, you might as well turn the remaining double quotes to singles too.  
Save an extra microsecond or so <g>.

echo $myrow['id'] . '<br>';

-- 
CC




Thanks everybody for all your help.

It goes now.


""YoBro"" <[EMAIL PROTECTED]> wrote in message
news:99oh2o$f95$[EMAIL PROTECTED]...
: I can't figure out why this doesn't work. Rather than echo $myrow[0] which
: works, I want to use the feild name. Like $myrow[make] to make reading the
: code easier. IS this possible?
:
: Here is some code:
:
: $db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
: database");
:
:   mysql_select_db("database",$db) OR DIE("Unable to connect to database");
:
:   $result = mysql_query("SELECT * FROM stock",$db);
:
: while ($myrow = mysql_fetch_row($result))
: {
: echo "$myrow[id]<br>";      //Usually $myrow[0] etc
: echo "$myrow[make]<br>";
: echo "$myrow[model]<br>";
: echo "$myrow[sub_model]<br>";
: }
:
: Thanks Heaps
:
:
: --
: Regards,
:
:
: YoBro
: -------------------------------------------------------------
: DO NOT REPLY TO THIS VIA EMAIL
: PLEASE USE THE NEWSGROUP
: All emails sent to this address are automatically deleted.
: This is to avoid SPAM!
: -------------------------------------------------------------
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: [EMAIL PROTECTED]
: For additional commands, e-mail: [EMAIL PROTECTED]
: To contact the list administrators, e-mail: [EMAIL PROTECTED]
:






I have a huge database-driven list of clients with a checkbox next to each
one.  When I check one of these clients, I'm wanting one of those small
javascript boxes to pop up and display the contacts for this client (another
database lookup) and allow me to select one via a radio button.  I figured I
could do this via the checkbox's onclick event, but I'm not completely sure
how.

How do I bring up the box and display database information within?  Any help
is GREATLY appreciated.

-- 
Michael Champagne, Software Engineer
Capital Institutional Services, Inc.
wk: [EMAIL PROTECTED]
hm: [EMAIL PROTECTED]



******************************************************************
This communication is for informational purposes only.  It is not
intended as an offer or solicitation for the purchase or sale of 
any financial instrument or as an official confirmation of any 
transaction, unless specifically agreed otherwise.  All market 
prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without
notice.  Any comments or statements made herein do not 
necessarily reflect the views or opinions of Capital Institutional
Services, Inc.  Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission.  Use of this communication by other than intended
recipients is prohibited.
******************************************************************




At 05:11 PM 3/26/01 -0600, Michael Champagne wrote:
>I have a huge database-driven list of clients with a checkbox next to each
>one.  When I check one of these clients, I'm wanting one of those small
>javascript boxes to pop up and display the contacts for this client (another
>database lookup) and allow me to select one via a radio button.  I figured I
>could do this via the checkbox's onclick event, but I'm not completely sure
>how.
>
>How do I bring up the box and display database information within?  Any help
>is GREATLY appreciated.

What I did for something like this was: I donwloaded all the information 
that I'm (probably) going to use and store it in variables/arrays, but I 
don't display them.
Only after an event happened, like onClick, I display the relevant 
information using javascript, since javascript can access a php variable.

I don't if this can work for your problem. But the idea basically is 
download everything first from server side, and display what is necessary 
from client side. That way you minimizing the reload/refresh, which take 
painfully long time for some of the clients.

Hope that helps
Reuben D. Budiardja


Reuben D. Budiardja
Web Database Application Programmer / Analyst
Devcorps, ITS
Goshen College, IN 46526





in the onCLick event of the checkbox call a javascript function.  In that
function use a window.open() method to open aother browser window, using the
open() methods various properties to control how that browser window looks
and feels.  For the URL for that browser window, make it a PHP script
passing an ID.  That script would run against the server and database,
returning the results in whatever HTML format you include in that browser
window.  Works similiar to a popup but allows you to run a dynamic script
instead of loading up on javascript arrays or variables when the page loads.

Joseph E. Sheble
a.k.a. Wizaerd
Wizaerd's Realm
Canvas, 3D, Graphics,
ColdFusion, PHP, and mySQL
http://www.wizaerd.com
=================================

> -----Original Message-----
> From: Reuben D Budiardja [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 26, 2001 4:29 PM
> To: Michael Champagne; PHP General Mailing List
> Subject: Re: [PHP] Is this possible? PHP + Javascript
>
>
> At 05:11 PM 3/26/01 -0600, Michael Champagne wrote:
> >I have a huge database-driven list of clients with a checkbox
> next to each
> >one.  When I check one of these clients, I'm wanting one of those small
> >javascript boxes to pop up and display the contacts for this
> client (another
> >database lookup) and allow me to select one via a radio button.
> I figured I
> >could do this via the checkbox's onclick event, but I'm not
> completely sure
> >how.
> >
> >How do I bring up the box and display database information
> within?  Any help
> >is GREATLY appreciated.
>
> What I did for something like this was: I donwloaded all the information
> that I'm (probably) going to use and store it in variables/arrays, but I
> don't display them.
> Only after an event happened, like onClick, I display the relevant
> information using javascript, since javascript can access a php variable.
>
> I don't if this can work for your problem. But the idea basically is
> download everything first from server side, and display what is necessary
> from client side. That way you minimizing the reload/refresh, which take
> painfully long time for some of the clients.
>
> Hope that helps
> Reuben D. Budiardja
>
>
> Reuben D. Budiardja
> Web Database Application Programmer / Analyst
> Devcorps, ITS
> Goshen College, IN 46526
>
>
> --
> 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 have a basic question regarding the printing quality using the PDF functions and 
lib.  

I need to place a high resolution image TIF or JPEG into a PDF file along with normal 
text from a database.  The desired output will be printed at 600dpi.  

Are there issues associated in doing this with the PDF lib?  I realize that the 
application uses 72 Postscript fonts.   I don't know what this means as far as 
printing.  Any ideas or suggestions?

Thanks,
/dkm



I need to print the output at 600dpi.





>I don't think PHP will understand commas as command separators.
>
>Perhaps what you could try is a simple loop 0 to 6 and for each iteration
>of the loop, unset the corresponding array element
>
>for($i=0; $i <= 6; $i++) {
>  unset($array[$i];
>  }

I got it working, and YES... PHP did understand the commas as separators 
just like in C...

so what I have now is

for(reset($array),$count=0;$count<7;array_shift($array),$count++);
//this removes the 7 top elements of an array...

I wonder if I did a function like array_sshift(&$array,$number_of_elements) 
it would work fine... I'll try...

but thanks anyway... :)
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer






>I don't think PHP will understand commas as command separators.
>
>Perhaps what you could try is a simple loop 0 to 6 and for each iteration
>of the loop, unset the corresponding array element
>
>for($i=0; $i <= 6; $i++) {
>  unset($array[$i];
>  }

this actually worked... thanks for the hint:

<pre>
         function array_sshift(&$array,$number_of_elements=1)
         {
                 for($count=0;$count<$number_of_elements;$count++)
                 {
                         array_shift($array);
                 }
         }
</pre>
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer





By doing this:

<?php
        $someArray=array("this","that","those");
        for(something to loop)
                do something with $someArray here;
?>

is PHP using the same amount of memory as this:

<?php
        $someArray=array("this","that","those");
        somefunction($someArray);

        function somefunction(&$ref_to_array)
        {
                for(something to loop)
                        do something with $ref_to_array here;
        }
?>

because it seems to me, that the script gets a little slower when I 
introduce the function method.
                
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer





I got the same results from my benchmarks, also.
Unless you want to change variable in function and get modified value, do not
use reference.
Without reference, PHP4 executes script faster. Due to reference counting in
PHP4, probably.

Regards,

--
Yasuo Ohgaki


"Christian Dechery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> By doing this:
>
> <?php
> $someArray=array("this","that","those");
> for(something to loop)
> do something with $someArray here;
> ?>
>
> is PHP using the same amount of memory as this:
>
> <?php
> $someArray=array("this","that","those");
> somefunction($someArray);
>
> function somefunction(&$ref_to_array)
> {
> for(something to loop)
> do something with $ref_to_array here;
> }
> ?>
>
> because it seems to me, that the script gets a little slower when I
> introduce the function method.
>
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hi,

Is there a way to find out the mumber of days of a given month? for

example a function that I pass the month number i.e. 02 (February) and

it returns 28?

thanks.







> Is there a way to find out the mumber of days of a given month? for
> example a function that I pass the month number i.e. 02 (February) and
> it returns 28?

Date("t", $unixtimestamp);

If you have a month "2", you need a year as well since February's days vary
according to the year, so:

$daysinmonth = Date("t", mktime(0, 0, 0, $month, 1, $year));

Jason




On Tue, 27 Mar 2001 10:22, Juan Luis Baptiste wrote:
> Hi,
>
> Is there a way to find out the mumber of days of a given month? for
>
> example a function that I pass the month number i.e. 02 (February) and
>
> it returns 28?
>
> thanks.

See date() and the t format character.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




[Explanation of UBB-style]

...And that's USENET-style. In OE I can expand and contract threads at will,
like you mentioned, and I can tell which posts are in reply to which other
posts.

Sig for a Day
Stephan Ahonen, ICQ 491101
"That's very funny Scotty, now beam down my clothes!"
Come back tomorrow for a different sig!
Backspace a single "s" to reply by email





The style of forum you choose for your site depends on your users.
Novice user have a difficult time with usenet or bbs style forum.
They will not use it unless you make it very easy. That is why you
see bilboard style forum on large public site or portals. They have done 
user testing.

py


At 07:37 PM 3/26/01 -0600, you wrote:
>[Explanation of UBB-style]
>
>...And that's USENET-style. In OE I can expand and contract threads at will,
>like you mentioned, and I can tell which posts are in reply to which other
>posts.
>
>Sig for a Day
>Stephan Ahonen, ICQ 491101
>"That's very funny Scotty, now beam down my clothes!"
>Come back tomorrow for a different sig!
>Backspace a single "s" to reply by email
>
>
>--
>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]


+ ======================
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ======================





InterBase isn't real good with subselects.

Try using a join instead:

select e.empname from employer e join badclient b on e.empno =
b.employercode where b.pesal = '$Persal';

Brett

""Wade Halsey"" <[EMAIL PROTECTED]> wrote in message
00a501c0b38b$e2a27ea0$256410ac@wadeh">news:00a501c0b38b$e2a27ea0$256410ac@wadeh...
Hi ppl

("select empname from employer where empno = (select employercode from
badclient where pesal = '$Persal')")

Could anyone help me out with the syntax?

Im running an interbase db and php4.04

Thanks
Wade







I am attempting to pass a string value via a URL.  I have tried using
urlencode and ereg_replace--with no luck.

Here is sample code:

$headline=urlencode("$headline");
print "<a href
='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&;
subject=$headline'><b>Contact us for more information</b></a></font>";

Then in the quotepage.php3 file

if( $page == "miniquote" )
{

print "Get A Quote<br>";
print "$subject";
print "$site";

INCLUDE "mini_quote.inc.php3";
}

--->The print "$subject"; line prints nothing.

If I print $headline right after I assign the variable it prints correctly
with +s in place of the blanks for this variable.

Any suggestions?








I believe you have to urldecode. Try that and see what happens...

-jack

-----Original Message-----
From: Claudia [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 9:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Strings in URL


I am attempting to pass a string value via a URL.  I have tried using
urlencode and ereg_replace--with no luck.

Here is sample code:

$headline=urlencode("$headline");
print "<a href
='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&;
subject=$headline'><b>Contact us for more information</b></a></font>";

Then in the quotepage.php3 file

if( $page == "miniquote" )
{

print "Get A Quote<br>";
print "$subject";
print "$site";

INCLUDE "mini_quote.inc.php3";
}

--->The print "$subject"; line prints nothing.

If I print $headline right after I assign the variable it prints correctly
with +s in place of the blanks for this variable.

Any suggestions?





--
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]






On Tue, 27 Mar 2001 12:11, Claudia wrote:
> I am attempting to pass a string value via a URL.  I have tried using
> urlencode and ereg_replace--with no luck.
>
> Here is sample code:
>
> $headline=urlencode("$headline");
> print "<a href
> ='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniq
>uote& subject=$headline'><b>Contact us for more
> information</b></a></font>";
>
> Then in the quotepage.php3 file
>
> if( $page == "miniquote" )
> {
>
> print "Get A Quote<br>";
> print "$subject";
> print "$site";
>
> INCLUDE "mini_quote.inc.php3";
> }
>
> --->The print "$subject"; line prints nothing.
>
> If I print $headline right after I assign the variable it prints
> correctly with +s in place of the blanks for this variable.
>
> Any suggestions?

What appears in the first script as the text of the link when you 'view 
source'?

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




In article <99ou1p$tif$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Claudia") wrote:

> $headline=urlencode("$headline");
> print "<a href
> ='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&;
> subject=$headline'><b>Contact us for more information</b></a></font>";
> 
> Then in the quotepage.php3 file
> 
> if( $page == "miniquote" )
> {
> 
> print "Get A Quote<br>";
> print "$subject";
> print "$site";
> 
> INCLUDE "mini_quote.inc.php3";
> }
> 
> --->The print "$subject"; line prints nothing.
> 
> If I print $headline right after I assign the variable it prints correctly
> with +s in place of the blanks for this variable.

By any chance is that "print" line occuring within a function?  The fact 
that it prints fine then becomes "blank" later sounds like a classic global 
scope vs. local scope symptom.

-- 
CC




the href should be
print "<a href
=\"http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&;
subject=$headline'\">
I think..
Tom

At 09:41 PM 26/03/01 -0500, Claudia wrote:
>I am attempting to pass a string value via a URL.  I have tried using
>urlencode and ereg_replace--with no luck.
>
>Here is sample code:
>
>$headline=urlencode("$headline");
>print "<a href
>='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&;
>subject=$headline'><b>Contact us for more information</b></a></font>";
>
>Then in the quotepage.php3 file
>
>if( $page == "miniquote" )
>{
>
>print "Get A Quote<br>";
>print "$subject";
>print "$site";
>
>INCLUDE "mini_quote.inc.php3";
>}
>
>--->The print "$subject"; line prints nothing.
>
>If I print $headline right after I assign the variable it prints correctly
>with +s in place of the blanks for this variable.
>
>Any suggestions?
>
>
>
>
>
>--
>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 all,

I was thinking about some of the built-in functsions (like array_sort) and
was wondering how I could find out what the code is behind them. ie, is it
an insertion sort? quicksort? etc...do i have to look into CVS for that?
thanks!

-jack





Greetings !

Is it possible to extract the field values in MySQL by PHP into the web
browser so that it looks like files in Windows Explorer?

Looking forward to hearing from you.

Warm Regards,
Deependra B. Tandukar





""Deependra B. Tandukar"" wrote:
> Is it possible to extract the field values in MySQL by PHP into the web
> browser so that it looks like files in Windows Explorer?

That depends a little on what you mean.

Making it _look_ like Windows Explorer should be easy.  You can create HTML
tables to mimic the layout and some gifs to mimic the graphics and create it
using PHP from your data fairly easily.

Making it _work_ like Windows Explorer will be much harder.  Trying to
duplicate all the menu functionality and all the right click functionality
with any degree of crossbrowser reliability will send you spiralling into
JavaScript Hell.

Luke Welling.






Thanks!

I just need to browse the fields from the table, that's it.

Some ideas please.

Warm Regards,
Deependra B. Tandukar


----- Original Message -----
From: "Luke Welling" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 11:03 AM
Subject: Re: [PHP] Is it possible?


> ""Deependra B. Tandukar"" wrote:
> > Is it possible to extract the field values in MySQL by PHP into the web
> > browser so that it looks like files in Windows Explorer?
>
> That depends a little on what you mean.
>
> Making it _look_ like Windows Explorer should be easy.  You can create
HTML
> tables to mimic the layout and some gifs to mimic the graphics and create
it
> using PHP from your data fairly easily.
>
> Making it _work_ like Windows Explorer will be much harder.  Trying to
> duplicate all the menu functionality and all the right click functionality
> with any degree of crossbrowser reliability will send you spiralling into
> JavaScript Hell.
>
> Luke Welling.
>
>
>
> --
> 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 setup do you have?  assuming mysql and just starting out :

learn a few basics :
  http://devshed.com/Server_Side/PHP/PHP101_1/ (part 1 of 5)

know about strings :
  http://www.zend.com/zend/tut/using-strings.php
  
nail down some sql :
  http://www.sqlcourse.com/

interact thy mysql :
  http://devshed.com/Server_Side/PHP/DB_Basics/

realize that these are ways to do it, not thee only way.  you may enjoy
this too :

  http://viewcvs.php.net/viewcvs.cgi/php4/pear/CODING_STANDARDS?rev=1.5

some good info in there.  the manual has very nice examples too!  also,
many useful sites exist out there, use google to find them. ;)

warm regards,

philip

.sig
       i google on odwalla



On Tue, 27 Mar 2001, Deependra B. Tandukar wrote:

> Thanks!
> 
> I just need to browse the fields from the table, that's it.
> 
> Some ideas please.
> 
> Warm Regards,
> Deependra B. Tandukar
> 
> 
> ----- Original Message -----
> From: "Luke Welling" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 27, 2001 11:03 AM
> Subject: Re: [PHP] Is it possible?
> 
> 
> > ""Deependra B. Tandukar"" wrote:
> > > Is it possible to extract the field values in MySQL by PHP into the web
> > > browser so that it looks like files in Windows Explorer?
> >
> > That depends a little on what you mean.
> >
> > Making it _look_ like Windows Explorer should be easy.  You can create
> HTML
> > tables to mimic the layout and some gifs to mimic the graphics and create
> it
> > using PHP from your data fairly easily.
> >
> > Making it _work_ like Windows Explorer will be much harder.  Trying to
> > duplicate all the menu functionality and all the right click functionality
> > with any degree of crossbrowser reliability will send you spiralling into
> > JavaScript Hell.
> >
> > Luke Welling.
> >
> >
> >
> > --
> > 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]
> 





Hiya can some one pls let me know if i am on the right track pls, this is in a form 
that updates if there is an id else it inserts, now what i want it if there is an id i 
want the check box to be either checked or unchecked depending on the 'y' / 'n' value 
in the db

<input type="checkbox" name="avail" value="" <? if ($avail == 'n') { echo 'SELECTED '; 
}?>">

Peter Houchin
[EMAIL PROTECTED]
=========================================================
     _____                              __   /\
    /_/_/_\                            /  |_/  \
   /_/_/_    __  __  __   __          /         \
   \_/_/_\  /_/ /_/ /_/  /_/          \   _     /
 ___\_\_\/ /_/_/_/ /_//\/_/            \_/ \/\_/
 \_//_/_/ /_/_/_/ /_/ \/_/                    v
     ________   ________________________________________
    /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
   /_/_ _/_/ ______  __   __  /_/ ____      __     ______
  /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\    /_/    /_/_/_/
 /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
/_/    \_\/_/_/_/ /_/ \/_/ /_/ /_/    \_\/_/_/_//_/_/_/
=========================================================
Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
************* We rent the dot in .COM!  **************
 




On Tue, 27 Mar 2001 13:55, Peter Houchin wrote:
> Hiya can some one pls let me know if i am on the right track pls, this
> is in a form that updates if there is an id else it inserts, now what i
> want it if there is an id i want the check box to be either checked or
> unchecked depending on the 'y' / 'n' value in the db
 
> <input type="checkbox" name="avail" value="" <? if ($avail == 'n') {
> echo 'SELECTED '; }?>">
 
> Peter Houchin

Try CHECKED for checkboxes - SELECTED works for dropdowns.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




>> Hiya can some one pls let me know if i am on the right track pls, this
>> is in a form that updates if there is an id else it inserts, now what i
>> want it if there is an id i want the check box to be either checked or
>> unchecked depending on the 'y' / 'n' value in the db
 
>> <input type="checkbox" name="avail" value="" <? if ($avail == 'n') {
>> echo 'SELECTED '; }?>">
 
>> Peter Houchin

> Try CHECKED for checkboxes - SELECTED works for dropdowns.

ok I've changed it the SELECT to CHECKED but it had no effect ... 
<input type="checkbox" name="avail" value="" <? if ($avail == 'n') { echo 'CHECKED'; 
}?>>

I've also tried it with a "n" value  so it reads like 
<input type="checkbox" name="avail" value="n" <? if ($avail == 'n') { echo 'CHECKED'; 
}?>> but that didn't have any luck either ... is there anything else i can do?

Peter




> ok I've changed it the SELECT to CHECKED but it had no effect ... 
> <input type="checkbox" name="avail" value="" <? if ($avail == 
> 'n') { echo 'CHECKED'; }?>>
> 
> I've also tried it with a "n" value  so it reads like 
> <input type="checkbox" name="avail" value="n" <? if ($avail 
> == 'n') { echo 'CHECKED'; }?>> but that didn't have any luck 
> either ... is there anything else i can do?

Send some code to the list, ie the full statement? If you're in
an echo "........" statement, of course you can't drop into <?if {}?>
commands, etc.

Jason




Try setting up your code so that the following is the result:

<input type="checkbox" name="avail" checked>
or
<input type="checkbox" name="avail">

Andrew Elliston


On Monday, March 26, 2001, at 11:54 PM, Peter Houchin wrote:

>>> Hiya can some one pls let me know if i am on the right track pls, this
>>> is in a form that updates if there is an id else it inserts, now 
>>> what i
>>> want it if there is an id i want the check box to be either checked or
>>> unchecked depending on the 'y' / 'n' value in the db
>
>>> <input type="checkbox" name="avail" value="" <? if ($avail == 'n') {
>>> echo 'SELECTED '; }?>">
>
>>> Peter Houchin
>
>> Try CHECKED for checkboxes - SELECTED works for dropdowns.
>
> ok I've changed it the SELECT to CHECKED but it had no effect ...
> <input type="checkbox" name="avail" value="" <? if ($avail == 'n') 
> { echo 'CHECKED'; }?>>
>
> I've also tried it with a "n" value  so it reads like
> <input type="checkbox" name="avail" value="n" <? if ($avail == 'n') 
> { echo 'CHECKED'; }?>> but that didn't have any luck either ... is 
> there anything else i can do?
>
> Peter





Use that code, $avail just isn't evaluating to 'n' so try this somewhere
above it :

  $avail = 'n';

And it will be checked otherwise it won't.  And btw, you tried setting
value="n" that won't work unless this script submits to itself AND the
user checks it before submitting so it'll remain checked.

What are you wanting to do and where does $avail originally come from?

Regards,

Philip


On Tue, 27 Mar 2001, Peter Houchin wrote:

> >> Hiya can some one pls let me know if i am on the right track pls, this
> >> is in a form that updates if there is an id else it inserts, now what i
> >> want it if there is an id i want the check box to be either checked or
> >> unchecked depending on the 'y' / 'n' value in the db
>  
> >> <input type="checkbox" name="avail" value="" <? if ($avail == 'n') {
> >> echo 'SELECTED '; }?>">
>  
> >> Peter Houchin
> 
> > Try CHECKED for checkboxes - SELECTED works for dropdowns.
> 
> ok I've changed it the SELECT to CHECKED but it had no effect ... 
> <input type="checkbox" name="avail" value="" <? if ($avail == 'n') { echo 'CHECKED'; 
>}?>>
> 
> I've also tried it with a "n" value  so it reads like 
> <input type="checkbox" name="avail" value="n" <? if ($avail == 'n') { echo 
>'CHECKED'; }?>> but that didn't have any luck either ... is there anything else i can 
>do?
> 
> Peter
> 






On Tue, 27 Mar 2001 14:24, Peter Houchin wrote:
> >> Hiya can some one pls let me know if i am on the right track pls,
> >> this
 is in a form that updates if there is an id else it inserts,
> >> now what i want it if there is an id i want the check box to be
> >> either checked or unchecked depending on the 'y' / 'n' value in the
> >> db
>
>  
>
> >> <input type="checkbox" name="avail" value="" <? if ($avail == 'n')
> >> {
 echo 'SELECTED '; }?>">
>
>  
>
> >> Peter Houchin
>
> 
>
> > Try CHECKED for checkboxes - SELECTED works for dropdowns.
>
> 
> ok I've changed it the SELECT to CHECKED but it had no effect ... 
> <input type="checkbox" name="avail" value="" <? if ($avail == 'n') {
> echo 'CHECKED'; }?>>
 
> I've also tried it with a "n" value  so it reads like 
> <input type="checkbox" name="avail" value="n" <? if ($avail == 'n') {
> echo 'CHECKED'; }?>> but that didn't have any luck either ... is there
> anything else i can do?
 
> Peter

Well, this little snippet works for me...

<?php
$avail = 'n';
?>

<FORM ACTION=check.php METHOD=GET>
<input type="checkbox" name="avail" value="" <?php if ($avail == 'n') { 
echo 'CHECKED'; }?>>
<INPUT TYPE=SUBMIT>
</FORM>

<?php
if(isset($avail)) {
echo "Value of AVAIL: $avail";
}
?>

If you aren't getting the value you expect in $avail you may have 
problems.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hi,
I need a way to POST data to another script on another server, without using
a form and without using GET (i.e. foobar.php?name=value), I then need the
user to be sent to that page (which now has the data).

Is that possible? I found some functions (PostToHost), but they only POST
the data and do now direct the user to the site.

Any help would be appreciated.

Thanks

BTW: I can't use sessions or anything like that.






Hello!  I am relatiovely new to PHP and I need help with the "fsockopen".
Well I use this to check if the server is online or down.  But that's not
exactly what I wanted it to do.  I have this "downloads page" and I am more
into detecting if the "remote files" are  available for download or not.
Can fsockopen do this?  If so, how could I do it?  And if not, what's the
solution I can use?  Thank you.




Reply via email to