[PHP] listing dates ranges

2002-03-21 Thread rory oconnor

I am writing a php front-end to create dynamic queries on a mysql
database, and i'm a pretty new programmer!  

I want to offer the user a date range, and the dates I want to use are
stored in my database:

2002-02-17
2002-02-24
2002-03-02
2002-03-09
2002-03-15
...

and I can select them, but what method can i use to list them out in a
drop-down side-by-side so the user can select the range?

Select date range:
2002-02-17 to 2002-02-24
2002-02-24 to 2002-03-02
2002-03-02 to 2002-03-09
2002-03-09 to 2002-03-15
2002-03-15 to present

any help appreciated!

thanks,

rory




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Database Development Price Inquiry?

2002-03-21 Thread Robin Chen

We calculate the charge by $75-$150 per hour depending on complexity of the
project, then quote customer the final price.  On small projects, < $5000, its
usually half before project, and half after project.  For project > $5000,
it's usually 30% up front, 30% when we have major features completed, 30% when
delivered, last 10% when finalized.  On even large projects $15k+, we usually
go by phases.

Robin

"[-^-!-%-" wrote:

> Hello everyone,
>
> I'm in the process of revising my db development prices, and was wondering
> what the best practices were. I want to keep my prices low, but I often
> feel like I'm not charging close to what I should be charging.
>
> 1) What is the going rate for Database Development (MySQL+PHP
> or any other combo)?
>
> 2) What (or how) do you charge for MySQL+PHP database applications?
> 3) What do you factor into your pricing?
>
> We currently package our prices by the project. Example, we
> would charge one flat fee for an online database application.
> This would include everything from start to finish. Sometimes
> this works out, but other times it gets painful and tedious. I often feel
> like I'm not charging as much as I should be.
>
> 4) What is the best practice for db development pricing?
> Flat fee or hourly based? Do you charge based on the number of hours spent
> (anticipated) or by the project complexity and/or size?
>
> 5) Do you charge in stages or upon completion? For example, do you charge
> after the planning phase, development phase, etc. Or, after the project
> is complete?
>
> I'm especially interested in hearing from the West Coast (USA) developers.
> Any feedback would be greatly appreciated.
>
> Thanks.
>
> -john
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Database Development Price Inquiry?

2002-03-21 Thread Robin Chen



"[-^-!-%-" wrote:

> Hello everyone,
>
> I'm in the process of revising my db development prices, and was wondering
> what the best practices were. I want to keep my prices low, but I often
> feel like I'm not charging close to what I should be charging.
>
> 1) What is the going rate for Database Development (MySQL+PHP
> or any other combo)?
>
> 2) What (or how) do you charge for MySQL+PHP database applications?
> 3) What do you factor into your pricing?
>
> We currently package our prices by the project. Example, we
> would charge one flat fee for an online database application.
> This would include everything from start to finish. Sometimes
> this works out, but other times it gets painful and tedious. I often feel
> like I'm not charging as much as I should be.
>
> 4) What is the best practice for db development pricing?
> Flat fee or hourly based? Do you charge based on the number of hours spent
> (anticipated) or by the project complexity and/or size?
>
> 5) Do you charge in stages or upon completion? For example, do you charge
> after the planning phase, development phase, etc. Or, after the project
> is complete?
>
> I'm especially interested in hearing from the West Coast (USA) developers.
> Any feedback would be greatly appreciated.
>
> Thanks.
>
> -john
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RC4Crypt encryption opinions

2002-03-21 Thread .

I'm looking for opinions on RC4Crypt, and encryption class that I may be
looking to use as an alternative to mcrypt (which is not available on my
server).  Is it secure?  Has anyone used it?  How has it worked out?
Anything else I should be aware of?

RC4Crypt:
http://sourceforge.net/projects/rc4crypt/
http://www.paphe.com/php/tutorials/230101.php

Thanks,
Maxwell



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] More newbie help - mixing 2 different things into one database

2002-03-21 Thread Jason Sheets


- Original Message -
From: "Jason Sheets" <[EMAIL PROTECTED]>
To: "Laurie Landry" <[EMAIL PROTECTED]>
Sent: Thursday, March 21, 2002 10:35 PM
Subject: Re: [PHP] More newbie help - mixing 2 different things into one
database


> Make sure your $option_block2 is in the variable scope of your function.
If
> you do not pass this variable in as a parameter to the function and you
> don't set it global in the function the function can not see it.
>
> Try:
>
> function
>
show_form($organization="",$description="",$url="",$subject1="",$subject2=""
> ,$geographic="") {
> global $option_block2; // allow variable to be seen from inside the
function
>
> ?>
>
> If this still doesn't work you may email me the actual PHP files and also
> the HTML output that you get (view source on the page and send me the HTML
> code.
>
> I'll be glad to help you get this resolved
>
> Jason
> - Original Message -
> From: "Laurie Landry" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 21, 2002 9:45 PM
> Subject: RE: [PHP] More newbie help - mixing 2 different things into one
> database
>
>
> > Oh... maybe I should take a "How to send a full and complete email"
> > newbie class instead? :)
> >
> > Here's the code:
> >
> > Add a Link to the Links Database
> >
> >  > // create SQL statement
> > $sql = "SELECT subjects FROM subjects
> > ORDER BY subjects ASC";
> >
> > //connects into database
> > include ("cnx_db.inc");
> >
> > // execute SQL query and get result
> > $sql_result = mysql_query($sql,$connection)
> > or die("Couldn't execute query.");
> >
> > // put data into drop-down list box
> > while ($row = mysql_fetch_array($sql_result)) {
> >
> > $subjects  = $row["subjects"];
> > $option_block .= " > value=\"$subjects\">$subjects";
> > }
> >
> > // create SQL statement
> > $country_sql = "SELECT countries FROM countries
> > ORDER BY countries ASC";
> >
> > // execute SQL query and get result
> > $country_result = mysql_query($country_sql,$connection)
> > or die("Couldn't execute query.");
> >
> > // put data into drop-down list box
> > while ($row2 = mysql_fetch_array($country_result)) {
> >
> > $countries  = $row2["countries"];
> > $option_block2 .= " > value=\"$countries\">$countries";
> > }
> > function
> > show_form($organization="",$description="",$url="",$subject1="",$subject
> > 2="",$geographic="") { ?>
> > 
> >> cellspacing="0" align="center">
> > 
> > > color="#CC">*Organization:
> >   
> > 
> > 
> > 
> > 
> > > color="#CC">*Description:
> >
> >  > $description?>
> > 
> > 
> > 
> >URL:
> >   
> > 
> > 
> > 
> > 
> >*Subject
> > 1:
> >   
> > 
> >> echo $form[subject1]; ?>
> >   - Select Subject -
> >   
> > 
> > 
> > 
> > 
> >Subject 2:
> >   
> > 
> >> echo $form[subject2]; ?>
> >   
> > 
> >   
> > 
> > 
> >Geographic Region:
> >   
> > 
> >   
> >   
> >   
> >   - Countries -
> >   
> > 
> > 
> > 
> > 
> >   
> > 
> > 
> >   
> > 
> >   
> > 
> >  >
> > if(!isset($organization)) {
> > // sets the form empty if first visit
> > show_form();
> > }
> > else {
> > // Checkes to see if a required field is filled out, and if not,
> > sets a warning.
> > if(empty($organization) or empty($description) or
> > empty($subject1)) {
> > echo "Please check to make sure you have filled in all
> > of the information in the form.";
> > show_form($organization, $description, $url, $subject1,
> > $subject2, $geographic);
> > }
> > else {
> > // make that database entry
> >
> > // sets up formatting of special characters where
> > necessary
> > $esc_organization = addslashes($organization);
> > $esc_description = addslashes($description);
> > $esc_url = addslashes($url);
> > $esc_subject1 = addslashes($subject1);
> > $esc_subject2 = addslashes($subject2);
> > $esc_geographic = addslashes($geographic);
> >
> > //formats query
> > $sql = "INSERT INTO links (linkID, ORGANIZATION,
> > DESCRIPTION, URL, SUBJECT1, SUBJECT2, GEOGRAPHIC)
> > VALUES
> > ('','$esc_organization','$esc_description','$esc_url','$esc_subject1','$
> > esc_subject2','$esc_geographic')";
> >
> > // executes query
> > $sql_result = mysql_query($sql);
> > if (!$sql_result) {
> >echo "Can't execute $sql " . mysql_error();
> >exit;
> > }
> > else {
> > // strips away any escape slashes if any
> > $organization =
> > stripslashes($esc_organization);
> > $description =
> > stripslashes($esc_description);
> > $url = stripslashes($esc_url);
> > $subject1 = stripslashes($esc_subject1);
> > $subject2 = stripslashes($esc_subject2);
> > $geographic =
> > stripslashes($esc_geographic);
> > }
> > $id_sql = "SELECT * FROM links WHERE
> > ORGANIZATION='$organizat

Re: [PHP] Trap CR or "Enter" possible?

2002-03-21 Thread Jason Wong

On Friday 22 March 2002 10:52, Andre Dubuc wrote:
> Thanks Martin,
>
> I forgot to mention: I would like to accomplish this using PHP since I'm
> not using Javascript. Will this still work with straight html?

You can't have your cake and eat it :)

What you require can only be done client-side which means the only sensible 
solution is javascript.

But, what are the undesirable effects of just pressing enter? I know that in 
IE pressing enter to submit a form is not the same as clicking on the submit 
button. If that is what you are referring to then it's very easy to code 
around that and thus would not require javascript.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Yow!  Maybe I should have asked for my Neutron Bomb in PAISLEY --
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Fetching 1 array from either one of 2 possible columns?

2002-03-21 Thread Thalis A. Kalfigopoulos

The problem is in your SQL query.

Try it as:

$sql = "SELECT * FROM links WHERE (SUBJECT1='$subject' OR SUBJECT2='$subject') AND 
GEOGRAPHIC='$geographic' ORDER BY ORGANIZATION ASC";

The AND operator has higher precendence than the OR, so given that you didn't have 
parenthesis, it was interpreted as SUBEJCT1='$subejct' OR (SUBEJCT2='$subject' AND 
GEOGRAPHIC='$geographic')
and I'd bet that in the example you ran $geographic was not equal to 'Brazil' 
otherwise you'd have gotten a hit on the second row as well.

cheers,
thalis


On Thu, 14 Mar 2002, Laurie Landry wrote:

> I'm working on a query by selection type of form, where if a user
> selects a subject to get information. Each database entry will have 2
> subject fields, Subject 1 being the main subject and Subject 2 being the
> cross-subject. A table is set up like this:
> 
> +--+--+--+--+--+-+
> | ID   | Organization | URL  | SUBJECT1 | SUBJECT2 | Geographic  |
> +--+--+--+--+--+-+
> |  1   | Acme | www  |  Math|  English | Canada  |
> |  2   | Loony Toons  | www  |  Comedy  |  Math| Brazil  |
> 
> ...
> 
> 
> The idea is that the query will check the database to see if $Subject
> has a match in either Subject1 or Subject2. the geographic is an
> optional selection. If I select Math as a subject, and left the
> Geographic option unselected, I want it to go into either Subject1 and
> Subject2 to find Math. In this case both records would be a hit.
> 
> Below is my query setup and formatting:
> ***
> $sql = "SELECT * FROM links WHERE SUBJECT1='$subject' OR
> SUBJECT2='$subject' AND GEOGRAPHIC='$geographic'
>ORDER BY ORGANIZATION ASC";
> 
> $sql_result = mysql_query($sql);
> if (!$sql_result) {
>echo "Can't execute $sql " . mysql_error();
>exit;
>   }
> 
> // organizes data in an orderly manner (ie bulleted area)
> while ($row = mysql_fetch_array($sql_result)) {
> 
>   $esc_organization = $row["ORGANIZATION"];
>   $esc_desc = $row["DESCRIPTION"];
>   $esc_url = $row["URL"];
>   $esc_subject = $row["SUBJECT1"];
>   $esc_geographic = $row["GEOGRAPHIC"];
>   
>   $organization = stripslashes($esc_organization);
>   $description = stripslashes($esc_desc);
>   $url = stripslashes($esc_url);
>   $subject = stripslashes($esc_subject);
>   $geographic = stripslashes($esc_geographic);
> 
>   $option_block .= "
>   
>   http://$url\";>$organization
>   $description
>   URL: http://$url\";>$url\n";
> }
> 
> Now, of course, if I were to use this, it will only use the Subject1
> data. How do I tell it to use the results from either Subject 1 or
> Subject 2?
> 
> Thanks in advance,
> 
> Laurie M. Landry
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] More newbie help - mixing 2 different things into one database

2002-03-21 Thread Laurie Landry

Oh... maybe I should take a "How to send a full and complete email"
newbie class instead? :)

Here's the code:

Add a Link to the Links Database

$subjects";
}

// create SQL statement
$country_sql = "SELECT countries FROM countries
ORDER BY countries ASC";

// execute SQL query and get result
$country_result = mysql_query($country_sql,$connection)
or die("Couldn't execute query.");

// put data into drop-down list box
while ($row2 = mysql_fetch_array($country_result)) {

$countries  = $row2["countries"];
$option_block2 .= "$countries";
}
function
show_form($organization="",$description="",$url="",$subject1="",$subject
2="",$geographic="") { ?>

  
 
   *Organization:
   



 
   *Description:




 
   URL:
   



 
   *Subject
1:
   

  
  - Select Subject -
  



 
   Subject 2:
   

  
  

  

 
   Geographic Region:
  

  
  
  
  - Countries -
  



 
   


  

  





   
   
  
  Added to Links Database:
  
   
linkID:
 
  

  
   
Organization:
 
  

  
   
Description:
 
  

  
   
URL:
 
  

  
   
Subject 1:
 
  

  
   
Subject 2:
 
  

  
   
Geographic Region:
 
  

  
   
Modify 
  This Record | Delete 
  This Record
  




Add another Link | Modify 
a Link Record | Delete a Link
Record
View all Links Records | Return 
to Admin Menu | Go to Website



> > Hi,
> > 
> > In this example: I'm trying to introduce the selection data from 
> > another table in the database into this form.  The form is a simple 
> > form where if missing any data, you're redirected back to 
> the page to 
> > form but with data filled in some areas that you had filled 
> in before.
> > 
> > Now, instead of manually inputting the selection fields for 
> subjects 
> > and countries which will continually be updated, I've included a 
> > database where in another form, if there's a new subject to 
> be added 
> > to the database, the user will go to a different form and 
> fill in the 
> > new subject. That works.
> > 
> > Now, I'm trying to call in those data and put it into the selection 
> > option blocks - it doesn't' work, and I don't know why? 
> I've created a 
> > test page that calls in those option blocks on its own, and 
> it works, 
> > and the form with the manually-inputted subject titles or country 
> > titles works on its own as well. Somehow the two doesn't 
> mix well, and 
> > I'd appreciate help in this matter.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] More newbie help - mixing 2 different things into onedatabase

2002-03-21 Thread Thalis A. Kalfigopoulos

If you don't give any code, I doubt anyone will be able to help. The error msgs to say 
the least.


On Thu, 21 Mar 2002, Laurie Landry wrote:

> Hi,
> 
> In this example: I'm trying to introduce the selection data from another
> table in the database into this form.  The form is a simple form where
> if missing any data, you're redirected back to the page to form but with
> data filled in some areas that you had filled in before.
> 
> Now, instead of manually inputting the selection fields for subjects and
> countries which will continually be updated, I've included a database
> where in another form, if there's a new subject to be added to the
> database, the user will go to a different form and fill in the new
> subject. That works.
> 
> Now, I'm trying to call in those data and put it into the selection
> option blocks - it doesn't' work, and I don't know why? I've created a
> test page that calls in those option blocks on its own, and it works,
> and the form with the manually-inputted subject titles or country titles
> works on its own as well. Somehow the two doesn't mix well, and I'd
> appreciate help in this matter.
> 
> Thanks in advance,
> 
> Laurie M. Landry
> http://www.lmlweb.com
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Fetching 1 array from either one of 2 possible columns?

2002-03-21 Thread Laurie Landry

I'm working on a query by selection type of form, where if a user
selects a subject to get information. Each database entry will have 2
subject fields, Subject 1 being the main subject and Subject 2 being the
cross-subject. A table is set up like this:

+--+--+--+--+--+-+
| ID   | Organization | URL  | SUBJECT1 | SUBJECT2 | Geographic  |
+--+--+--+--+--+-+
|  1   | Acme | www  |  Math|  English | Canada  |
|  2   | Loony Toons  | www  |  Comedy  |  Math| Brazil  |

...


The idea is that the query will check the database to see if $Subject
has a match in either Subject1 or Subject2. the geographic is an
optional selection. If I select Math as a subject, and left the
Geographic option unselected, I want it to go into either Subject1 and
Subject2 to find Math. In this case both records would be a hit.

Below is my query setup and formatting:
***
$sql = "SELECT * FROM links WHERE SUBJECT1='$subject' OR
SUBJECT2='$subject' AND GEOGRAPHIC='$geographic'
 ORDER BY ORGANIZATION ASC";

$sql_result = mysql_query($sql);
if (!$sql_result) {
   echo "Can't execute $sql " . mysql_error();
   exit;
}

// organizes data in an orderly manner (ie bulleted area)
while ($row = mysql_fetch_array($sql_result)) {

$esc_organization = $row["ORGANIZATION"];
$esc_desc = $row["DESCRIPTION"];
$esc_url = $row["URL"];
$esc_subject = $row["SUBJECT1"];
$esc_geographic = $row["GEOGRAPHIC"];

$organization = stripslashes($esc_organization);
$description = stripslashes($esc_desc);
$url = stripslashes($esc_url);
$subject = stripslashes($esc_subject);
$geographic = stripslashes($esc_geographic);

$option_block .= "

http://$url\";>$organization
$description
URL: http://$url\";>$url\n";
}

Now, of course, if I were to use this, it will only use the Subject1
data. How do I tell it to use the results from either Subject 1 or
Subject 2?

Thanks in advance,

Laurie M. Landry



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] More newbie help - mixing 2 different things into one database

2002-03-21 Thread Laurie Landry

Hi,

In this example: I'm trying to introduce the selection data from another
table in the database into this form.  The form is a simple form where
if missing any data, you're redirected back to the page to form but with
data filled in some areas that you had filled in before.

Now, instead of manually inputting the selection fields for subjects and
countries which will continually be updated, I've included a database
where in another form, if there's a new subject to be added to the
database, the user will go to a different form and fill in the new
subject. That works.

Now, I'm trying to call in those data and put it into the selection
option blocks - it doesn't' work, and I don't know why? I've created a
test page that calls in those option blocks on its own, and it works,
and the form with the manually-inputted subject titles or country titles
works on its own as well. Somehow the two doesn't mix well, and I'd
appreciate help in this matter.

Thanks in advance,

Laurie M. Landry
http://www.lmlweb.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] easyphp question

2002-03-21 Thread jtjohnston

Anyone using easyphp?

I want to know if the new 4.1.2 binary at
http://www.php.net/downloads.php is what I want or is it good for
Apache? Doesn't seem to mention anything about "versions for Apache",
only the zip package.

John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Apache

2002-03-21 Thread jtjohnston

Thanks all :)

I went with:
 http://httpd.apache.org/docs/mod/core.html#options


and not put "Indexes" between.

John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] upload a file directly to the proper directory

2002-03-21 Thread pierre . marcandella

Hi, Bogdan,
Thanks for your help.
It isn't a SQL error. I do not upload the file to a database.

I have been able to upload a 4M file.
I really think it is because the memory_limit of the server is 8M. And that 
means that it doesn't have enough resource to copy the uploaded file from the 
temporary folder to the proper one. 

I wanted to have confirmation about that and find a way to solve this problem.

Pierre

- 



En réponse à Bogdan Stancescu <[EMAIL PROTECTED]>:

> Do you get a PHP or a SQL error? I had this problem, but my problem was
> 
> MySQL, not PHP (i.e. PHP handles uploads > 2MB and MySQL doesn't by 
> default). The error I got was "MySQL server has gone away" or something
> 
> similar.
> 
> Bogdan
> 
> [EMAIL PROTECTED] wrote:
> 
> >I have to upload files.
> >My scripts don't work with large files.
> >
> >On the "Chapter 19. Handling file uploads" from the php.net doc I found
> the 
> >following comments :
> >
> >[EMAIL PROTECTED]
> >26-Feb-2002 08:24 
> >When uploading large files, I've found that the memory limit has to
> be
> >twice as large as the upload limit or else the PHP script will not be
> able
> >to move/copy the file to a new destination.
> > 
> >I guess this explain why I cannot manage large files uploading :
> >The upload is possible but I cannot move the file from the temporary
> directory.
> >As I cannot increase the memory_limit (my host does not allow it) I am
> 
> >wondering if it is possible to upload the file directly to its proper
> directory.
> >
> >Thanks for any help.
> >
> >Note :
> >I cannot modify the upload_tmp_dir directive of the php.ini file as
> others 
> >scripts also use it.
> >
> >The manual mentions : "Setting it using putenv() from within a PHP
> script will 
> >not work.". Does it mean that what I want to do is not possible ?
> >
> >My php.ini is set up as follow :
> >max_execution_time = 1
> >post_max_size = 30M
> >upload_max_filesize = 30M
> >and on my script, the MAX_FILE_SIZE hidden form element is present.
> >
> >Pierre
> >
> 
> 
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Cascading of environment variables when running a Perl script from PHP.

2002-03-21 Thread Norman Cates

Hi,
I'm trying to call a Perl CGI script from PHP.

I use the system or exec commands. That works fine. I've basically got that
sorted out.

As a test, i ran a CGI script which returns all the environment variables
that the script can see.

When I run it from the command line, I get one set which are MY environment
variables. That's fine. I expect that.

If I run the CGI as a web process ie http:/server/.cgi, then I get a set
of environment variables which reflect the web server environment. Eg. the
Path, REMOTE-USER etc.

Cool.

But if I run the CGI via PHP, I get another completely different set of
variables. These seem to reflect the environment that the server is running
in, not anything to do with the Apache server varaiables that are neccessary
for web pages.

Can anyone explain to me what's going on? Why does PHP appear to destroy the
variables of the CGI environment?

Can I make sure that when PHP calls the CGI Perl script, that the Perl
script has access to all the appropriate environment variables.

The Perl script in question accesses these environment variables because it
is a CGI script in and of itself..

Because my work environment is mixed Perl and PHP, It wuld be great to be
able to integrate them a bit so that we can use Perl generated HTML inserted
into a PHP page when appropriate.

Any insights much appreciated.

Thanks,

Norman Cates


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Trap CR or "Enter" possible?

2002-03-21 Thread Andre Dubuc

Thanks Martin,

I forgot to mention: I would like to accomplish this using PHP since I'm not 
using Javascript. Will this still work with straight html?

regards,
Andre


On Thursday 21 March 2002 21:39, you wrote:
> do it in html/javascript like this:
>
> http://www.somewhere.com/"; method="get" onSubmit="return
> (this.okay.value != 'no');">
>   
>   
>   
> 
>
> -Original Message-
> From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 1:39 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Trap CR or "Enter" possible?
>
>
> In one of my php pages, I have a form that requires the user to click
> "Search
> for Surname". If however they press "Enter", undesirable effects occur.
>
> I've successfully trapped if an empty string is in the  type="text">, but "Enter" eludes my efforts to trap it for an
> appropriate
> "Educational" message about following instructions :>
>
> ie:
>
> if ($sname == "") {echo "Please enter a Surname and click "Search for
> Surname'.", exit;}
> if (eregi(\r == true) {exit;}  // something tells me this isn't correct!!
>
>
> Any ideas how I can accomplish this -- the code is asking for search
> criteria
> for a query into PostgreSQL (it's coded between )
>
> Any ideas, suggestions, or where to look would be appreciated.
>
> Tia,
> Andre
>
>
> --
>
> Please pray the Holy Rosary to end the holocaust of abortion.
> Remember in your prayers the suffering souls in Purgatory.
>
> May God bless you abundantly in His love!
>
> For a free Cenacle Scriptural Rosary Booklet --
> http://www.webhart.net/csrb/

-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the suffering souls in Purgatory.

May God bless you abundantly in His love!

For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] OMNICRON Problems

2002-03-21 Thread Christopher J. Crane

I just downloaded PHP from PHP.net and it's the newest version.
I can not get it to work. I get the "Security Alert! PHP CGI cannot be
accessed directly" message.
I have edited the php.ini file and changed the "cgi.force_redirect" to "0"
and back to "1" and everything else I could think of. I restarted the server
each time, but never got it to work. Has anyone else had any luck with this?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Trap CR or "Enter" possible?

2002-03-21 Thread Martin Towell

do it in html/javascript like this:

http://www.somewhere.com/"; method="get" onSubmit="return
(this.okay.value != 'no');">
  
  
  


-Original Message-
From: Andre Dubuc [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 1:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Trap CR or "Enter" possible?


In one of my php pages, I have a form that requires the user to click
"Search 
for Surname". If however they press "Enter", undesirable effects occur.

I've successfully trapped if an empty string is in the , but "Enter" eludes my efforts to trap it for an
appropriate 
"Educational" message about following instructions :>

ie:

if ($sname == "") {echo "Please enter a Surname and click "Search for   
Surname'.", exit;}
if (eregi(\r == true) {exit;}  // something tells me this isn't correct!!


Any ideas how I can accomplish this -- the code is asking for search
criteria 
for a query into PostgreSQL (it's coded between )

Any ideas, suggestions, or where to look would be appreciated.

Tia,
Andre


--

Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the suffering souls in Purgatory.

May God bless you abundantly in His love!

For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Trap CR or "Enter" possible?

2002-03-21 Thread Andre Dubuc

In one of my php pages, I have a form that requires the user to click "Search 
for Surname". If however they press "Enter", undesirable effects occur.

I've successfully trapped if an empty string is in the , but "Enter" eludes my efforts to trap it for an appropriate 
"Educational" message about following instructions :>

ie:

if ($sname == "") {echo "Please enter a Surname and click "Search for   
Surname'.", exit;}
if (eregi(\r == true) {exit;}  // something tells me this isn't correct!!


Any ideas how I can accomplish this -- the code is asking for search criteria 
for a query into PostgreSQL (it's coded between )

Any ideas, suggestions, or where to look would be appreciated.

Tia,
Andre


--

Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the suffering souls in Purgatory.

May God bless you abundantly in His love!

For a free Cenacle Scriptural Rosary Booklet -- http://www.webhart.net/csrb/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Displaying SELECT results

2002-03-21 Thread Martin Towell

1)
a) you know which page you're on (default to 1)
b) count = "select count(*)" from database
c) num_pages = count / num_items_per_page
d) display accordingly

2)
start loop (has some counter, eg $i)
$bgcol = "white";  if ($i % 2 == 1)  $bgcol = "gray";
rest of code
end loop

-Original Message-
From: Christopher J. Crane [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 1:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Displaying SELECT results


I wrote a shopping cart, but I
don't understand two things.
1) What is the best way to display like the first ten records and then a
list of how many pages with 10 records on them...similar to like a search
engine when it returns it's results. If I have 100 items I do not want to
display all of them on one page. So I will display the first ten, and then a
link for the next ten or something like that. I did this in PERL, but it was
a long mathematical routine to get it and I know there must be an easier
way.

2) To display the results of a SELECT statement, but every other line is a
off color. So Like row 1 is white and row 2 is gray and row 3 is white and
row 4 is gray and so one.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Displaying SELECT results

2002-03-21 Thread Christopher J. Crane

I wrote a shopping cart, but I
don't understand two things.
1) What is the best way to display like the first ten records and then a
list of how many pages with 10 records on them...similar to like a search
engine when it returns it's results. If I have 100 items I do not want to
display all of them on one page. So I will display the first ten, and then a
link for the next ten or something like that. I did this in PERL, but it was
a long mathematical routine to get it and I know there must be an easier
way.

2) To display the results of a SELECT statement, but every other line is a
off color. So Like row 1 is white and row 2 is gray and row 3 is white and
row 4 is gray and so one.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] looking for tutorial on XML parsing of attributes...

2002-03-21 Thread Scott Brown

Ok - first off, I've found a few... phpbuilder has a nice number of
references.  But every one I've tried has ignored attributes... either that,
or I dont understand what I'm doing.

I retrieve from a distant server an XML response to an inquiry:



  
sometext
  
  

  sometext1

  
  

  sometext2

  
  

  sometext3

  


BUT... when I parse this using xml_parse, all I'm getting out is:

Name = RESPONSE  -- Attributes = Array
Name = STATUS  -- Attributes = Array
Name = DESCRIPTION  -- Attributes = Array
Name = DOMAIN  -- Attributes = Array
Name = STATUS  -- Attributes = Array
Name = DESCRIPTION  -- Attributes = Array
Name = DOMAIN  -- Attributes = Array
Name = STATUS  -- Attributes = Array
Name = DESCRIPTION  -- Attributes = Array
Name = DOMAIN  -- Attributes = Array
Name = STATUS  -- Attributes = Array
Name = DESCRIPTION  -- Attributes = Array

I cant seem to nail down how to pull the actual attribute values does
anyone know of a tutorial that's going to teach me how to pull those
attributes of fqdn and code?  I've figured out how to get the DESCRIPTION...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ODBC -- Setting ApplicationID with PHP

2002-03-21 Thread Bruce Garlock

I am trying to set the ApplicationID, when connecting to an ODBC
datasource.  I have tried:

odbc_setoption ($conn, 1, 1053, "PHPAPP");

And get a:

"SQL error: [iODBC][Driver Manager]Option type out of range, SQL state
S1092 in SetConnectOption"

Basically, I want my PHP script to pass the application name to the ODBC
server, so that I can set up a mapping on the server that allows write
access when a certain application string is sent.

PHP 4.06 (with file-upload patch)
Openlink ODBC 1.5
Linux Client
SCO Informix 5 server


TIA-

Bruce




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Database Development Price Inquiry?

2002-03-21 Thread Erik Price


On Thursday, March 21, 2002, at 08:27  PM, [-^-!-%- wrote:

>
> Hello everyone,
>
> I'm in the process of revising my db development prices, and was 
> wondering
> what the best practices were. I want to keep my prices low, but I often
> feel like I'm not charging close to what I should be charging.

...

> Any feedback would be greatly appreciated.

40 hrs at $11/hr, no overtime, no benefits.  But I get to learn PHP.



Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: More fun with sessions

2002-03-21 Thread scott furt

Also, if your sessions use a database, you could
do some SQL queries to see which sessions have
been loaded in the last few minutes.

Julio Nobrega wrote:
>   From all users on your site? I guess only if you open the directory where
> the session files are stored. And loop through the files, opening each one
> and interpreting the contents.
> 
> --
> Julio Nobrega.
> 
> Um dia eu chego lá:
> http://sourceforge.net/projects/toca
> 
> Ajudei? Salvei? Que tal um presentinho?
> http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
> "James Taylor" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 
>>How can I get a listing of all currently active sessions?
>>
> 
> 
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: More fun with sessions

2002-03-21 Thread Julio Nobrega

  From all users on your site? I guess only if you open the directory where
the session files are stored. And loop through the files, opening each one
and interpreting the contents.

--
Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"James Taylor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How can I get a listing of all currently active sessions?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] echo and Session Variables

2002-03-21 Thread Erik Price


On Thursday, March 21, 2002, at 06:26  PM, David Johansen wrote:

> Thanks that fixed the problem, but I have a question then. Am I 
> supposed to
> put the ' in the $_SESSION[] in the normal parts of code. Thanks,
> Dave

You should use either single quotes or double quotes in any associative 
index.  You do not need to use them for numeric indices.

$_SESSION['x_Email']
$_POST['loginName']
$form_html['button']
$count[1]
$item[7]

Don't forget that variables will not expand within single quotes.  Use 
double quotes if you have a variable in your associative index.

$_POST["filename{$i}"]

Again, not really an issue for numeric indices.

$input[$c]



Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Database Development Price Inquiry?

2002-03-21 Thread [-^-!-%-


Hello everyone,

I'm in the process of revising my db development prices, and was wondering
what the best practices were. I want to keep my prices low, but I often
feel like I'm not charging close to what I should be charging.

1) What is the going rate for Database Development (MySQL+PHP
or any other combo)?

2) What (or how) do you charge for MySQL+PHP database applications?
3) What do you factor into your pricing?

We currently package our prices by the project. Example, we
would charge one flat fee for an online database application.
This would include everything from start to finish. Sometimes
this works out, but other times it gets painful and tedious. I often feel
like I'm not charging as much as I should be.

4) What is the best practice for db development pricing?
Flat fee or hourly based? Do you charge based on the number of hours spent
(anticipated) or by the project complexity and/or size?

5) Do you charge in stages or upon completion? For example, do you charge
after the planning phase, development phase, etc. Or, after the project
is complete?

I'm especially interested in hearing from the West Coast (USA) developers.
Any feedback would be greatly appreciated.

Thanks.

-john


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] More fun with sessions

2002-03-21 Thread James Taylor

How can I get a listing of all currently active sessions?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] I figured out what's causing it, but how do I fix it

2002-03-21 Thread David Johansen

I just figured out that it's that the name of the field in the form is the
same as the Session variable, cause if I change it then it doesn't have this
problem, but how do I go about fixing this? Is the only solution just to
make them named different things? Thanks,
Dave

"David Johansen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Maybe there's something that I just don't get but here's the problem I'm
> having. I use this piece of code to initialize the text box in a form:
>
> Address:  (isset($_SESSION['x_Address'])) echo "value=\"$_SESSION[x_Address]\""?>>
>
> Then I have a little php processing page  that stores this value in a
> session variable and it just does it like this:
>
> echo $x_Address;
> $_SESSION['x_Address'] = $x_Address;
>
> I added the echo to check and make sure it was working but it doesn't
change
> the value when I resubmit the form. When I first load up the page it's
blank
> and when I hit back it fills in all the fields right, but then when I
> resubmit the form with new values they're all just the ones from the first
> time that I submitted the form. Is there something that I'm doing wrong?
> Thanks,
> Dave
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] what is the difference between function and language construct?

2002-03-21 Thread Matthew Walker

Because $a=5 is not 'empty'.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: bob [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 5:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] what is the difference between function and language
construct?

why this get wrong?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: ecommerce solutions..

2002-03-21 Thread Justin French

http://phpShop.org, amongst hundreds of others

Justin French
--
http://indent.com.au
http://soundpimps.com
http://hinge.net.au

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] echo and Session Variables

2002-03-21 Thread Johnson, Kirk

Please note that an unquoted array key is now deprecated syntax. See
http://www.php.net/manual/en/language.types.array.php

Kirk

> The single quotes in $_SESSION['myvar'] are not necessary.  You're
> reading an associative array in which a string is acting as a 
> pointer to
> the index. 
> 
> Example..
> $myarray = array ('myvar' => 'myvalue');
> echo $myarray[myvar]; // prints out 'myvalue'
> -Kevin
> 
> -Original Message-
> From: David Johansen [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, March 21, 2002 4:26 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] echo and Session Variables
> 
> Thanks that fixed the problem, but I have a question then. Am 
> I supposed
> to
> put the ' in the $_SESSION[] in the normal parts of code. Thanks,
> Dave
> 
> "Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Thu, 21 Mar 2002, David Johansen wrote:
> > > I was just wondering if there's a way to use echo with session
> variables.
> > > When I try to do this:
> > >
> > >  > > if (isset($_SESSION['x_Email']))
> > > echo "value=\"$_SESSION['x_Email']\"";
> > > ?>
> >
> > The issue is with the syntax you're using to refer to arrays within
> double
> > quotes.
> >
> >echo "value=\"{$_SESSION[x_Email]}\"";
> >
> > miguel

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Calling a javascript function?

2002-03-21 Thread pong-TC

[EMAIL PROTECTED] writes:
>I would want to do something like this:
>
>if (something true)
>{
>somejavafunc();
>}
>?>
>
>I would want to do that. Is there some way of pulling that off? Thanks,
>Dave

YOu can do something like this, embed the following codes in your php file

echo "";
//you can do something here ie
echo "alert(\"Hello World\");";
echo "";

Hope, this would help.
Pong


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] what is the difference between function and language construct?

2002-03-21 Thread bob

why this get wrong?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] form values not changing

2002-03-21 Thread David Johansen

Maybe there's something that I just don't get but here's the problem I'm
having. I use this piece of code to initialize the text box in a form:

Address: >

Then I have a little php processing page  that stores this value in a
session variable and it just does it like this:

echo $x_Address;
$_SESSION['x_Address'] = $x_Address;

I added the echo to check and make sure it was working but it doesn't change
the value when I resubmit the form. When I first load up the page it's blank
and when I hit back it fills in all the fields right, but then when I
resubmit the form with new values they're all just the ones from the first
time that I submitted the form. Is there something that I'm doing wrong?
Thanks,
Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Calling a javascript function?

2002-03-21 Thread Kevin Stone

In this case you're talking about building the Javascript dynamically.

Example..
---



function echoPHPOut(out)
{
document.write(out);
}


";
}
?>


---

It's a very round about way of printing a string based on a set of
criteria.  You could run complex Javascript functions in the same way.
But realize that Javascript only works through the browser.. so whatever
you output from the PHP script must be a full fledged and functioning
Javascript.
-Kevin

-Original Message-
From: David Johansen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 4:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Calling a javascript function?

I would want to do something like this:



I would want to do that. Is there some way of pulling that off? Thanks,
Dave

"Julio Nobrega" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>   Maybe not the way you have imagined, but either you do it outside
php
(out
> of ) or you echo it.
>
> --
> Julio Nobrega.
>
> Um dia eu chego lá:
> http://sourceforge.net/projects/toca
>
> Ajudei? Salvei? Que tal um presentinho?
> http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
> "David Johansen" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Is there any way to call a javascript function from inside a php
script?
> > Dave
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Calling a javascript function?

2002-03-21 Thread Julio Nobrega

  Like I said:




somejavafunc();


--
Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Calling a javascript function?

2002-03-21 Thread Kevin Stone

We recently went into lengthy discussion about this.  No there is no a
way to call a Javascript function from PHP.  But you CAN send a
Javascript the input it needs to decide which function to use.  You can
either have the PHP script generate the Javascript dynamically.  Or if
you need to run a remote PHP script then you can have it send back to
the Javascript input through the URL string (GET method).

-Original Message-
From: David Johansen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 4:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Calling a javascript function?

Is there any way to call a javascript function from inside a php script?
Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Calling a javascript function?

2002-03-21 Thread David Johansen

I would want to do something like this:



I would want to do that. Is there some way of pulling that off? Thanks,
Dave

"Julio Nobrega" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>   Maybe not the way you have imagined, but either you do it outside php
(out
> of ) or you echo it.
>
> --
> Julio Nobrega.
>
> Um dia eu chego lá:
> http://sourceforge.net/projects/toca
>
> Ajudei? Salvei? Que tal um presentinho?
> http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
> "David Johansen" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Is there any way to call a javascript function from inside a php script?
> > Dave
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Calling a javascript function?

2002-03-21 Thread Julio Nobrega

  Maybe not the way you have imagined, but either you do it outside php (out
of ) or you echo it.

--
Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
"David Johansen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there any way to call a javascript function from inside a php script?
> Dave
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] echo and Session Variables

2002-03-21 Thread Rasmus Lerdorf

Well, a stray define('myvar','foo') somewhere would make a mess of that.
It is safer to use $myarray['myvar'].  Inside a quoted string you of
course shouldn't use the ''

-Rasmus

On Thu, 21 Mar 2002, Kevin Stone wrote:

> The single quotes in $_SESSION['myvar'] are not necessary.  You're
> reading an associative array in which a string is acting as a pointer to
> the index.
>
> Example..
> $myarray = array ('myvar' => 'myvalue');
> echo $myarray[myvar]; // prints out 'myvalue'
> -Kevin
>
> -Original Message-
> From: David Johansen [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 21, 2002 4:26 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] echo and Session Variables
>
> Thanks that fixed the problem, but I have a question then. Am I supposed
> to
> put the ' in the $_SESSION[] in the normal parts of code. Thanks,
> Dave
>
> "Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Thu, 21 Mar 2002, David Johansen wrote:
> > > I was just wondering if there's a way to use echo with session
> variables.
> > > When I try to do this:
> > >
> > >  > > if (isset($_SESSION['x_Email']))
> > > echo "value=\"$_SESSION['x_Email']\"";
> > > ?>
> >
> > The issue is with the syntax you're using to refer to arrays within
> double
> > quotes.
> >
> >echo "value=\"{$_SESSION[x_Email]}\"";
> >
> > miguel
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Calling a javascript function?

2002-03-21 Thread David Johansen

Is there any way to call a javascript function from inside a php script?
Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] echo and Session Variables

2002-03-21 Thread Kevin Stone

The single quotes in $_SESSION['myvar'] are not necessary.  You're
reading an associative array in which a string is acting as a pointer to
the index. 

Example..
$myarray = array ('myvar' => 'myvalue');
echo $myarray[myvar]; // prints out 'myvalue'
-Kevin

-Original Message-
From: David Johansen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 4:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] echo and Session Variables

Thanks that fixed the problem, but I have a question then. Am I supposed
to
put the ' in the $_SESSION[] in the normal parts of code. Thanks,
Dave

"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 21 Mar 2002, David Johansen wrote:
> > I was just wondering if there's a way to use echo with session
variables.
> > When I try to do this:
> >
> >  > if (isset($_SESSION['x_Email']))
> > echo "value=\"$_SESSION['x_Email']\"";
> > ?>
>
> The issue is with the syntax you're using to refer to arrays within
double
> quotes.
>
>echo "value=\"{$_SESSION[x_Email]}\"";
>
> miguel
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP command line scripting multiple process forking

2002-03-21 Thread Walker, Roy

I have been playing with this for a couple of days and have run into a few
issues:

I am wanting to run a set number of multiple processes (ie 25 at a time).  I
can't use the exec command since it will not wait for the output (this is a
delayed response - network based).

$cmd = "/path.to/some.cmd";
$options = "--options";

$lines = file (/path.to/some.file);
while (list ($line_num, $line) = each ($lines)) {
$trimline = trim ($line);
shell_exec ("$cmd $options $trimline &");
}

This works but I want to fork it multiple times and have a set number of
lines running at a time.  Anyone have any ideas?

Thank you,
Roy Walker

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP IDE Feedback

2002-03-21 Thread Dennis Moore

I am currently evaluating the following IDEs that support PHP.

Zend's Studio 2.0
NuSphere's PHPEd
Active State's Komodo

My selection criteria are:

Code Completion 
Debugging
Project Management
Versioning and Source Control
Documentation
Code Deployment

I have read through the documentation of each vendor's product.   I am looking for 
feedback from those who are actually use the product and their satistaction and/or 
disappointment.


  



Re: [PHP] echo and Session Variables

2002-03-21 Thread David Johansen

Thanks that fixed the problem, but I have a question then. Am I supposed to
put the ' in the $_SESSION[] in the normal parts of code. Thanks,
Dave

"Miguel Cruz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 21 Mar 2002, David Johansen wrote:
> > I was just wondering if there's a way to use echo with session
variables.
> > When I try to do this:
> >
> >  > if (isset($_SESSION['x_Email']))
> > echo "value=\"$_SESSION['x_Email']\"";
> > ?>
>
> The issue is with the syntax you're using to refer to arrays within double
> quotes.
>
>echo "value=\"{$_SESSION[x_Email]}\"";
>
> miguel
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP-CGI and script files not found

2002-03-21 Thread Tom Keyser

Can someone confirm the following that was sent to me by my hosting provider. If have 
php script file that can not be found throwing 500 errors instead of 404 errors.

~~
Because PHP-CGI is a little strange, you (as far as I know) apparently
can't set up any sort of custom 404 error for it.

PHP-CGI works like this: When Apache gets a request for a filename ending
in .pcgi, it sends that URL to a system-wide alias to a global PHP binary
(which itself is just a CGI script). When you send this global PHP binary
the URL of another script, that PHP binary takes the filename you sent it
and attempts to interpret it as a PHP script.

However, because the file you're sending the PHP binary doesn't exist,
there's nothing for PHP to do, and it just quits. Hence, you get a 500
error (because the systemwide PHP binary didn't spit anything out).

Because Apache immediately sends the file.pcgi to the systemwide PHP
binary, there's no way for it to check if the file exists.

If you can find a workaround we can implement, we'll gladly do it, but
I've looked and to the best of my knowledge, there's no way around this.

Sorry about this!
~~~

Thanks,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP OOP: Multiple Class Extends

2002-03-21 Thread Martin Towell

Extending more that once, as you did in your example, is perfectly okay.
It's just when you try to do it in one go. ie. you can't do multi-extends,
but you can extend more than once (if you get what I mean)

HTH
Martin


-Original Message-
From: Nathan Cassano [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 9:49 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP OOP: Multiple Class Extends



Attention PHP guru's,
I have a question about PHP and OOP. My problem is that I want
multiple inheritance functionality in PHP but it does not support this
(see http://www.zend.com/manual/keyword.extends.php). My question is can
PHP classes be extended multiple times to simulate multiple inheritance?
Is this supported? Is this safe? 

It do seems to work.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How to adress pictures stored outside of the http server root?

2002-03-21 Thread Andrew Chase

If you just want to prevent users from getting a listing of your image
directory, you can do a couple of things:

1) Put an empty 'index.html' (or whatever the server default is) in the
image directory, so anyone trying to browse the directory will get a blank
page.

or

2) (Assuming your server is Apache) Create a '.htaccess' file in the images
directory and add the line

Options -Indexes


Either one ought to be less of a performance hit than doing a readfile() on
each image you want to send to the browser. :)


This article has more stuff on .htaccess:

http://www.codingclick.com/article.php?page=0&aid=3



HTH,

-Andy



> -Original Message-
> From: andy [mailto:[EMAIL PROTECTED]]
> hmm sounds logical. The idea was to protect the image directory
> from people
> who would like to download all the image files. Somebody told me to place
> the dir outside the document root. So this seems to be wrong.
>
> What would you suggest to prevent people from downloading all the  image
> files?
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP OOP: Multiple Class Extends

2002-03-21 Thread Nathan Cassano


Attention PHP guru's,
I have a question about PHP and OOP. My problem is that I want
multiple inheritance functionality in PHP but it does not support this
(see http://www.zend.com/manual/keyword.extends.php). My question is can
PHP classes be extended multiple times to simulate multiple inheritance?
Is this supported? Is this safe? 

It do seems to work.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] echo and Session Variables

2002-03-21 Thread Miguel Cruz

On Thu, 21 Mar 2002, David Johansen wrote:
> I was just wondering if there's a way to use echo with session variables.
> When I try to do this:
> 
>  if (isset($_SESSION['x_Email']))
> echo "value=\"$_SESSION['x_Email']\"";
> ?>

The issue is with the syntax you're using to refer to arrays within double 
quotes.

   echo "value=\"{$_SESSION[x_Email]}\"";

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] echo and Session Variables

2002-03-21 Thread David Johansen

I was just wondering if there's a way to use echo with session variables.
When I try to do this:



it gives me this error:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in /home/storings/public_html/uslogin.php on line 134

Am I doing something wrong or is there a better way to do this? I know that
I could use printf() but is there a way to do it with echo and is accessing
the session variables with $_SESSION[] the "right" way to do it? Thanks,
Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Storing variables

2002-03-21 Thread Miguel Cruz

On Thu, 21 Mar 2002, Erik Price wrote:
> On Thursday, March 21, 2002, at 03:39  PM, Miguel Cruz wrote:
>> 3. Store them in a database and just pass the index from page to page
>> using a hidden variable.
> 
> Is this a frequently-used option?  A while back I thought of using a 
> scheme like this, but then thought to myself that it would be a lot of 
> overhead for a multi-part form.  I wonder how often this technique is 
> actually done?

It depends on what you're trying to do. If the stuff's going to end up in 
a database anyway, or if you really want to provide a robust transaction 
environment that can survive disconnections and long delays, this is 
useful.

If you're just doing an "add a comment to a guestbook" script, then it's 
almost certainly not worth the effort.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How to clear variables?

2002-03-21 Thread C. Cormier - Ormetal Inc.

Thanks Martin. I will try that.

Claude Cormier
Ormetal Inc.

http://www.goldcurrencies.ca
http://www.ormetal.com
=
Claude Cormier Public Key
http://www.ormetal.com/keys/ClaudeCormier.asc
=

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Temporary MySQL Tables

2002-03-21 Thread ruler

Perhaps you can check the data of the fields before it goes to the next
form.  For example,
if (ereg("^.*[^a-zA-Z0-9\-].*$", $Username)) {
die("Your username contains invalid characters. Only alphanumeric characters
and dashes are allowed.");
}

Hope that helps.
- Original Message -
From: "Georgie Casey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 21, 2002 3:09 PM
Subject: [PHP] Temporary MySQL Tables


> Hi,
>
> On my site now, there's a lengthy register process where the user has to
> fill in 5 forms, one after the another. I get the PHP script to echo the
> values from the previous into the next form by using
> ";
> ?>
> for example. Then I keep carrying the information over to each extra form
> until the user reaches the last page and I insert all the info into a
table
> called "tempmembers" with an extra timestamp field which I use to verify
> email addresses. The user gets an email saying click here to verify your
> membership with the username and timestamp in the URL. The users clicks
it,
> and I run a SQL command that copies the row from "tempmembers" into the
> "members" table.
>
> This process worked well for a while until I discovered if users enter a
> single or double quote into any of the fields, it fecks everything up. So
I
> added an addslashes command but it's all getting a bit hairy so I was
> looking for some advice on MySQL temporary tables for either using after
> every form or at the end of all the forms.
>
> Or does anyone have any other method I could use??? Thanks for any help
> you might have.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] How to clear variables?

2002-03-21 Thread Martin Towell

I think he means using header() - look in the manual, there's a snippet of
code you can copy-and-paste that does cache control

Martin

-Original Message-
From: C. Cormier - Ormetal Inc. [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 9:06 AM
To: Rasmus Lerdorf; [EMAIL PROTECTED]
Subject: Re: [PHP] How to clear variables?


On 21 Mar 2002, at 8:33, Rasmus Lerdorf wrote:

> Well, you could prevent the user from cacheing the page by sending the
> appropriate cache control headers.  Then when they click back it would
> say that the page is expired.

Hello Rasmus,

I tried what you suggest with:

session_cache_limiter('nocache');

But it does not work. The page and variables remain cached. Is 
that what you had in mine or is it something else ?

Claude
Ormetal Inc


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to clear variables?

2002-03-21 Thread C. Cormier - Ormetal Inc.

On 21 Mar 2002, at 8:33, Rasmus Lerdorf wrote:

> Well, you could prevent the user from cacheing the page by sending the
> appropriate cache control headers.  Then when they click back it would
> say that the page is expired.

Hello Rasmus,

I tried what you suggest with:

session_cache_limiter('nocache');

But it does not work. The page and variables remain cached. Is 
that what you had in mine or is it something else ?

Claude
Ormetal Inc


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Temporary MySQL Tables

2002-03-21 Thread Geoff Hankerson

Couldn't you just use substr_replace and the html endcoding for a double
quote (") ?

 ";  ?>

- Original Message -
From: "Georgie Casey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 21, 2002 2:09 PM
Subject: [PHP] Temporary MySQL Tables


> Hi,
>
> On my site now, there's a lengthy register process where the user has to
> fill in 5 forms, one after the another. I get the PHP script to echo the
> values from the previous into the next form by using
> ";
> ?>
> for example. Then I keep carrying the information over to each extra form
> until the user reaches the last page and I insert all the info into a
table
> called "tempmembers" with an extra timestamp field which I use to verify
> email addresses. The user gets an email saying click here to verify your
> membership with the username and timestamp in the URL. The users clicks
it,
> and I run a SQL command that copies the row from "tempmembers" into the
> "members" table.
>
> This process worked well for a while until I discovered if users enter a
> single or double quote into any of the fields, it fecks everything up. So
I
> added an addslashes command but it's all getting a bit hairy so I was
> looking for some advice on MySQL temporary tables for either using after
> every form or at the end of all the forms.
>
> Or does anyone have any other method I could use??? Thanks for any help
> you might have.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Temporary MySQL Tables

2002-03-21 Thread John S. Huggins

On Thu, 21 Mar 2002, Georgie Casey wrote:

>-Hi,
>-
>-membership with the username and timestamp in the URL. The users clicks it,
>-and I run a SQL command that copies the row from "tempmembers" into the
>-"members" table.

I assume you are building up all your fields as you move through the site.
I would just perform an INSERT into your tempmebers table right away
setting whatever fields you have at this point.  Then as I pass through
each data entry page, I would do UPDATES to that record updating only
those new fields, leaving the old ones alone and thus preserved.

This way you only have to pass a record ID and the new parameters on each
page thus eliminating moving data through the URL.  Yuk.

Anyway, that's what I would do.

>-
>-This process worked well for a while until I discovered if users enter a
>-single or double quote into any of the fields, it fecks everything up. So I
>-added an addslashes command but it's all getting a bit hairy so I was
>-looking for some advice on MySQL temporary tables for either using after
>-every form or at the end of all the forms.
>-
>-Or does anyone have any other method I could use??? Thanks for any help
>-you might have.
>-
>-
>-
>--- 
>-PHP General Mailing List (http://www.php.net/)
>-To unsubscribe, visit: http://www.php.net/unsub.php
>-

**

John Huggins
VANet

[EMAIL PROTECTED]
http://www.va.net/

**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Storing variables

2002-03-21 Thread Erik Price


On Thursday, March 21, 2002, at 03:39  PM, Miguel Cruz wrote:

> 3. Store them in a database and just pass the index from page to page
> using a hidden variable.

Is this a frequently-used option?  A while back I thought of using a 
scheme like this, but then thought to myself that it would be a lot of 
overhead for a multi-part form.  I wonder how often this technique is 
actually done?




Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Temporary MySQL Tables

2002-03-21 Thread Georgie Casey

Hi,

On my site now, there's a lengthy register process where the user has to
fill in 5 forms, one after the another. I get the PHP script to echo the
values from the previous into the next form by using
";
?>
for example. Then I keep carrying the information over to each extra form
until the user reaches the last page and I insert all the info into a table
called "tempmembers" with an extra timestamp field which I use to verify
email addresses. The user gets an email saying click here to verify your
membership with the username and timestamp in the URL. The users clicks it,
and I run a SQL command that copies the row from "tempmembers" into the
"members" table.

This process worked well for a while until I discovered if users enter a
single or double quote into any of the fields, it fecks everything up. So I
added an addslashes command but it's all getting a bit hairy so I was
looking for some advice on MySQL temporary tables for either using after
every form or at the end of all the forms.

Or does anyone have any other method I could use??? Thanks for any help
you might have.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: [PHP-WIN] issue with PHP_XSLT?

2002-03-21 Thread Mike Eynon

Not sure if this will help you or not, but here are a few words of wisdom
that helped me get past problems in the Sablotron extension.

If you wish to use files that are not in your php root, you have to add the
string: "file://" before each of your filenames.  This will keep Sablotron
happy in both LINUX and Windows.

// Mike Eynon
// www.MikeEynon.com
// 1366 Bulb Ave
// Santa Cruz, CA  95062
// [EMAIL PROTECTED]
// 831.588.2388 (cell)




-Original Message-
From: Phillip Fox [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 12:56 PM
To: Ben
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] issue with PHP_XSLT?



On Thu, 21 Mar 2002, Ben wrote:

> why does php_xslt.dll expect the files to be in PHP root? how can i change
> this to be able to pick up files from the document root itself?
>

It sounds to me like you have a diffirent problem than the one that I had on
my
server, but I think that the same solution will work for you too. Check out
the
code and comments on this page:

http://bugs.php.net/bug.php?id=14965

The page has details on the proper format for paths to pass to the
processor and code to read files and pass their content to the processor
as arguments.


HTH!


--> Phillip Fox -- [EMAIL PROTECTED]
  405.773.WORX -- 1.888.772.WORX  --  http://www.TheWorxCo.Net/




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $HTTP_COOKIE_VARS

2002-03-21 Thread Thalis A. Kalfigopoulos

I think you should have register_globals/track_vars set to TRUE in your php.ini

cheers,
thalis


On Thu, 21 Mar 2002, Max Mouse wrote:

> I've tried using $HTTP_COOKIE_VARS to get information about the cookie has
> been passed to the current script but I always get a cookie size of 1
> containing no information. I have also tried using $_COOKIE but with no
> success. I'm running apache1.2.23 and php 4.1.2. Suggestions?
> 
> Max
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] $HTTP_COOKIE_VARS

2002-03-21 Thread Max Mouse

I've tried using $HTTP_COOKIE_VARS to get information about the cookie has
been passed to the current script but I always get a cookie size of 1
containing no information. I have also tried using $_COOKIE but with no
success. I'm running apache1.2.23 and php 4.1.2. Suggestions?

Max


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Deleting File

2002-03-21 Thread Mike Maltese

Make sure the owner of the server process has delete permissions for the
directory in question.

- Original Message -
From: "pong-TC" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 21, 2002 11:25 AM
Subject: [PHP] Deleting File


> Hello All
>
> I am trying to build a text file, and delete it by using unlink function,
> but it always refuse to do so because of permission denied.  It gives me
> an error as follows:
>
> Warning: Unlink failed (Permission denied) in
> d:\inetpub\wwwroot\cgi-bin\myfile.php on line 45
>
> Actually, the file was created in the same page by using fopen, and then I
> want to delete when no longer used.  I had tried a delete function, but
> not work.  I am running PHP as a cgi on IIS 5, Win2K.
>
> If anyone can help.
>
> Pong
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Guestbook previous 10/next 10

2002-03-21 Thread Miguel Cruz

On Thu, 21 Mar 2002, James Taylor wrote:
> I have this sort of guest book that only will display 10 entries on the
> page at a time, after that you have the option of previous 10, and if
> you're not on the front page you also have next 10.  I'm getting the ID
> of the VERY LAST POST listed on the page. So it's doing something like
> 
> Well, it seems to KIND of work, the only thing is that the ID's aren't
> necessarily sequential.  If I delete a post, well, that ID is now
> missing, and when you click 'previous', it's displaying a couple of
> duplicate posts that were on the page before it.

Why not keep track of the value you passed to the last LIMIT, rather than 
only the ID of the last item? Presto, problem solved.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: [PHP-WIN] issue with PHP_XSLT?

2002-03-21 Thread Phillip Fox


On Thu, 21 Mar 2002, Ben wrote:
 
> why does php_xslt.dll expect the files to be in PHP root? how can i change
> this to be able to pick up files from the document root itself?
> 

It sounds to me like you have a diffirent problem than the one that I had on my
server, but I think that the same solution will work for you too. Check out the 
code and comments on this page:

http://bugs.php.net/bug.php?id=14965

The page has details on the proper format for paths to pass to the 
processor and code to read files and pass their content to the processor 
as arguments.


HTH!


--> Phillip Fox -- [EMAIL PROTECTED]
  405.773.WORX -- 1.888.772.WORX  --  http://www.TheWorxCo.Net/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Guestbook previous 10/next 10

2002-03-21 Thread James Taylor

I have this sort of guest book that only will display 10 entries on the page 
at a time, after that you have the option of previous 10, and if you're not 
on the front page you also have next 10.  I'm getting the ID of the VERY LAST 
POST listed on the page. So it's doing something like

while ($myrow = mysql_fetch_row($result)) {
  $pid = $myrow[0];
   print the post
}

$result = mysql_query("select * from posts limit $pid, 10", $db);

Well, it seems to KIND of work, the only thing is that the ID's aren't 
necessarily sequential.  If I delete a post, well, that ID is now missing, 
and when you click 'previous', it's displaying a couple of duplicate posts 
that were on the page before it.

Any idea on a way to get around this?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Storing variables

2002-03-21 Thread Miguel Cruz

On Thu, 21 Mar 2002, Morten Nielsen wrote:
> I got a page, which is reloaded 3 times. When the user first sees the page
> he has to fill in some information. On the second page he press a button to
> confirm. I would then like for the third page to display what he has entered
> on the first page.
> What is the best way to store the variables from page one? Is a session the
> only/right way to do this?

Some possibilities:

1. Session

2. Hidden variables (easier if you make them all part of the same array 
and then just serialize it).

3. Store them in a database and just pass the index from page to page 
using a hidden variable.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Storing variables

2002-03-21 Thread Morten Nielsen

Hi,

I got a page, which is reloaded 3 times. When the user first sees the page
he has to fill in some information. On the second page he press a button to
confirm. I would then like for the third page to display what he has entered
on the first page.
What is the best way to store the variables from page one? Is a session the
only/right way to do this?

Regards,
Morten



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Newbie help

2002-03-21 Thread cal

Tony,

I'm doing a lot of PHP<->VFP<->MySql work right now.  I'm developing
processes that move data out of SBT accounting and into a MySQL database for
use on the web.  I'm also working on processes that update the FoxPro data
directly.  The best I can tell you is that the EASIEST thing to do is create
VFP COM objects to do the dirty work and call them from your PHP pages.
There are other ways but not as reliable.

HTH,
=C=
*
* Cal Evans
* Techno-Mage
* http://www.calevans.com
*

- Original Message -
From: "Tony Alanis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 21, 2002 2:05 PM
Subject: [PHP] Newbie help


> Hello all,
>
> I'm looking for resources for PHP/FoxPro.  I have a limited
> understanding of php and mysql, however, the company I work for uses a
> FoxPro backend database.  I want to be able to pull information from
> this database to be used on our intranet site I am currently developing.
> If anyone can point me to some resources for this, I'd really appreciate
> it.
>
> Thanks,
>
> Tony Alanis
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Newbie help

2002-03-21 Thread Tony Alanis

Hello all,

I'm looking for resources for PHP/FoxPro.  I have a limited
understanding of php and mysql, however, the company I work for uses a
FoxPro backend database.  I want to be able to pull information from
this database to be used on our intranet site I am currently developing.
If anyone can point me to some resources for this, I'd really appreciate
it.

Thanks,

Tony Alanis


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP/mySQL hosting

2002-03-21 Thread Kevin Stone

Pickings are slim but you can have a look here:
http://www.alt-php-faq.org/links.html

See "hosting".  Good luck.

-Kevin

-Original Message-
From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 12:17 PM
To: PHP
Subject: [PHP] PHP/mySQL hosting

Does anyone have a good site for free mySQL and PHP hosting ?


**DAN**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Deleting File

2002-03-21 Thread pong-TC

Hello All

I am trying to build a text file, and delete it by using unlink function,
but it always refuse to do so because of permission denied.  It gives me
an error as follows:

Warning: Unlink failed (Permission denied) in
d:\inetpub\wwwroot\cgi-bin\myfile.php on line 45

Actually, the file was created in the same page by using fopen, and then I
want to delete when no longer used.  I had tried a delete function, but
not work.  I am running PHP as a cgi on IIS 5, Win2K.

If anyone can help.

Pong


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Append to the beginning of a file...

2002-03-21 Thread Mauricio Sthandier

Well, here's a lousy solution to a lousy problem :
(please don't crucify my code since I know it's not depurated)


---
$archivo = fopen("./registrados.txt", "a+");
if ($archivo) {

$posicion = fseek($archivo, -512, SEEK_END);
$datos = fread($archivo, 7);
$entero = intval(substr($datos, 2, 5));
If (empty($entero) || !is_int($entero)) {
$entero = 1000;
}
$entero++;
$socio = str_repeat("0", 5 - strlen(strval($entero))).strval($entero);

$linea = "\n\"$socio\";\"$fecha\";\"$nombre
$apellido\";\"$rut\";\"$fono\";\"$direccion\";\"$comuna\";\"$ciudad\";\"$pai
s\";\"$edad\";\"$email\";\"$select_familiares\";\"$select_lugar_compra\";\"$
cocina\";\"$select_personas_cocinan\";\"$recetario\"";
$linea = $linea . str_repeat(" ", 512 - strlen($linea));
fseek($archivo, 0, SEEK_END);
fwrite ($archivo, $linea, 512);
fclose($archivo);

-

It does works... sounds amazing after this hours... helps everybody, you are
fine people !!!



"Miguel Cruz" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 21 Mar 2002, Mauricio Sthandier wrote:
> > I could append but then I need to read the first 8 chars of the last
line I
> > appended... neither something I know how to do.
>
> Seek to the end of the file minus typical record length, read,
> look for the penultimate end-of-record delimiter (\n, probably) in there,
> and you've found your final record. If you don't find a delimiter, read
> some more and tack it onto the beginning of your string, then check again.
> Repeat until batter contains no large lumps.
>
> miguel
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP/mySQL hosting

2002-03-21 Thread Daniel Negron/KBE

Does anyone have a good site for free mySQL and PHP hosting ?


**DAN**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Execute AppleScript

2002-03-21 Thread Henrik Johansson

Is this possible from php?
Regards,
Henrik

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Append to the beginning of a file...

2002-03-21 Thread Miguel Cruz

On Thu, 21 Mar 2002, Mauricio Sthandier wrote:
> I could append but then I need to read the first 8 chars of the last line I
> appended... neither something I know how to do.

Seek to the end of the file minus typical record length, read, 
look for the penultimate end-of-record delimiter (\n, probably) in there, 
and you've found your final record. If you don't find a delimiter, read 
some more and tack it onto the beginning of your string, then check again. 
Repeat until batter contains no large lumps.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] cannot see LDAP userPassword and createTimestamp attr

2002-03-21 Thread Stig Venaas

On Tue, Feb 26, 2002 at 07:42:15PM -0800, tim tom wrote:
> why can't i see the createTimestamp and userPassword bcos i did an *authenticated 
>bind* !
> the script:

This depends on the LDAP server. createTimestamp is an operational
attribute and is not returned by default. You can specify explicitly
that you want this attribute, or use the magical name "+" to get all
operational attributes. The userPassword attribute is normally
protected but it seems like you fixed that. I think the problem you
see is that PHP always returns attributes in lower case. It might be
a good idea to do var_dump() of array returned by ldap_get_entries()
to see what's in it.

Stig

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Append to the beginning of a file...

2002-03-21 Thread Mauricio Sthandier

I guess I should do that.
I need the plain file because is just a log of users registering in a Club,
in a csv format.
Using a database is just too much and not intended for this page... even
when I would prefer using mysql. At least, I can handle that rather than the
fopen and fwrite !.
I could append but then I need to read the first 8 chars of the last line I
appended... neither something I know how to do.
If they were fixed I could... maybe I can fill it with blank chars the line
until a given size ?

Thanxs everyone for your replies.

"Miguel Cruz" <[EMAIL PROTECTED]> escribió en el mensaje
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 21 Mar 2002, Mauricio Sthandier wrote:
> > I guess thist must be really silly... but how can I append text to the
> > beginning of a file ???
> > I've been trying since a while... but all I get is overwriting !.
>
> Open a temporary file, write your new data to it, copy the old file on to
> the end of it, remove the old file, rename the temporary file with the old
> file's name.
>
> Obviously this is not very efficient. Explore whether you really need to
> prepend. Perhaps you can append and then read the file backwards a la tac?
> Or perhaps a database is more useful. Or multiple files.
>
> miguel
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Control Panel

2002-03-21 Thread karthikeyan

Hi Everybody,

  Is there any control panel like Webmin in PHP.

  Regards,

karthikeyan.



[PHP] ereg_replace Help

2002-03-21 Thread lists

Hi all,

I have a large file that I am trying to parse.

I have a many lines that look like this


\\text1

I need an expression that will change \\text1 to text1=

so if I have something like this

\\text1 

asdfkjaslkfj
asdlfkjasljkf
asdlkfjasldfkj
asldkfjalskfj

\\text2 
erweiurwoeir
werqwer
qwer
qwerqw
er

\\text3

asdlfkw
xcvsdf
zxcvcgn
sdfgwr
xcdfvszdfg


it will become

text1 = "

asdfkjaslkfj
asdlfkjasljkf
asdlkfjasldfkj
asldkfjalskfj
" text2 = erweiurwoeir
werqwer
qwer
qwerqw
er
" text3 = "asdlfkw
xcvsdf
zxcvcgn
sdfgwr
xcdfvszdfg
"


Any Ideas,
Michael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Browser Detection without use of browsecap.ini file

2002-03-21 Thread R'twick Niceorgaw

Hi all,
is there any way, I can detect the browser without using browsecap.ini file
? I'm simply interested to know if the user using netscape 4.x or earlier.

I  tried get_browser() function but it returns blank! after checking my
server's configuration i found browsecap file setting in uninitialized. I'm
not sure if my hosting company will setit up properly for me, but already
contacted them and waiting to hear a response form them..

Any help will be much appreciated.

R'twick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $HTTP_POST_VARS

2002-03-21 Thread Miguel Cruz

On Thu, 21 Mar 2002, Joshua E Minnie wrote:
> I need to access a variable on a form that allows multiples.  I have to use
> $HTTP_POST_VARS so I need to know how to display the information obtained
> from the form.  This is what I am using right now:
> 
>reset($HTTP_POST_VARS["interest"]);
>   while(current($HTTP_POST_VARS["interest"])) {
> echo strip_tags(trim($HTTP_POST_VARS["interest"]))."   ";
> next($HTTP_POST_VARS["interest"]));
>   }
> ?>
> 
> Both $HTTP_POST_VARS["interest"] and $HTTP_POST_VARS["interest[]"] throw
> errors.  Any suggestions would be greatly appreciated.

1. Make sure you defined the form element in your HTML as "interest[]" and
not "interest".

2. Test to see that it's an array before trying to run loop through it,
because if the user doesn't select anything, you won't get an array, and
therefore referring to to the variable as one would be an error.

if (is_array($HTTP_POST_VARS['interest']))
  foreach ($HTTP_POST_VARS['interest'] as $item)
echo strip_tags(trim($item)) . '   ';

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




AW: [PHP] Apache

2002-03-21 Thread Andres Petralli

Here's the solution, quick and dirty:

You must have "Options Indexes" somewhere in your Apache conf files.
Remove the Expression "Indexes" from there and no more lists should be
generated. Maybe it's also "Options ALL", then just limit the options to
what you need.

Greets,

Andres

> -Ursprüngliche Nachricht-
> Von: jtjohnston [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 21. März 2002 09:14
> An: [EMAIL PROTECTED]
> Betreff: [PHP] Apache
> 
> 
> Anyone know of a good apache group?
> I want to hide the structure of a directory when there is no idex.html
> present 
> 
> J
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Seek server hardware recommendation

2002-03-21 Thread Miles Thompson

You're right Michael, but those are getting hard to find. 
M.

At 11:13 AM 3/21/2002 -0600, Miguel Cruz wrote:
>On Thu, 21 Mar 2002, Aras Kucinskas wrote:
> > LINUX
> > Apache
> > PHP
> > mySQL
> >
> > Server purpose:
> > One site (PHP+mySQL ) hosting, max 1000 visitors per day.
> >
> > What is recommendet hardware requiremnts (CPU, RAM,...)?
>
>Unless you expect most of those hits to be concentrated in a short period,
>for that sort of traffic (one hit every 86 seconds), you could easily get
>away with a 486-based PC with 24M of RAM and a 500M hard drive. The only
>thing that will bug you will be the long compile times when you're getting
>the software installed.
>
>miguel
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] $HTTP_POST_VARS

2002-03-21 Thread Rick Emery

$interest = $HTTP_POST_VARS['interest'];

or (if using PHP 4.1)
$interest = $_POST['interest'];

then reference $interest[0], $interest[1], $interest[2],...


-Original Message-
From: Joshua E Minnie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 11:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] $HTTP_POST_VARS


I need to access a variable on a form that allows multiples.  I have to use
$HTTP_POST_VARS so I need to know how to display the information obtained
from the form.  This is what I am using right now:



Both $HTTP_POST_VARS["interest"] and $HTTP_POST_VARS["interest[]"] throw
errors.  Any suggestions would be greatly appreciated.


--
Joshua E Minnie
CIO
[EMAIL PROTECTED]

"Don't work for recognition, but always do work worthy of recognition."



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] $HTTP_POST_VARS

2002-03-21 Thread Joshua E Minnie

I need to access a variable on a form that allows multiples.  I have to use
$HTTP_POST_VARS so I need to know how to display the information obtained
from the form.  This is what I am using right now:



Both $HTTP_POST_VARS["interest"] and $HTTP_POST_VARS["interest[]"] throw
errors.  Any suggestions would be greatly appreciated.


--
Joshua E Minnie
CIO
[EMAIL PROTECTED]

"Don't work for recognition, but always do work worthy of recognition."



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Apache

2002-03-21 Thread Jason Wong

On Friday 22 March 2002 01:39, Erik Price wrote:
> On Thursday, March 21, 2002, at 12:22  PM, Jason Wong wrote:
> > On Friday 22 March 2002 00:54, Erik Price wrote:
> >> Isn't it just a matter of setting the permissions?  apache can't have
> >> read access to this directory, that's all.
> >
> > No, he doesn't want apache to *list* files in that directory but still
> > to be
> > able to serve files *from* that directory.
>
> I'm not trying to argue, I just want to make sure that *I* understand
> how Apache works -- I thought that if you deny "read" access to a
> directory to Apache, then it won't list the files, but as long as Apache
> still has "execute" access to the directory then it should still serve
> files from it.  Just like using "ls" in the shell, you can read files in
> a directory you cannot read, as long as you can execute the directory
> and know the exact filename.

I don't know what ramifications it will have by denying apache read access to 
a directory. But what the poster asked for is a standard apache directive so 
the prudent approach would be to set this from within apache and not through 
the OS.

> Am I wrong?

I really don't know. Try it and tell us ;-)



-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
The future isn't what it used to be.  (It never was.)
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Append to the beginning of a file...

2002-03-21 Thread Jason Wong

On Friday 22 March 2002 00:40, Mauricio Sthandier wrote:
> I already seen it... I used "r+" and "aw".
> I saw and example in www.php.net, in the fopen function description, but it
> is incomplete...
> this is taking me hours !!!.
> Well, if I can preappend... how can I read, for example, the first 8 chars
> of the last line I inserted ?. They have no fixed length.
> I'm starting to feel silly :(.
>
> "Chris Boget" <[EMAIL PROTECTED]> escribió en el mensaje
> news:01bd01c1d0f6$3fc51f60$[EMAIL PROTECTED]...
>
> > > I guess thist must be really silly... but how can I append text to the
> > > beginning of a file ???
> > > I've been trying since a while... but all I get is overwriting !.
> >
> > Check out fopen().  There is an argument that you can use in that
> > function call to determine how the data is sent to the file.

Write your stuff to a new file, 
read old file, 
add stuff from old file onto new file,
rename new file to old file


OR

read old file into a very long string
add new stuff to beginning of very long string
write very long string to old file

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Technological progress has merely provided us with more efficient means
for going backwards.
-- Aldous Huxley
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Apache

2002-03-21 Thread Erik Price


On Thursday, March 21, 2002, at 12:22  PM, Jason Wong wrote:

> On Friday 22 March 2002 00:54, Erik Price wrote:
>> Isn't it just a matter of setting the permissions?  apache can't have
>> read access to this directory, that's all.
>
>
> No, he doesn't want apache to *list* files in that directory but still 
> to be
> able to serve files *from* that directory.

I'm not trying to argue, I just want to make sure that *I* understand 
how Apache works -- I thought that if you deny "read" access to a 
directory to Apache, then it won't list the files, but as long as Apache 
still has "execute" access to the directory then it should still serve 
files from it.  Just like using "ls" in the shell, you can read files in 
a directory you cannot read, as long as you can execute the directory 
and know the exact filename.

Am I wrong?


Erik




Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Session Varaible Problem

2002-03-21 Thread Erik Price


Have you made sure that the correct values are even being loaded into 
the session variable containers?  IOW, try

echo $id;
echo $first_name;

to make sure that there is actually any value in those variables.



Erik


On Thursday, March 21, 2002, at 12:22  PM, Randy Phillips wrote:

> Hi,
>
> I have tried every example of creating a session variable I could find 
> on
> php.net and have had the same results with all of them. The session
> variables get set on the initial page but that's the only place I can 
> access
> them.
>
> I am new to php so I'm sure I have just overlooked something.
>
> Here is my latest attempt. It's a simple login page that starts a 
> session
> when a user successfully logs in:
>
> $connect...
>
> $sql ...
>
> list($id,$first_name) = mysql_fetch_row($sql);
> session_start();
> if (!session_is_registered('user_id')) {
> session_register('user_id');
> $user_id = $id;
> session_register('user_name');
> $user_name = $first_name;
> } else {
> echo "Session is set and should now be availalbe on all pages 
> via a
> cookie. At least that what I expected.";
> }
>
> Sadly, these vars are available only on this page.
>
> echo "ID: $user_id";
>
> echo "Name: $user_name";
>
> Mac OSX
> Apache
> PHP 4+
>
> Thanks,
>
> --
> Rp
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Function Not Accepting Variable Values From a Form

2002-03-21 Thread Dr. Shim

function verify()
   {

echo "Verify called. Values are...\n
 Title:" . $_POST['title'] . "\n# This works!
 Author: $author\n
 Lead Actors: $actors\n
 Poster: $poster\n
 Summ.: $summery\n\n
 Rev.: $review\n\n";
}




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Apache

2002-03-21 Thread Jason Wong

On Friday 22 March 2002 01:38, Mika Tuupola wrote:
> On Fri, 22 Mar 2002, Jason Wong wrote:
> > No, he doesn't want apache to *list* files in that directory but still to
> > be able to serve files *from* that directory.
>
>   Just add an empty index file?

But that's a kludge. Anyway someone has already given the correct answer.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
I hate quotations.
-- Ralph Waldo Emerson
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Apache

2002-03-21 Thread Rasmus Lerdorf

So either turn off the DirectoryIndex or put an index.html in the dir.

On Fri, 22 Mar 2002, Jason Wong wrote:

> On Friday 22 March 2002 00:54, Erik Price wrote:
> > Isn't it just a matter of setting the permissions?  apache can't have
> > read access to this directory, that's all.
>
>
> No, he doesn't want apache to *list* files in that directory but still to be
> able to serve files *from* that directory.
>
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> We have a equal opportunity Calculus class -- it's fully integrated.
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Session Varaible Problem

2002-03-21 Thread Rasmus Lerdorf

Are you calling session_start() on the subsequent pages you want to be
part of the session?

On Thu, 21 Mar 2002, Randy Phillips wrote:

> Hi,
>
> I have tried every example of creating a session variable I could find on
> php.net and have had the same results with all of them. The session
> variables get set on the initial page but that's the only place I can access
> them.
>
> I am new to php so I'm sure I have just overlooked something.
>
> Here is my latest attempt. It's a simple login page that starts a session
> when a user successfully logs in:
>
> $connect...
>
> $sql ...
>
> list($id,$first_name) = mysql_fetch_row($sql);
> session_start();
> if (!session_is_registered('user_id')) {
> session_register('user_id');
> $user_id = $id;
> session_register('user_name');
> $user_name = $first_name;
> } else {
> echo "Session is set and should now be availalbe on all pages via a
> cookie. At least that what I expected.";
> }
>
> Sadly, these vars are available only on this page.
>
> echo "ID: $user_id";
>
> echo "Name: $user_name";
>
> Mac OSX
> Apache
> PHP 4+
>
> Thanks,
>
> --
> Rp
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Error compiling PHP with native MySql

2002-03-21 Thread Jason Wong

On Friday 22 March 2002 00:29, Richard Fox wrote:

> When I try to configure PHP 4.1.1 I get the following error:

> configure: error: Cannot find header files under /usr/include/mysql
>
> The command line I'm using to configure:
>
> ./configure --with-mysql=/usr/include/mysql


  ./configure --with-mysql=/usr

or just

  ./configure --with-mysql

if you want the PHP's builtin support for mysql.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Operator, please trace this call and tell me where I am.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] How to adress pictures stored outside of the http serverroot?

2002-03-21 Thread Miguel Cruz

On Thu, 21 Mar 2002, andy wrote:
> "Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb:
>> The way to do this is to write a little PHP wrapper script that you
>> stick in your document_root that does a readfile() on the file stored
>> outside of the document_root.
>
> What would you suggest to prevent people from downloading all the  image
> files?

Here's one idea: write a little PHP wrapper script that you stick in your
document_root that does a readfile() on the file stored outside of the
document_root.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Apache

2002-03-21 Thread Mika Tuupola

On Fri, 22 Mar 2002, Jason Wong wrote:

> No, he doesn't want apache to *list* files in that directory but still to be 
> able to serve files *from* that directory.

Just add an empty index file?

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




  1   2   >