[PHP] PHP won't parse under https, but will with http

2003-08-28 Thread Jason Jacobs
I'm not sure if this is the right forum for this question, but I'm hoping someone can 
help nonetheless. :)

I installed an SSL Cert. on a site the other day for a checkout page, and the php 
won't parse.  If I take the s off, it parses just fine.  I have a feeling it's an 
httpd.conf setting, but I don't know where to look.  Maybe it's a php.ini issue to 
make it parse on port (whatever SSL is)?  Thanks for any suggestions.

-jason

--
web developer
Factory7.com
354-9977 

[PHP] Re: PHP won't parse under https, but will with http

2003-08-28 Thread Jason Jacobs
 Is this a virtual host ? How did you define the AddType in httpd.conf ?
Yes.  And I believe our AddTypes are set for each v-host.  In this case, the v-host 
has its own AddTypes.

AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps

Like I mentioned, the php works fine with http.  Also, html files work fine.

 Also check that u'r apache listens to 443. 
I tried to add Listen 443, but the server start failed saying something like no 
listening sockets available.  I also tried Listen 64.83.52.19:443, but I got the same 
thing.  I checked to make sure that mod_ssl was loaded, and while I didn't see it in 
the LoadModule list, httpd told me it was already loaded when I added it to the list.

I now know this is an Apache issue, so if I should take it to an Apache list I can do 
that.  Thanks!

-j




[PHP] sessions on 4.3.2, register_globals On

2003-08-27 Thread Jason Jacobs
Hi all.  I am switching a site I built to a new server, and the old site was written 
with register_globals on.  I believe the php version was the same, but I'm not sure 
(and I can't check).  The way I understand it, for older versions of php, one had to 
use session_register($foo) and could use the session variable $foo in other pages.  In 
4.3, the standard is to use $_SESSION['foo'] to register and use the variable.

Now, I would imagine that in 4.3.2 with register_globals on my code should still work. 
 In fact, it does not work unless I use $_SESION['foo'].  Why is this?  Is there a way 
to make my code work without editing every page?  Please tell me I don't have to go in 
and redo my session (and form, for that matter) variables...

Thanks for your help.
-jason

--
web developer
jjwd.net

[PHP] corrupt images

2003-05-27 Thread Jason Jacobs
Hi all.  I've been struggling with getting images to upload cleanly.  I'm using php 
4.2.2.  When I look at the uploaded file info, it gives me no errors and the file size 
is fine.  But the picture is all messed up.  I'm using the move_uploaded_file 
function.  The max size is 8mb in php.ini, and I set the MAX_FILE_SIZE in the form to 
100k.  None of the images I'm testing have been over 30k.

I've seen that some people have had this problem, but a solution hasn't been 
consistent.  Some said to use copy() and some said it's a bug in PHP.  If anyone knows 
what's going on I'd appreciate some advice.  Thanks!

-jason

[PHP] creating mailing list in php?

2003-03-22 Thread Jason Jacobs
Hi y'all.  I am working on a mail list app that's pretty simple...don't need to let 
users post, only admins, and it's very straightforward.  I tested it out with mail() 
on 50 addresses, and it took 78 seconds plus massive server load.  Part of that may be 
the mail scanner we have, but I also know mail() opens a socket each time, and that's 
gonna make it pretty slow too.  Does anyone have any suggestions, or even examples of 
what you've done for this type of thing?  The load is about 3000 emails daily, all at 
once (the client emails out daily specials to their clients), which at this rate would 
take over an hour to send.

Also, and I might just not be paying attention, but is there any word about this list 
going phpBB or the like sometime soon?  That would be great.

Thanks again for your help.

-jason

[PHP] conditional question.

2003-02-26 Thread Jason Jacobs
G'day all.  I'm trying to hack some code, and I've run into a goofy problem.  

I have a conditional that looks like this:
if ((is_array($HTTP_POST_VARS['cart_quantity']))  
(is_array($HTTP_POST_VARS['products_id']))){
//do stuff
}

The evaluation returns false.  What makes this confusing is just before this block, 
for debugging purposes, I have the following:
echo $HTTP_POST_VARS['cart_quantity'];
echo $HTTP_POST_VARS['products_id'];

Both of them return the string Array, indicating to me that they are arrays.  Now, 
if they're both arrays, and the conditional is checking to see if they're both arrays, 
wouldn't it make sense that it should evaluate to true?

Thanks for your help.

-
Jason Jacobs
Factory7, LLC

Support a Constitutional Amendment to protect the Pledge of Allegiance and National 
Motto. Go to www.wepledge.com

[PHP] problems with fopen

2003-02-03 Thread Jason Jacobs
Afternoon all.

I've been trying to write to a text file for a while.  I opened it thusly:
$file = fopen($filename, w+);

to read it and then write to it after I modified what goes in it.  The problem is it 
won't write.  It sets the pointer to the beginning and erases everything, but doesn't 
write the data when I do:
fputs($file, $newdata);

I don't get a write error, but it just doesn't write the data.  I tried opening it for 
a+, and it appended the new data to the old data.  I'd enjoy knowing why w+ doesn't 
work.

I did some searching through the list and found a workaround using tempnam and rename. 
 That seems to work ok, opening the original for r.  If I could just chmod the 
directory so it's 755 after the data gets written, I'd be satisfied.  But an exec 
doesn't seem to be doing the job.  

Can anyone explain why my original fopen doesn't work or tell me how to chmod the 
directory?  The biggest problem with this server is I don't have shell access to 
anything, so I have to do everything in php code with a site user, so I don't know how 
much I'd be able to change.  I assume I should be able to chmod since the user I'm 
connecting with owns the directory.

Thanks for your help, as always.

-
Jason Jacobs
Factory7, LLC

Support a Constitutional Amendment to protect the Pledge of Allegiance and National 
Motto. Go to www.wepledge.com


[PHP] fgets and Macs

2003-01-15 Thread Jason Jacobs
Hello all.  I was doing some reading and found that fgets() doesn't work so well with 
a text file created on a mac, and php.net has a fix.  It would be wonderful if my 
php.ini file actually contained the variable auto_detect_line_endings.  How can I 
solve this problem?  Is my only solution (without upgrading php) to convert the text 
files to unix format?  Or am I looking in the wrong place for that value?  Thanks for 
your help.

-
Jason Jacobs

Support a Constitutional Amendment to protect the Pledge of Allegiance and National 
Motto. Go to www.wepledge.com


[PHP] passing arrays

2001-06-22 Thread Jason Jacobs



Hi all. I'm trying to pass an array to 
another page, and I'm not having luck. I thought maybe it would do 
something slick by passing it in the url, but it doesn't. So, how can I 
pass the array? I've done it before by going through the array and making 
a hidden input field for each of the entries, but this is in just a processing 
script that redirects to the display page right after. Would it be easiest 
to just do it all on one page? Thanks for the help.

-Jason


Re: [PHP] Date Question

2001-03-08 Thread Jason Jacobs

Ok, I understand that the epoch is a point in time that's static, but what
exactly is the epoch?  I've heard it mentioned a lot on the list, but I have
no idea what it really is. :)

Jason


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




[PHP] weeks

2001-03-08 Thread Jason Jacobs

Anyone know offhand a way to organize the output from a query by week?  I'm
writing a work log app and I want the admin to see everyone's work ordered
first by lastname, and then by date.  But only want that week's data to show
up, and maybe a dropdown with previous weeks available.  Don't go thinking
about an answer, cuz I'm doing that, but if anyone already knows how to
solve this problem or part of it, lemme know.  Thanks once again.

Jason


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




[PHP] htaccess

2001-03-07 Thread Jason Jacobs

Hey folks.  I have another htaccess question.  I have an entire folder set
up to require authentication.  It's in an htaccess file, not in each page.
I was sure that the variable that's passed from the authentication dialog
was $PHP_AUTH_USER, but it's not working when I use that in a query.  Anyone
got ideas?  I'd paste my code, but when that wasn't working, I changed it
back to hardcoded values. :)

Jason


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




[PHP] htaccess problem

2001-03-01 Thread Jason Jacobs

Hey all.  I've written htaccess files and stuff with one or 2 users, and it
works fine.  I decided that making an htgroup file would work best in my
situation though, so I went to webmonkey.com and followed their tutorial to
make the htaccess files.  As far as I can tell, all of my files are correct.
But for some reason when I try to authenticate, the server won't take my
info as valid.  Has anyone else had this problem with using an htgroup file?
Thanks.

Jason


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




Re: [PHP] pleaaaaaaaase help!

2001-03-01 Thread Jason Jacobs

Um...yeah.  Make the action of the form with the button be a script with the
statement.

- Original Message -
From: kaab kaoutar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 01, 2001 11:59 AM
Subject: [PHP] plese help!


 Hi!
 please i'm really in need of knowing if there is a way to do a php
statement
 once a button is clicked!
 Thanks
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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



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




[PHP] related to my .htgroup question...

2001-03-01 Thread Jason Jacobs

Heh...I'm a list frequenter today...

Ok, so I want to be able to do some things with php.
1) add a user to the .htpasswd file
I know I can use exec() to run commands on the server.  The problem here is
that when I do "htpasswd .htpasswd username" I get prompted for passwords
twice.  How the heck can I do that with php?  Will this work (I just thought
of this right now...):
exec("htpasswd .htpasswd username");
exec("password");
exec("password");
If this works, that would be great.  I would assume that after this, the
program stops and I don't have something running in the background.

23)edit the .htgroup and .htaccess files
I have no idea how to do this at all whatsoever.  I don't want the person
running this script to have to see or touch the file at all, but I'm
thinking that I'm going to have to, like, read the file into a textarea and
make the user edit it and then save it again.  That's going to be a pain in
the butt when the user is office personnel that doesn't know this stuff from
french.

Throughtout this all, I don't want any output.  I just want the scripts to
run and then redirect back to the page it was submitted from.  Whew...any
ideas?  I'm not going to have to learn perl just for this am I? ;^)

Thanks a bunch
Jason


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




Re: [PHP] second select how???

2001-02-28 Thread Jason Jacobs

Mmhmm...onChange() event...it's javascript.  Go to webmonkey.com and search
for it.  They have a cute little tutorial about how to do that.  Good luck.

Jason

- Original Message -
From: Miguel Loureiro [EMAIL PROTECTED]
To: php-gen [EMAIL PROTECTED]
Sent: Wednesday, February 28, 2001 12:50 PM
Subject: [PHP] second select how???


Hello all,
I have a dynamic select box, according information in database, but I want
to restrict a second select box with the choice made in the first select
box, but my problem is that I only know the value of the first one after
submit form. It is possible to know a choice of a select box without
submited ??
T.Y.
Best Regards
Miguel Loureiro [EMAIL PROTECTED] 



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




Re: [PHP] Best browser

2001-02-27 Thread Jason Jacobs

It's been my experience that Netscape doesn't support mistakes as well as IE
(example...forgetting a close td tag or close table, stuff like that), so
usually if I build a page, I use Netscape to check it and it almost always
works the same in IE.  As far as php and ssl goes, isn't that all server
stuff?  I'm kinda new at the server end, so this is a good question for me
2.

Is it going to be an intranet page with the company only using one browser?
If not, it should really probably be made to work in both browsers equally
well.

my 2 cents.
Jason

- Original Message -
From: Ide, Jim [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 27, 2001 10:32 AM
Subject: [PHP] Best browser



 I am developing a PHP application for a client that allows
 users at remote locations to access and update a database.
 I would like to standardize on one www browser so that the
 help desk people only have to be knowledgeable about one
 browser.  The users all have MS Win 95, 98, or NT.  The
 quality (ie. the 'bug-free-ness") of the browser's SSL code
 is very important.  What browser should I choose?

 Thanks -
 Jim


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



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




[PHP] header() and require()

2001-02-26 Thread Jason Jacobs

Hi.  In some of my files, I have a require statement to get some global
stuff accessable.  I also have some header() redirects.  They don't work
(they worked before I added the requires).  I moved the require under one of
the header()s and that one works now, but I can't move it under the other
one because stuff has to happen before the redirect and it needs the
required stuff.  So my question is do require statements produce output that
I can't see (which would make the redirects not work)?  The files I'm
requiring don't have any output, which is why I'm confused.  Thanks.

Jason


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




[PHP] 2 columns same name cuz of a join

2001-02-26 Thread Jason Jacobs

Hi again. :)  Does anyone know how to reference a value in an array or
object if the returned table has 2 fields of the same name.  IE, I am
querying 2 tables and returning an id value from each.  On both tables, the
id fieldname is "id".  I know I can access the vals like $array[0] and
$array[1], but is there a way I can fetch_object do do that?  Can I
reference them like $object-table1.id and $object-table2.id?  I would
assume not since it just makes a new table when it returns the data.  Thanks
for the help, and I hope my question is clear. :)

Jason


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




[PHP] how to know which web dir you're in

2001-02-09 Thread Jason Jacobs

Anyone got any ideas on how to tell what the url you're at?  One of my sites
is for a bank with a bunch of branches, and when people go to a site for a
branch, I want the "prequalify for loan" to know where the person came from
(it's the same page for all branches, but it just has a select box) and make
the location they came from be the selected one when the prequal page comes
up.  Whaddya think?

Thanks.
Jason


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




[PHP] similar to shuffle()

2001-02-01 Thread Jason Jacobs

Does anyone know of a function in version 3.0.7 that does the same thing to
shuffle(), which was implemented in 3.0.8?  I'm trying to run a banner
script I found, and I guess we were 1 one-hundredth of a version off for
this thing...

Or, how painless is it to upgrade to the latest version?  I'm assuming that
PHP is backwards compatible...

Thanks.
Jason


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




[PHP] trouble with updating the id numbers

2001-01-25 Thread Jason Jacobs

Hi all.  In the project I'm working on, I've got a table with ids that are
written based on how many records are in the table.  i.e., the first record
has an ID of 1, the 50th is 50, etc.  When a row gets deleted (I created a
web interface, I don't want all these members using phpMyAdmin), the ID's of
all the records after it are supposed to be decremented by one.  I thought
it was working, but yesterday it didn't.  Can anyone see what I'm doing
wrong?

***
if ($delete == 1){
 #delete the row
 $worked = mysql_query("delete from $tablename where
$fields[0]=\"$editval\" ", $database);
 if (!$worked){
  echo "couldn't delete anythingp";
 }//end if

 $connection = @mysql_connect("localhost",$PHP_AUTH_USER,$PHP_AUTH_PW);
 $database = @mysql_select_db($databasename, $connection);
 $del = mysql_query("select * from $tablename where RestID =
$restidval", $database);
 while ($Info_Array = mysql_fetch_array($del)){
   #update the ids of each record
   if($Info_Array[$v]  $editval){ #v is a fieldname (specifically
the id) defined above
 mysql_query("update $tablename set $fields[0] =
($fields[0]-1) where $fields[0] = \"$Info_Array[$v]\" ", $database);
   }//end if
  }//end while

  $delete=0; #reset the delete flag
}//end if

***

Assume that all the variables have the values they're supposed to (cuz last
I checked, they do. :))

Thanks for your help. Again.

Jason


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




[PHP] field types

2001-01-23 Thread Jason Jacobs

Does anyone know a function to give me the mySql field types?  I saw the
function mysql_field_type, but that returns php types not mysql.  What I
wanna do is if the type of the field is "Text" then I wanna make a
"textarea" to edit and add stuff.  Thanks.

Jason


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




[PHP] selected = true

2001-01-22 Thread Jason Jacobs

Hey all.  Does anyone have any ideas how I can carry over a selected value?
:)  It's probably easy but my mind is making it difficult.  A value is
stored for a record in the DB which had been previously assigned through a
select statement.  If that record gets edited, the value that was chosen
through the select does also, and that would necesitate another select
statement, but for the ease of use, I would like the current value to be the
selected one.  The catch is, the values in the select statement come from
the db because they depend on what the user inputs.  Any ideas?

Thanks
Jason


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




Re: [PHP] question (as if anything else would be in an email to the list...)

2001-01-19 Thread Jason Jacobs

I tried this, but it didn't work.  I need the value inside the form still
because the value of the select will be written to an array that gets passed
to the next page (as hidden inputs), which will in turn be compiled into a
value list for a db query.  I tried making the name of  the select be the
array posistion (value[7] in this case), but when I changed values, IE
errored and said that value.7 isn't an object.  If I don't change the
option, ie, I use the default select value, the code works.  But as soon as
I change the option, IE gives me an error and can't change the value.  Would
this work: make the onChange event trigger a page refresh to set the form
values?  Or will that simply draw the page again?  Thanks.

Here is the code I'm using...all of the php variables have values that work,
the problem is in changing the value of the select
-BEGIN
script
!--
function changeValue(newValue) {
document.addstuff.value[7].value = newValue;
}
file://--
/script

echo "td colspan=\"$numfields\" Select which location you want this to
apply to.brselect name=\"pickloc\"
onChange=\"changeValue(this.options[this.selectedIndex].value);\"";

 $i=0;

 while ($locidval = mysql_fetch_object($locinfo)){
  echo "option value=\"$locidval-LocationID\"Location:
$locidval-Area/optionbr\n";
 }//end while

 echo "/td/selectinput type=\"hidden\"
name=\"value[$locidnum]\"/trtr\n";

--END---


 just write a js function like:

 --cut here--

 script
 !--
 function changeValue(newValue) {
 document.formname.inputNameToChange.value = newValue;

 file://here is alert to show you the thingy
 alert(document.formname.inputNameToChange.value);
 }
 file://--
 /script

 form name=formname
 input type=hidden name=inputNameToChange
 select onChange="changeValue(this.options[this.selectedIndex].value);"
 option value=value1label1
 option value=value2label2
 /select
 /form

 --end cutting--

 DanO (javascript is your friend, not your enemy!)


 -Original Message-
 From: Jason Jacobs [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 18, 2001 1:33 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] question (as if anything else would be in an email to the
 list...)


 Hi again.  I have a new problem.  I have a form with a drop down list.
When
 the user chooses something from the list, I need a variable to change
values
 so it can be used upon submission of the form.  I thought maybe I could
 throw a little line of code into an onChange() function in the select  
 tag, but I got the MS Debugger thrown up on me.  Anyone got an idea of how
 to do this?  Is it possible to call a javascript function and change the
 variable in there?  Or an easier way (like inline php code...)?  Thanks

 Jason


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




Re: [PHP] question (as if anything else would be in an email to the list...)

2001-01-19 Thread Jason Jacobs

I tried this, but it didn't work.  I need the value inside the form still
because the value of the select will be written to an array that gets passed
to the next page (as hidden inputs), which will in turn be compiled into a
value list for a db query.  I tried making the name of  the select be the
array posistion (value[7] in this case), but when I changed values, IE
errored and said that value.7 isn't an object.  If I don't change the
option, ie, I use the default select value, the code works.  But as soon as
I change the option, IE gives me an error and can't change the value.  Would
this work: make the onChange event trigger a page refresh to set the form
values?  Or will that simply draw the page again?  Thanks.

Here is the code I'm using...all of the php variables have values that work,
the problem is in changing the value of the select
-BEGIN
script
!--
function changeValue(newValue) {
document.addstuff.value[7].value = newValue;
}
file://--
/script

echo "td colspan=\"$numfields\" Select which location you want this to
apply to.brselect name=\"pickloc\"
onChange=\"changeValue(this.options[this.selectedIndex].value);\"";

 $i=0;

 while ($locidval = mysql_fetch_object($locinfo)){
  echo "option value=\"$locidval-LocationID\"Location:
$locidval-Area/optionbr\n";
 }//end while

 echo "/td/selectinput type=\"hidden\"
name=\"value[$locidnum]\"/trtr\n";

--END---


 just write a js function like:

 --cut here--

 script
 !--
 function changeValue(newValue) {
 document.formname.inputNameToChange.value = newValue;

 file://here is alert to show you the thingy
 alert(document.formname.inputNameToChange.value);
 }
 file://--
 /script

 form name=formname
 input type=hidden name=inputNameToChange
 select onChange="changeValue(this.options[this.selectedIndex].value);"
 option value=value1label1
 option value=value2label2
 /select
 /form

 --end cutting--

 DanO (javascript is your friend, not your enemy!)


 -Original Message-
 From: Jason Jacobs [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 18, 2001 1:33 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] question (as if anything else would be in an email to the
 list...)


 Hi again.  I have a new problem.  I have a form with a drop down list.
When
 the user chooses something from the list, I need a variable to change
values
 so it can be used upon submission of the form.  I thought maybe I could
 throw a little line of code into an onChange() function in the select  
 tag, but I got the MS Debugger thrown up on me.  Anyone got an idea of how
 to do this?  Is it possible to call a javascript function and change the
 variable in there?  Or an easier way (like inline php code...)?  Thanks

 Jason


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




[PHP] question (as if anything else would be in an email to the list...)

2001-01-18 Thread Jason Jacobs

Hi again.  I have a new problem.  I have a form with a drop down list.  When
the user chooses something from the list, I need a variable to change values
so it can be used upon submission of the form.  I thought maybe I could
throw a little line of code into an onChange() function in the select  
tag, but I got the MS Debugger thrown up on me.  Anyone got an idea of how
to do this?  Is it possible to call a javascript function and change the
variable in there?  Or an easier way (like inline php code...)?  Thanks

Jason


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




Re: [PHP] question (as if anything else would be in an email to the list...)

2001-01-18 Thread Jason Jacobs

 then again, in the context of what you're doing, why not just build in a
 little php logic that knows if your select is a certain value, something
 else should happen?
Well, the select can't be a value until the user choses something (the
option stuff).  Based on the option the choose, a value needs to be
written to the select variable (in this case, it's an id value that is
used later to put the choice in a database field.  It's a venue location
selector for various shows, and the id of the venue gets put in the record
of the show).  So, I *am* trying to build a little php logic.  Kinda.  But
it's not working.

As for the suggestion to do the javascript, would this code work (assuming
that all the variables had values except the ones being written to)...

script
!--
function changeValue(newValue) {
document.formname.inputNameToChange.value = newValue;
}
//--
/script

form name=formname
input type=hidden name=inputNameToChange
select
name="location"onChange="changeValue(this.options[this.selectedIndex].value)
;"
option value= ? $value1 ?label1
option value=? $value2 ?label2
/select
/form

and then me be able to use $location in a query?  I didn't think it could
work this way...


-j


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




[PHP] error message handling

2001-01-17 Thread Jason Jacobs

I tried to send this before, so if I did, forgive me, but I don't think it
worked last time .:)

I'm trying to find a way to handle errors by number.  For example, if I get
a "directory already exists" error, I want to know what the number that is
so I can check the return value on the function that gave the error.

That made no sense.  Lemme try again.  Instead of getting the php-generated
error message, I want to create my own so the user has a nice message
instead of one that makes it look like I don't know what I'm doing. :)  Any
suggestions?

Jason


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




[PHP] password()

2001-01-15 Thread Jason Jacobs

Hi.  I use password() to excrypt my passwords when I'm adding users to my
mysql database.  I'm wondering if there's a function to use to un-encrypt it
(for a web interface to change the password, and so the admin who is editing
user info can see what it is).  Thanks for any help.

Jason



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