Re: [PHP] php & javascript drop down menu???
thanks Jason, between this & the other suggestions I was emailed I believe I can make this all work like I need to. Jeff "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wednesday 12 February 2003 08:47, Jeff Bluemel wrote: > > OK... I have a dynamic menu system, and I have to maintain a dynamic menu. > > however, the amount of content I need in my menu is going to be rapidly > > outgrown. I believe my only solution is to deploy a javascript drop down > > menu (users have to be javascript compatible anyway for some other issues > > in my pages). > > > > however, it seems like anytime I try to integrate php & javascript I run > > into a total nightmare. the php & javascript do not need to integrate at > > the client level, but just on the server side to actually deploy the menu > > to the user. (have if then statements of info from a database that will > > determine if the item is displayed to the user or not, so should be pretty > > easy to accomodate) > > > > does anybody have any sample code of a javascript menu across the top of > > the page that will have menu, and submenu's they are deploying with php > > echo statements? > > Try this: > > http://phplayersmenu.sourceforge.net/ > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > The difference between this place and yogurt is that yogurt has a live > culture. > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php & javascript drop down menu???
OK... I have a dynamic menu system, and I have to maintain a dynamic menu. however, the amount of content I need in my menu is going to be rapidly outgrown. I believe my only solution is to deploy a javascript drop down menu (users have to be javascript compatible anyway for some other issues in my pages). however, it seems like anytime I try to integrate php & javascript I run into a total nightmare. the php & javascript do not need to integrate at the client level, but just on the server side to actually deploy the menu to the user. (have if then statements of info from a database that will determine if the item is displayed to the user or not, so should be pretty easy to accomodate) does anybody have any sample code of a javascript menu across the top of the page that will have menu, and submenu's they are deploying with php echo statements? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Warning: ifx_connect: E [SQLSTATE=IX 001 SQLCODE=-1829]
ok everybody, I felt like I kind of had a brain fart... *blush* it dawned on my that some of the informix environment variables may not have been getting set. I added the following to the script I wrote, and it fixed the problem; export INFORMIXDIR=/opt/informix export ODBCINI=/usr/local/etc/odbc.ini export INFORMIXSERVER=m_srv "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I get this error on reboot, and I keep getting this error unless I restart > apache. now, I've tried putting pauses in to make apache wait to start > (using scripts & sleep commands), but I keep having this problem unless I > log into the system & restart it. > > does anybody know the possible cause to this problem, or how I can work > around / solve this? > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Warning: ifx_connect: E [SQLSTATE=IX 001 SQLCODE=-1829]
I get this error on reboot, and I keep getting this error unless I restart apache. now, I've tried putting pauses in to make apache wait to start (using scripts & sleep commands), but I keep having this problem unless I log into the system & restart it. does anybody know the possible cause to this problem, or how I can work around / solve this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] anyway to do a 'whos online' from session variable?
ok - let me take that a step further - if I store the SID in the table also are the files in the /tmp directory stored with the SID? if they are this may be a way I can delete out inactive session, but be able to allow extended inactive sessions for users who may be pulling lengthy reports... "Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message 007e01c2b6c4$4612d600$0500a8c0@bambino">news:007e01c2b6c4$4612d600$0500a8c0@bambino... > Arr the garbage collection is based on a probability > (session.gc_probability) and therefore it will clean > up if you get enough hits to the server. Check the documentation for > config of sessions. > > I use db for sessions with a check to ensure db is available. (you can > then cleanup whatever you want) > > > > Timothy Hitchens (HiTCHO) > Open Platform Consulting > e-mail: [EMAIL PROTECTED] > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, 8 January 2003 1:11 PM > > To: Timothy Hitchens (HiTCHO) > > Cc: 'Jeff Bluemel'; [EMAIL PROTECTED] > > Subject: RE: [PHP] anyway to do a 'whos online' from session variable? > > > > > > > > > > On Wed, 8 Jan 2003, Timothy Hitchens (HiTCHO) wrote: > > > > > Hmm... yes you could create an array of the files then > > check the last > > > mod stamp using stat (remember to reset stat). > > > > > > Sessions are also cleaned up via the garbage collection system > > > controlled via php.ini > > > > How do you force garbage collection? I've written an > > application using sessions for storage and there's been a > > session sitting in my /tmp directory for 2 days now, well > > over the 1440 seconds expiration. > > > > Ed > > > > > > > > -- > > 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] anyway to do a 'whos online' from session variable?
thanks... I'm almost done with this project, and I think I will implement this in the next phase. doesn't sound terribly difficult, but I think I will hold off. definitely something I will be doing in the future, and probably not too distance future. "Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message 007301c2b6aa$2fbaebf0$0500a8c0@bambino">news:007301c2b6aa$2fbaebf0$0500a8c0@bambino... > Hmm... yes you could create an array of the files then check the last > mod stamp using stat (remember to reset stat). > > Sessions are also cleaned up via the garbage collection system > controlled via php.ini > > > > HiTCHO has Spoken! > Timothy Hitchens (HiTCHO) > [EMAIL PROTECTED] > > > -Original Message- > > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, 8 January 2003 10:04 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] anyway to do a 'whos online' from session variable? > > > > > > yea, that will work. however, I was thinking of something a > > little more dramatic like parsing the /tmp directly, > > associating ID's, and killing dead sessions etc. > > > > "Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in > > message 004701c2b6a2$2dfeb6a0$0500a8c0@bambino">news:004701c2b6a2$2dfeb6a0$0500a8c0@bambino... > > > Simple create a database table for logins and have a status > > that you > > > set to online / offline and last seen could also be added. > > > > > > Then it is just a simple SELECT statement. > > > > > > If you don't want to use a database you could flock (not perfect) a > > > file then read in a serialised array and update then write out and > > > unlock. > > > > > > > > > > > > HiTCHO has Spoken! > > > Timothy Hitchens (HiTCHO) > > > [EMAIL PROTECTED] > > > > > > > -Original Message- > > > > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] > > > > Sent: Wednesday, 8 January 2003 9:08 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: [PHP] anyway to do a 'whos online' from session variable? > > > > > > > > > > > > when a user logs into my system I set a variable > > > > $_SESSION['username']. now, every page somebody pulls up it > > > > revalidates their login so somebody cannot get into the > > backend of > > > > the system. > > > > > > > > now - is there a way I can make a utility that will show me the > > > > session username's that are in use? it would be useful > > to be able > > > > to know who's currently online. this is a website that > > will not be > > > > published, and is used for a VERY limited number of people. > > > > > > > > Jeff > > > > > > > > > > > > > > > > -- > > > > 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
Re: [PHP] anyway to do a 'whos online' from session variable?
yea, that will work. however, I was thinking of something a little more dramatic like parsing the /tmp directly, associating ID's, and killing dead sessions etc. "Timothy Hitchens )" <[EMAIL PROTECTED]> wrote in message 004701c2b6a2$2dfeb6a0$0500a8c0@bambino">news:004701c2b6a2$2dfeb6a0$0500a8c0@bambino... > Simple create a database table for logins and have a status that you > set to online / offline and last seen could also be added. > > Then it is just a simple SELECT statement. > > If you don't want to use a database you could flock (not perfect) a file > then read in a serialised array and update then write out and unlock. > > > > HiTCHO has Spoken! > Timothy Hitchens (HiTCHO) > [EMAIL PROTECTED] > > > -Original Message- > > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, 8 January 2003 9:08 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] anyway to do a 'whos online' from session variable? > > > > > > when a user logs into my system I set a variable > > $_SESSION['username']. now, every page somebody pulls up it > > revalidates their login so somebody cannot get into the > > backend of the system. > > > > now - is there a way I can make a utility that will show me > > the session username's that are in use? it would be useful > > to be able to know who's currently online. this is a website > > that will not be published, and is used for a VERY limited > > number of people. > > > > Jeff > > > > > > > > -- > > 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] anyway to do a 'whos online' from session variable?
when a user logs into my system I set a variable $_SESSION['username']. now, every page somebody pulls up it revalidates their login so somebody cannot get into the backend of the system. now - is there a way I can make a utility that will show me the session username's that are in use? it would be useful to be able to know who's currently online. this is a website that will not be published, and is used for a VERY limited number of people. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: query join 2 databases? or match up arrays?
I'll have to play with this. this is not a public website per say so multiple requests on this in a short period of time probably isn't going to be an issue. I'll have to look at this & decide how I want to do this. I'm assuming I either need to do away with this, or make both options selectable. this isn't a released product so if they didn't get the access to this feature it wouldn't be the end of the world. they are already getting a ton more features with this product then they would otherwise have, which is nothing. Jeff "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > actually - I believe that may be a workable solution. you were mentioning > > checking the timestamp on a mysql table. how would I check the timestamp on > > a mysql table? > > see the timestamp data type. > > > even with this I'm betting it would be more time consuming to create the > > table then it would to pull the info from informix, and process validation 1 > > record at a time from mysql. that would be a simple query instead of an > > Yeah, but only the first time... if you get a lot of repeat traffic on the > same set of rows only the first "hit" will be slow since after that it > will all be in mysql... > > > insert. this would also all take place on the server it's self instead of > > pulling it from another server. I could load it up with ram & let it run. > > > > at any rate that gives me a lot of option to think about, and I'll probably > > has to work with some samples of the stuff from here to see what way is > > going to be the fastest. it would probably depend if the user was pulling > > this info in a session. if it was once, or several times. all something to > > think about. > > > > the other option I'm thinking about is just not giving the distributors > > access to this information, but restricting it to users with permissions to > > the entire batch only. > > > > thanks, > > > > Jeff > > > > "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Hmm... what about querying the informix database for the set of rows you > > > want all at once, putting that into a temporary mysql table with a > > > timestamp and then doing the rest of your work from there. > > > > > > Then the next time it happens check the timestamp on that mysql table and > > > if it's out of date, delete it and go and fetch updated rows from > > > informix, otherwise just use what's in that mysql table. > > > > > > This would act as a sort of replicated table, but only taking into account > > > the records that are actually being hit... > > > > > > maybe? > > > > > > On Fri, 3 Jan 2003, Jeff Bluemel wrote: > > > > > > > well - the informix database will be running on another server (a > > telecom > > > > billing system). this is a web based front end, and I really want to > > leave > > > > the other system alone 100%. if I were to modify anything I would make > > the > > > > mysql permissions table inside of informix, but there are liability > > reason > > > > which would keep me from doing so. > > > > > > > > still - you bring up an interesting point. a php script file that ran > > on > > > > crontab may not be a bad answer. however, again I would run into a > > problem > > > > of volume. there are an average of 3-4 million card in the informix > > server > > > > so I couldn't do this in a export & import. too may records, and info > > has > > > > to be accurate within 15 minutes. shear volume I believe is going to > > kill > > > > that idea. I would be back to 1 record at a time running every 15 > > minutes. > > > > I would think too much load, and more practical to do it 1 record at a > > time > > > > upon request which won't be too frequent. > > > > > > > > hoping there's another solution I'm not aware of, or over looked. > > > > > > > > Jeff > > > > > > > > "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message > > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > Any chance you can do a somewhat frequent export from informix into > > mysql > > > > > or the other way aroun
[PHP] Re: query join 2 databases? or match up arrays?
actually - I believe that may be a workable solution. you were mentioning checking the timestamp on a mysql table. how would I check the timestamp on a mysql table? even with this I'm betting it would be more time consuming to create the table then it would to pull the info from informix, and process validation 1 record at a time from mysql. that would be a simple query instead of an insert. this would also all take place on the server it's self instead of pulling it from another server. I could load it up with ram & let it run. at any rate that gives me a lot of option to think about, and I'll probably has to work with some samples of the stuff from here to see what way is going to be the fastest. it would probably depend if the user was pulling this info in a session. if it was once, or several times. all something to think about. the other option I'm thinking about is just not giving the distributors access to this information, but restricting it to users with permissions to the entire batch only. thanks, Jeff "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hmm... what about querying the informix database for the set of rows you > want all at once, putting that into a temporary mysql table with a > timestamp and then doing the rest of your work from there. > > Then the next time it happens check the timestamp on that mysql table and > if it's out of date, delete it and go and fetch updated rows from > informix, otherwise just use what's in that mysql table. > > This would act as a sort of replicated table, but only taking into account > the records that are actually being hit... > > maybe? > > On Fri, 3 Jan 2003, Jeff Bluemel wrote: > > > well - the informix database will be running on another server (a telecom > > billing system). this is a web based front end, and I really want to leave > > the other system alone 100%. if I were to modify anything I would make the > > mysql permissions table inside of informix, but there are liability reason > > which would keep me from doing so. > > > > still - you bring up an interesting point. a php script file that ran on > > crontab may not be a bad answer. however, again I would run into a problem > > of volume. there are an average of 3-4 million card in the informix server > > so I couldn't do this in a export & import. too may records, and info has > > to be accurate within 15 minutes. shear volume I believe is going to kill > > that idea. I would be back to 1 record at a time running every 15 minutes. > > I would think too much load, and more practical to do it 1 record at a time > > upon request which won't be too frequent. > > > > hoping there's another solution I'm not aware of, or over looked. > > > > Jeff > > > > "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Any chance you can do a somewhat frequent export from informix into mysql > > > or the other way around so all your stuff is in one database? > > > > > > -philip > > > > > > On Fri, 3 Jan 2003, Jeff Bluemel wrote: > > > > > > > ok - here's my problem. I have some data in mysql, and other data in > > > > informix. > > > > > > > > here is my application. this is for distributors of prepaid phone > > cards. > > > > prepaid phone cards have 3 numbers they can be identified by pin number > > > > (which is unique), or by batch & serial number. the batch number is > > > > basically the type of card, and the serial number & batch number for > > another > > > > unique identifier when used together. > > > > > > > > now - a batch can be given to several different distributors. > > therefore, > > > > when then are pulling various types of information on the batch they > > should > > > > only be able to see it for their cards, and not all of the cards in the > > > > batch. > > > > > > > > piece of cake right? well - the permissions information is kept in > > mysql, > > > > and the batch information its self is kept in an informix database. > > there > > > > is no way around this for me. > > > > > > > > the only way I can think of to work around this problem is to query 1 > > card > > > > at a time, and sum the info etc. together. however, there could be > > 400,000+ > > > > records, and this would be a slow tedious process.
[PHP] Re: query join 2 databases? or match up arrays?
well - the informix database will be running on another server (a telecom billing system). this is a web based front end, and I really want to leave the other system alone 100%. if I were to modify anything I would make the mysql permissions table inside of informix, but there are liability reason which would keep me from doing so. still - you bring up an interesting point. a php script file that ran on crontab may not be a bad answer. however, again I would run into a problem of volume. there are an average of 3-4 million card in the informix server so I couldn't do this in a export & import. too may records, and info has to be accurate within 15 minutes. shear volume I believe is going to kill that idea. I would be back to 1 record at a time running every 15 minutes. I would think too much load, and more practical to do it 1 record at a time upon request which won't be too frequent. hoping there's another solution I'm not aware of, or over looked. Jeff "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Any chance you can do a somewhat frequent export from informix into mysql > or the other way around so all your stuff is in one database? > > -philip > > On Fri, 3 Jan 2003, Jeff Bluemel wrote: > > > ok - here's my problem. I have some data in mysql, and other data in > > informix. > > > > here is my application. this is for distributors of prepaid phone cards. > > prepaid phone cards have 3 numbers they can be identified by pin number > > (which is unique), or by batch & serial number. the batch number is > > basically the type of card, and the serial number & batch number for another > > unique identifier when used together. > > > > now - a batch can be given to several different distributors. therefore, > > when then are pulling various types of information on the batch they should > > only be able to see it for their cards, and not all of the cards in the > > batch. > > > > piece of cake right? well - the permissions information is kept in mysql, > > and the batch information its self is kept in an informix database. there > > is no way around this for me. > > > > the only way I can think of to work around this problem is to query 1 card > > at a time, and sum the info etc. together. however, there could be 400,000+ > > records, and this would be a slow tedious process. plus for each card I'd > > have to query the mysql database for permissions, and then in turn query the > > informix database in turn. this could take a long time to display the > > webpage. > > > > clear as mud??? recommendations? > > > > > > > > -- > > 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] query join 2 databases? or match up arrays?
ok - here's my problem. I have some data in mysql, and other data in informix. here is my application. this is for distributors of prepaid phone cards. prepaid phone cards have 3 numbers they can be identified by pin number (which is unique), or by batch & serial number. the batch number is basically the type of card, and the serial number & batch number for another unique identifier when used together. now - a batch can be given to several different distributors. therefore, when then are pulling various types of information on the batch they should only be able to see it for their cards, and not all of the cards in the batch. piece of cake right? well - the permissions information is kept in mysql, and the batch information its self is kept in an informix database. there is no way around this for me. the only way I can think of to work around this problem is to query 1 card at a time, and sum the info etc. together. however, there could be 400,000+ records, and this would be a slow tedious process. plus for each card I'd have to query the mysql database for permissions, and then in turn query the informix database in turn. this could take a long time to display the webpage. clear as mud??? recommendations? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] way to insert timer / pause?
thats a good idea Mike... thanks for the suggestion. "Michael J. Pawlowsky" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Thank god the tag in HTML was removed. > Don't know how long you've been working on sites, > but I started at the same time the first NSCA Mosaic browser came out. About 10 years now. > > They had back then, and everyone starting using it just about everywhere! > Imagine trying to read complete pages that were blinking. > > The first HTML chats would allow tags inserted... > so someone would open a tag and not close it to make the whole page blink. > > Anyways... the way I would do it today is to make an animated gif with the text blinking and just load that. > > Mike > > > > > *** REPLY SEPARATOR *** > > On 02/01/2003 at 9:52 PM Jeff Bluemel wrote: > > > >highlighted text instead (and flashing if I can figure that out). > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] way to insert timer / pause?
Andrew, my application is of customer service tries to recharge the balance on a pin, and it is over their charge limit (the customer service personnel) then I was thinking I would display a header for a few seconds telling them the recharge failed, and why. however, I think I will just out it in highlighted text instead (and flashing if I can figure that out). Jeff "Andrew Brampton" <[EMAIL PROTECTED]> wrote in message 002b01c2b2d6$37fba7a0$4fc40650@andrew">news:002b01c2b2d6$37fba7a0$4fc40650@andrew... > I beleive you can use output buffering to stop anything from being displayed > until the very last moment. Or you can code your page with tables. I know IE > wont' render a table until the last (I beleive), so this could stop > your html from showing. > > Or if there is going to be a long pause, you could make a intermediate page > that displays this will take minute. This page would have a meta refresh > that keeps refreshing itself checking the status of your job. Once the job > is complete on the next refresh it will notice the job is done and voila > display the results. > > Andrew > - Original Message - > From: "Jeff Bluemel" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, January 03, 2003 2:56 AM > Subject: [PHP] way to insert timer / pause? > > > > if there a command, or a way I can put say a 5 second, or a 10 second > pause > > which will make it so it will output x amount of html, and then continue? > > or if I can pause it will it not display any of the html until the entire > > script has ran? > > > > > > > > -- > > 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] way to insert timer / pause?
thanks for the reply Mike... Jeff "Michael J. Pawlowsky" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I'm not sure I totally understand... but... > > to pause... sleep(10); i.e. 10 second pause Everything stops... not just output > > you can buffer everything and only output it when you want > > look at ob_start > > But a warning... your server or the clients might change the expexted behaviour. > > > Mike > > > > *** REPLY SEPARATOR *** > > On 02/01/2003 at 7:56 PM Jeff Bluemel wrote: > > >if there a command, or a way I can put say a 5 second, or a 10 second > >pause > >which will make it so it will output x amount of html, and then continue? > >or if I can pause it will it not display any of the html until the entire > >script has ran? > > > > > > > >-- > >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] way to insert timer / pause?
thanks Sed "Sed" <[EMAIL PROTECTED]> wrote in message 014d01c2b2d7$86935330$fe78a8c0@mamma">news:014d01c2b2d7$86935330$fe78a8c0@mamma... Sure, just read the following: http://www.php.net/manual/en/function.sleep.php As a reply for your second question, you can always assign the output to a variable and echo the variable in the end of the script. Regards, Sumarlidi E. Dadason SED - Graphic Design _ Tel: 896-0376, 461-5501 E-mail: [EMAIL PROTECTED] website: www.sed.is -Original Message- From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] Sent: 3. janúar 2003 02:57 To: [EMAIL PROTECTED] Subject: [PHP] way to insert timer / pause? if there a command, or a way I can put say a 5 second, or a 10 second pause which will make it so it will output x amount of html, and then continue? or if I can pause it will it not display any of the html until the entire script has ran? -- 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] way to insert timer / pause?
if there a command, or a way I can put say a 5 second, or a 10 second pause which will make it so it will output x amount of html, and then continue? or if I can pause it will it not display any of the html until the entire script has ran? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there php equiv left() and right() functions?
works great thanks, Jeff "Philip Olson" <[EMAIL PROTECTED]> wrote in message Pine.BSF.4.10.10212190240490.68100-10@localhost">news:Pine.BSF.4.10.10212190240490.68100-10@localhost... > > You want explode(), something like: > > list($a, $b) = explode('|', $string); > > > Regards, > Philip Olson > > > On Wed, 18 Dec 2002, Jeff Bluemel wrote: > > > I have a string that will look like the following; > > > > data1|data2 > > > > now - I need to put data1 in a variable, and data2 in another variable. > > I've found the functions strlen, and strpos, but I can't figure how to grab > > this data. > > > > thanks, > > > > Jeff > > > > > > > > -- > > 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: is there php equiv left() and right() functions?
thanks... Jeff "Matthew Gray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jeff Bluemel wrote: > > > I have a string that will look like the following; > > > > data1|data2 > > > > now - I need to put data1 in a variable, and data2 in another variable. > > I've found the functions strlen, and strpos, but I can't figure how to > > grab this data. > > > > thanks, > > > > Jeff > > Try > > list($var1, $var2) = explode('|', 'data1|data2'); > > Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is there php equiv left() and right() functions?
I have a string that will look like the following; data1|data2 now - I need to put data1 in a variable, and data2 in another variable. I've found the functions strlen, and strpos, but I can't figure how to grab this data. thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: problems with jsp & php
yes this is javascript - for some reason I thought jsp was another term for javascript so I apologize. Let me try these code changes, and see how this shakes out. Jeff "Chris Wesley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm pretty sure everyone else is as confused by your description as I am. > (Hence, I didn't answer.) It looks like you're trying to generate > JavaScript w/ PHP, but your subject mentions JSP. In a nutshell, I don't > know if what you're doing is over my head, or just not explained clearly. > > I can man an uncomfortable assumption, though: You mean to generate > JavaScript and JSP has nothing to do with this problem. Try quoting your > JavaScript variable values ... > > Change: > var action = ; > > To: > var action = ""; > > ... likewise with the rest of your JavaScript variables. > > g.luck, > ~Chris > > On Thu, 12 Dec 2002, Jeff Bluemel wrote: > > > somebody has to have an answer to this... > > > > > > "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I cannot figure out where my problem is with the following script. I know > > > I've used this syntax successfuly in the past. when I take out the > > > variables, and just set link to something without using php then this > > works. > > > know when I click on the form that activated the button it does nothing. > > > > > > function batch_close() > > > { > > > if (parent_window && !parent_window.closed) > > > { > > > var action = ; > > > var batch = ; > > > var begin = ; > > > var end = ; > > > var amount = ; > > > var link = "maintain.html?action=" + action + "&batch=" + batch + > > > "&begin=" + begin + "&end=" + end + "&amount=" + amount; > > > parent_window.document.location.href=link; > > > parent_window.focus(); > > > } > > > window.close(); > > > } > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problems with jsp & php
somebody has to have an answer to this... "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I cannot figure out where my problem is with the following script. I know > I've used this syntax successfuly in the past. when I take out the > variables, and just set link to something without using php then this works. > know when I click on the form that activated the button it does nothing. > > function batch_close() > { > if (parent_window && !parent_window.closed) > { > var action = ; > var batch = ; > var begin = ; > var end = ; > var amount = ; > var link = "maintain.html?action=" + action + "&batch=" + batch + > "&begin=" + begin + "&end=" + end + "&amount=" + amount; > parent_window.document.location.href=link; > parent_window.focus(); > } > window.close(); > } > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problems connecting to a MySQL database
have you tried connected to the mysql database from a prompt before using php??? "Eric" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Greetings! > > I have a script which attempts to connect to the database in three different > segments of code. > > I'm using this code to connect to the database: > > $db = mysql_connect("the_host", "the_user", $cfg['Servers'][0]['password']); > . > . > . > . > mysql_close($db); > > The first time I connect ok, retrieve all of the rows from a table, and > display portions of a column. > > A user then clicks on a button to retrieve more detailed information from > the same table in the database: > > $db = mysql_connect("the_host", "the_user", $cfg['Servers'][0]['password']); > > This bombs with: > > Warning: Undefined offset: 0 in (directory stuff)/www/cgi-php4/my_script.php > on line 228 > > Warning: Access denied for user: 'the_user' (Using password: NO) in > (directory stuff)/www/cgi-php4/my_script.php on line 228 > > Warning: MySQL Connection Failed: Access denied for user: 'the_user' (Using > password: NO) in (directory stuff)/www/cgi-php4/my_script.php on line 228 > > Error: Could not connect to the database. > > > Now, if I change the index to match the exact number of rows in the table, > it's successfully accessed: > > $db = mysql_connect("the_host", "the_user", $cfg['Servers'][4]['password']); > > it works fine. But I don't think this is right. > > Any ideas as to why this is happening? > > Thanks much! > > Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problems with jsp & php
I cannot figure out where my problem is with the following script. I know I've used this syntax successfuly in the past. when I take out the variables, and just set link to something without using php then this works. know when I click on the form that activated the button it does nothing. function batch_close() { if (parent_window && !parent_window.closed) { var action = ; var batch = ; var begin = ; var end = ; var amount = ; var link = "maintain.html?action=" + action + "&batch=" + batch + "&begin=" + begin + "&end=" + end + "&amount=" + amount; parent_window.document.location.href=link; parent_window.focus(); } window.close(); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formating numbers & date
worked great... the other method may be a little quicker, but this code is easier for me to understand, and although it is used in a loop there really is no visible difference in how quickly it displays. thanks, Jeff "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > on 05/12/02 11:15 AM, Justin French ([EMAIL PROTECTED]) wrote: > > > Hi, > > > > > $date = '2002-12-04 23:21:49'; > > $newdate = date('m/d/Y', strtotime($date)); > > echo $newdate; > > ?> > > Whooops, forgot the time bit! > > Should be > > $date = '2002-12-04 23:21:49'; > $newdate = date('n/j/Y g:i:s a', strtotime($date)); > echo $newdate; > ?> > > echo's 12/4/2002 11:21:49 pm > > also fixed the leading zero's problem :) > > > Justin French > > http://Indent.com.au > Web Development & > Graphic Design > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formating numbers & date
thanks... I will play with this, and let ya know if I have a problem... looks easy enough. Jeff "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > on 05/12/02 11:15 AM, Justin French ([EMAIL PROTECTED]) wrote: > > > Hi, > > > > > $date = '2002-12-04 23:21:49'; > > $newdate = date('m/d/Y', strtotime($date)); > > echo $newdate; > > ?> > > Whooops, forgot the time bit! > > Should be > > $date = '2002-12-04 23:21:49'; > $newdate = date('n/j/Y g:i:s a', strtotime($date)); > echo $newdate; > ?> > > echo's 12/4/2002 11:21:49 pm > > also fixed the leading zero's problem :) > > > Justin French > > http://Indent.com.au > Web Development & > Graphic Design > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formating numbers & date
I'm displaying a date that I get from a informix database query - the date format is as follows; 2002-12-04 23:21:49 I want it to display as 12/4/2002 11:21:49 PM Jeff "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wednesday 04 December 2002 08:29, Jeff Bluemel wrote: > > > ... but the date format doesn't seem to > > allow me to pass it a date. > > Your code? > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Information Processing: > What you call data processing when people are so disgusted with > it they won't let it be discussed in their presence. > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formating numbers & date
ok - I've been looking through this... the number_format is working great (actually I finally found that function right before I read your response), but the date format doesn't seem to allow me to pass it a date. Jeff "Kevin Stone" <[EMAIL PROTECTED]> wrote in message 01ff01c29b0b$381e2380$6601a8c0@kevin">news:01ff01c29b0b$381e2380$6601a8c0@kevin... > To change the number of decimal places look into the number_format() > function. > To change the date/time structure the date() function will do what you need. > Search for both on www.php.net > > -Kevin > > > - Original Message - > From: "Jeff Bluemel" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, December 03, 2002 1:11 PM > Subject: [PHP] formating numbers & date > > > > I'm curious how I change the number of decimal places displayed, and also > > changing the date / time structures before displaying them with an echo > > command. > > > > Jeff > > > > > > > > -- > > 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] formating numbers & date
I'm curious how I change the number of decimal places displayed, and also changing the date / time structures before displaying them with an echo command. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to pass multiple $_GET variables
WOW - talk about a quick response. this solved my problem... thanks, Jeff "Ray Hunter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > HREF="action.html?action=deactivate&confirm=yes" > > Should work... > > > > On Tue, 2002-11-19 at 20:44, Jeff Bluemel wrote: > > I'm using the following syntax, but evidently it's not correct. > > > > HREF="action.html?action=deactivate?confirm=yes" > > > > thanks, > > > > Jeff > -- > > Ray Hunter > email: [EMAIL PROTECTED] > www: http://venticon.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mailing by SMTP
I used this link for sendmail on linux, and it works great... you'll have a very hard time beating it. Jeff "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > On 11/20/2002 08:18 AM, Siamak wrote: > > hi > > how can i send a mail by a smtp server from a php page? > > If you are using Windows that is is the default method. > > If not, you may want to try these classes: > > http://www.phpclasses.org/smtpclass > http://www.phpclasses.org/mimemessage > > -- > > Regards, > Manuel Lemos > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to pass multiple $_GET variables
I'm using the following syntax, but evidently it's not correct. HREF="action.html?action=deactivate?confirm=yes" thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] speed comparison
I have not problem displaying variable - I do it all over my webpage, or how to handle them. you may want to check out my post above that has a weblink to the project, and a better explanation of exactly what I am doing. "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > As Maxim pointed out a couple of days ago, this is just a matter of > nanosecs, it shouldn't be really noticeable from performance. > > The fastest was to display non-PHP output is to escape from PHP and enter > plain HTML, like > $a = 'World'; > ?> > Hello ! > > This is quite ugly to read and write, and it prohibits to separate content > from output. So the next fast way to output would be > echo 'Hello World!'; > Note the single quotes - they are (_very_slightly_) faster than double quotes. > > If you need to display variables you must revert to > echo "Hello $a!"; > to parse the string (note the double quotes here). > > I would always prefer to have to buy a faster server and use the second or > third method than having to escape from PHP for any output, for what it's > worth. > > > -- >>O Ernest E. Vogelsinger >(\) ICQ #13394035 > ^ http://www.vogelsinger.at/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this not possible?
here's the URL if case somebody decides to look at it; http://obi-wan.domintcom.com user: guest pass: domintcom go to customer service, prepaid pin, and then look up 3077876962 - activate, deactivate, and recharge this is for customer service of prepaid phone cards. now - when I reload this page to refresh the information sometimes it can really take awhile. I need to somehow get the information from the user on how much to recharge the pin for. now, before I refresh the page I need to get how much the user wants to recharge, process the recharge, and then refresh the page that all of this started on. I thought it would be the simplest if I could somehow use javascript to prompt the user for a value, confirm if the user wants to recharge x pin for $xx.xx, recharge the pin, and then refresh the calling page so it now reflects the new balance. I don't want to refresh original page until this is all done because it can take sometime for this page load at times. is everybody lost now? "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > At 22:39 18.11.2002, Jeff Bluemel spoke out and said: > [snip] > >I'm been ignored on this question for 4-5 days now. even if it is not > >possible could somebody please verify this? > > > >is it possible to pass a variable from javascript directly to php WITHOUT > >using either a link, or a form submit to pass the variables? I've gotten a > >work around to call an image that's actually a php file, but run my script, > >and then return an image file. > > > >is this the only way? > [snip] > > Generally spoken, yes - the browser needs to pass the data back to the > server somehow. > > What are you really up to? Do you want to transmit data to the server > without the user clicking on a link or a button? > > You can always use JavaScript to submit a form (even a hidden-only form), > or to reload the document with the same or a different URL. > > URL-Reload: > > document.location.href = url; > > Form submit: > > document.forms[formname].submit(); > > > -- >>O Ernest E. Vogelsinger >(\) ICQ #13394035 > ^ http://www.vogelsinger.at/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this not possible?
thanks David - I'll look over it... Jeff "David Rice" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi Jeff: > > Brent Ashley has written some cool stuff to make asynchronous remote > calls to server without client page refresh using javascript/iframe > etc. There is a PHP version. > Go to: > http://www.ashleyit.com/rs/main.htm > And click on the link: > Javascript Remote Scripting (JSRS). > > It works for most browsers. > > HTH > > David > > On Monday, November 18, 2002, at 04:39 PM, Jeff Bluemel wrote: > > > I'm been ignored on this question for 4-5 days now. even if it is not > > possible could somebody please verify this? > > > > is it possible to pass a variable from javascript directly to php > > WITHOUT > > using either a link, or a form submit to pass the variables? I've > > gotten a > > work around to call an image that's actually a php file, but run my > > script, > > and then return an image file. > > > > is this the only way? > > > > > > > > -- > > 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] speed comparison
depends on my situation, but I use both techniques at times... "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I think the difference would be immeasurable, but to me, I think it would > make sense if PHP didn't have to parse plain HTML... > > So IMHO, > > > > /should/ be slightly quicker than > > {$foo}"; ?> > > The general consensus on the list seems to be "go with whichever one you are > more comfortable with, is more readable, and faster to write. > > > Justin > > > on 19/11/02 10:39 AM, Chris Edwards ([EMAIL PROTECTED]) wrote: > > > Which would run faster and generate less load on the server, or does it > > matter: > > > > > > > $output = " > > > ... > > ...html > > > > $name $phone ... > > "; > > > > echo $output; > > ?> > > > > -- OR - > > > > > ... > > ... > > ... > > .. > > > > > > I find it sucks to try and put all the php tags around stuff, so I just > > include it all. > > > > -- > > Chris Edwards > > Web Application Developer > > Outer Banks Internet, Inc. > > 252-441-6698 > > [EMAIL PROTECTED] > > http://www.OuterBanksInternet.com > > > > Justin French > > http://Indent.com.au > Web Developent & > Graphic Design > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this not possible?
well - now I understand why it is so difficult to make those 2 things work together. it would be so much easier if php had some way of displaying an inputbox etc. - Original Message - From: "BigDog" <[EMAIL PROTECTED]> To: "Jeff Bluemel" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, November 18, 2002 2:42 PM Subject: Re: [PHP] is this not possible? > No... > > Javascript need to send that data back to the server and how are you > going to do that? > > You will have to use a form or a link or some method to send it to the > server. > > Now you can use php to write your javascript code that can be used to > link to a php file that can be run on the client side which will then > access the server... > > but you are really talking about to things here server-side (php) and > client-side (javascript)... > > > On Mon, 2002-11-18 at 14:39, Jeff Bluemel wrote: > > I'm been ignored on this question for 4-5 days now. even if it is not > > possible could somebody please verify this? > > > > is it possible to pass a variable from javascript directly to php WITHOUT > > using either a link, or a form submit to pass the variables? I've gotten a > > work around to call an image that's actually a php file, but run my script, > > and then return an image file. > > > > is this the only way? > -- > .: B i g D o g :. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Be nice to newbies...
amen... "@ Nilaab" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello to all, > > I don't know about some of you, but I think PHP and the rest of the whole > open-source movement is the coolest thing in the world. I also personally > think it takes a lot of effort and courage to make a transition from > proprietory Windows Apps (Windows OS, SQL Server, IIS, VB, etc.), which > Microsoft pays an exaustive amount of money to keep people addicted to it, > to something like Linux/Apache/MySQL/PHP, or better known as LAMP, which is > almost a whole different world. For this reason, we need to be more lenient > toward newbies. I'm not trying to bring about a debate on Open Source vs > Microsoft, so let's not turn this into a bloody mess. I'm making use of the > best of both worlds when I can. It's like the saying, "I like the product, > but I don't like the government behind the product". > > The reason for this mail is because I've seen a lot of not-so-good-treatment > towards newbies recently, and this bad trend will grow and we will > eventually scare them away from even giving PHP a chance. There are nicer > ways to say, "You big dummy, look in the archives and stop filling up my > mailbox with useless questions that have already been answered here before" > (an exaggeration). If a newbie overlooked the documentation, put on a good > helpful face and point them to the URL that can help them. If it's not in > the documentation and it seems like a simple answer, don't belittle them > with snobbish remarks. Don't be mean. Mean people suck. One day these > newbies will be in your position and they might help you out with a > difficult problem. > > Anyway, my two cents worth. And again, please don't turn this into a > debate... > > - Nilaab > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is this not possible?
I'm been ignored on this question for 4-5 days now. even if it is not possible could somebody please verify this? is it possible to pass a variable from javascript directly to php WITHOUT using either a link, or a form submit to pass the variables? I've gotten a work around to call an image that's actually a php file, but run my script, and then return an image file. is this the only way? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] howto pass javascript variable to php
I apologize - javascript. Jeff "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You can still use onclick event to pass value kept in a javascript variable: > > > > function action(url) { > location.href='http://www.domain.net/' + url + '&var=' + javascript_var; > return false; > } > > Jeff Bluemel wrote: > > >it's easy enough to pass php variable to javascript, but doing this the > >other way around without a form submit, or location (passing as a php $_GET > >variable) seems to be a little nightmare. it's easy enough to do it with > >the form submit, or a location command. > > > >thanks, > > > >Jeff > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how do I get for to display $_POST value?
I didn't know I could set a value on that... thanks for the info. "John Nichel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > maxlength="20"> > > Jeff Bluemel wrote: > > OK... I have the following code which works perfect. however, when submit > > is pressed I would like it to display the pin number in the form again. > > > > > name="search"> > > 8 > > > > Pin : > > > > > style="background-color:#C2C2C2" name="submit" value="Find Pin" > > > > > Batch : > > > > Serial : > > > > > > > > > > > > > > > -- > By-Tor.com > It's all about the Rush > http://www.by-tor.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how do I get for to display $_POST value?
OK... I have the following code which works perfect. however, when submit is pressed I would like it to display the pin number in the form again. 8 Pin : Batch : Serial : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] howto pass javascript variable to php
it's easy enough to pass php variable to javascript, but doing this the other way around without a form submit, or location (passing as a php $_GET variable) seems to be a little nightmare. it's easy enough to do it with the form submit, or a location command. thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can I retrieve jsp varibable with get or post???
ok - the more I look at this the more I'm a bit lost. passing the variables from php to java makes sense. however, from your scripts you listed it is only possible to pass jsp variables to php by opening a new page, or by activating a form. is there a way to pass jsp variables to php while a script is running? i.e. use a jsp prompt to get a value as the php script goes on, and then take an action on that variable? for instance I have a situation where I need to apply a credit. granted, I could use a form to accomplish this, but I feel it would be much cleaner to use jsp to get the value. I also have situation where before proceeding I want to get an ok / cancel. "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > php => javascript > 1st way: > > var var_name= <?= $var_value ?> > > 2nd way: > > > javascript => php > 1st way: > location='http://server/script.php?var_name="; + js_var_name; > 2nd way: > form_name.input_name.value = js_var_name; > > hope you get the point :-) > > Jeff Bluemel wrote: > > >Can I utilize java script variables with get or post? any information on > >integrating the 2, and passing info back & forth? > > > >thanks, > > > >Jeff > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail problem
Thanks for the reply... it took me a little bit to get this worked out, but it is working perfectly now. I appreciate the assistance. Jeff "Manuel Lemos" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > On 11/16/2002 04:53 PM, Jeff Bluemel wrote: > > anybody??? still haven't gotten this figure out. > > You may want to try this class and mail me back if it does not work: > > http://www.phpclasses.org/mimemessage > > > -- > > Regards, > Manuel Lemos > > > > > Jeff > > > > "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > >>OK - I got the rasmail codes from Zend.com's code library. it is working > >>perfectly for my application except for one problem. the email I am using > >>to send has a .pdf file attachment. > >> > >>I can open that PDF file up directly from the site after it is created, > > > > but > > > >>I cannot open the file attachment up. it seems the coding is wrong of > >>something like that so that the attachment is getting corrupted. > >> > >>I have emailed the author for assistance, but haven't receive a response. > >>I'm hoping somebody here can assist me. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with base64_encode and windows
OK... I'm using base64_encode to encode a file on the linux side. however, outlook express does not seem to unencode the file properly. I'm wondering how to work around this problem. Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sendmail problem
anybody??? still haven't gotten this figure out. Jeff "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > OK - I got the rasmail codes from Zend.com's code library. it is working > perfectly for my application except for one problem. the email I am using > to send has a .pdf file attachment. > > I can open that PDF file up directly from the site after it is created, but > I cannot open the file attachment up. it seems the coding is wrong of > something like that so that the attachment is getting corrupted. > > I have emailed the author for assistance, but haven't receive a response. > I'm hoping somebody here can assist me. > > here is the part of code; > > function Attachment($attachedfile) { > if ($attachedfile) { > $pf=@fopen($attachedfile,"r") or die($this->ErrorOutput(9)); > $bytes=fread($pf,filesize($attachedfile)); > $file=chunk_split(base64_encode($bytes)); > fclose($pf); > } > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can I retrieve jsp varibable with get or post???
thanks - yes I do understand the code you placed. OK - can I take the JSP variable with a post or a get? are these just general http variables? Jeff "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > php => javascript > 1st way: > > var var_name= <?= $var_value ?> > > 2nd way: > > > javascript => php > 1st way: > location='http://server/script.php?var_name="; + js_var_name; > 2nd way: > form_name.input_name.value = js_var_name; > > hope you get the point :-) > > Jeff Bluemel wrote: > > >Can I utilize java script variables with get or post? any information on > >integrating the 2, and passing info back & forth? > > > >thanks, > > > >Jeff > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] can I retrieve jsp varibable with get or post???
Can I utilize java script variables with get or post? any information on integrating the 2, and passing info back & forth? thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sendmail problem
OK - I got the rasmail codes from Zend.com's code library. it is working perfectly for my application except for one problem. the email I am using to send has a .pdf file attachment. I can open that PDF file up directly from the site after it is created, but I cannot open the file attachment up. it seems the coding is wrong of something like that so that the attachment is getting corrupted. I have emailed the author for assistance, but haven't receive a response. I'm hoping somebody here can assist me. here is the part of code; function Attachment($attachedfile) { if ($attachedfile) { $pf=@fopen($attachedfile,"r") or die($this->ErrorOutput(9)); $bytes=fread($pf,filesize($attachedfile)); $file=chunk_split(base64_encode($bytes)); fclose($pf); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how to delete files?
unlink did not work, but exec('rm -f *.php'); worked... thanks guys <[EMAIL PROTECTED]> wrote in message news:20021114015426.61527.qmail@;pb1.pair.com... > Yes unlink('*.php'); should work... > > If god doesn't want that, just use exec('rm -f *.php'); > > Regards > > -- > > M.CHAILLAN Nicolas > [EMAIL PROTECTED] > www.WorldAKT.com Hébergement de sites internets. > > "Jeff Bluemel" <[EMAIL PROTECTED]> a écrit dans le message de news: > [EMAIL PROTECTED] > > when this php script starts I want it to remove *.php > > > > how can I do this? will unlink accept a wild card? > > > > > > Jeff > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to delete files?
when this php script starts I want it to remove *.php how can I do this? will unlink accept a wild card? Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] command to determine the end of a page?
actually Jay - I think inadvertently you answered my question better then I was really looking for. I originally wanted to do this with PDF, but the costs for pdflib were just too high, and I wouldn't find an open source/free solution. I will have to take a look at fpdf, and see if I can use it. if not then I guess I'll turn to java script which would be acceptable too. "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:003d01c28109$9ff641c0$8102a8c0@;000347D72515... > [snip] > Might not be the best solution, but you _could_ create PDFs of your data, > then > print those...? Really clunky, but you could do nice formatting type > stuff... > [/snip] > > You may want to try the FPDF class ... http://www.fpdf.org > > @HTH! > > Jay > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] command to determine the end of a page?
only problem with that is I believe it is going to change depending on what printer the user has. what looks good on mine may not be quite right for the next person. "Carl Brandenburg" <[EMAIL PROTECTED]> wrote in message news:ADEKJJAMOOACODPFNFAPAECLCDAA.tongo@;bossig.com... > I am very unfamiliar with printing from PHP, but could you just guess how > many lines per page you want to print and after that many lines issue a page > break then print your header for the next page? Once you have it working you > can tweak the line per page to where they fill a whole sheet of paper. It's > a quick and dirty way of printing reports that I use in our DOS based > accounting system. > > Carl > > On Thursday 31 October 2002 10:08 am, Jeff Bluemel wrote: > > is there a php command that could determine if the end of a page has been > > reached according to their print driver? I'm need to print out a report > > that could be multiple pages. I need to be able to put column headings & > > page numbers. > > > > thanks, > > > > Jeff > > -- > 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] command to determine the end of a page?
is there a php command that could determine if the end of a page has been reached according to their print driver? I'm need to print out a report that could be multiple pages. I need to be able to put column headings & page numbers. thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there an alternative to this code?
I think my next project is to dig into ccs files, and get this part of my webpage setup... I've got a lot of good structures, but I need to get the styles etc. set. Jeff (here's the project http://obi-wan.domintcom.com username guest password domintcom - go to customer service, and then prepaid pin - look up pin number 3077876962) "Owen Prime" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Good answer. I tend to put the following line in my css which gets rid of > this problem in pretty much all browsers. > FORM { vspace: 0px; hspace: 0px; } > > Cheers, > > Owen Prime > http://www.noggin.com.au > > @ Edwin wrote: > > > Yes, I agree, this is an html/css question... but you can try this. > > > > Instead of putting your tags inside the tags, why not > > put them outside the tags like this: > > > > > > > > > > > > > > > > > > > > I think this won't destroy the "alignment". > > > > Just an idea... > > > > - E > > > > On Tuesday, October 8, 2002 11:24 AM > > Subject: Re: [PHP] is there an alternative to this code? > > Justin French wrote: > > > >> Alignment of elements in a table or form is really a HTML/CSS question. > >> Just to make matters worse, I have problems with aligning in IE, but not > >> NN... so perhaps there is no way to get it all working... try a HTML or > > CSS > >> group. > >> > >> Instead of a form, you could just have a clickable image, with any vars > > you > >> need in GET, not POST: > >> > >> myvar=myvalue"> > >> > >> or perhaps what you want in your case is: > >> > >> CS= Customer Service"> >> border="0"> > >> > >> > >> > >> Depends what you want to achieve on the next page. > >> > >> > >> Justin French > >> > >> > >> > >> > >> on 08/10/02 11:13 AM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > >> > >> > I would like to do this without using a form... is there a way I can > > recode > >> > this? > >> > > >> > I have the following table... the button that originates from a form > >> > is > > out > >> > of alighnment, and sits higher then the rest. how do I solve this? > >> > > >> > >> > border="0"> > >> > > >> > >> > $QUERY_STRING;}?>" method="POST"> > >> > >> > name="CS" > > >> > > >> > > >> > > >> > > >> > > >> > >> > src="images/logoff-bttn.jpg" border="0"> > >> > > >> > -- > >> > Jeff Bluemel > >> > > >> > > >> > > >> > -- > >> > Jeff Bluemel > >> > office (307) 787-6962 > >> > cell (307) 780-6962 > >> > fax (307) 787-6963 > >> > > >> > > >> > >> > >> -- > >> 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] is there an alternative to this code?
ok - I played with this, and found this to work (but I have no idea why). is there a good webpage that give good information on the variable, and html? I have the code working, but I really have no idea how this stuff works together like it does. I would be very interested in some place I can get a detailed explaination html variable, and how to php integrates with it. IF ($_GET['link'] == "CS") { ?> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Alignment of elements in a table or form is really a HTML/CSS question. > Just to make matters worse, I have problems with aligning in IE, but not > NN... so perhaps there is no way to get it all working... try a HTML or CSS > group. > > Instead of a form, you could just have a clickable image, with any vars you > need in GET, not POST: > > myvar=myvalue"> > > or perhaps what you want in your case is: > > CS= > Customer Service"> > > > > Depends what you want to achieve on the next page. > > > Justin French > > > > > on 08/10/02 11:13 AM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > > > I would like to do this without using a form... is there a way I can recode > > this? > > > > I have the following table... the button that originates from a form is out > > of alighnment, and sits higher then the rest. how do I solve this? > > > > > border="0"> > > > > > $QUERY_STRING;}?>" method="POST"> > > > name="CS" > > > > > > > > > > > > > > border="0"> > > > > -- > > Jeff Bluemel > > > > > > > > -- > > Jeff Bluemel > > office (307) 787-6962 > > cell (307) 780-6962 > > fax (307) 787-6963 > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: is there an alternative to this code?
I will have to try to play with the absmiddle function... border=0 is already in there Jeff "Owen Prime" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You may have already been here but what about a border="0" and > align="absmiddle" on the image button. > > > Cheers, > > Owen Prime > http://www.noggin.com.au > > > Jeff Bluemel wrote: > > > I would like to do this without using a form... is there a way I can > > recode this? > > > > I have the following table... the button that originates from a form is > > out > > of alighnment, and sits higher then the rest. how do I solve this? > > > >> border="0"> > > > > > $QUERY_STRING;}?>" method="POST"> > > > name="CS" > > > > > > > > > > > > >> border="0"> > > > > -- > > Jeff Bluemel > > > > > > > > -- > > Jeff Bluemel > > office (307) 787-6962 > > cell (307) 780-6962 > > fax (307) 787-6963 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there an alternative to this code?
ok - I'm looking at the code you posted, and I'm following some of it, but not all of it. let me tell you what I am trying to accomplish. I like the code you posted below, but I don't believe I am understanding it well enough to implement it. I have this 'clickable image'. when I click the image I want to reload the same page, but set a variable which will add more items to the menu in the form of an if statement. I tried to solve it with the following code instead of a form (I like they way you are using the link's there - is there a good howto on web variables, and more details on that type of code? - I've looked through what I can find, but doesn't make much sense still) this code sets the variable evertime the page is loaded instead of just 'onclick' here is my original code as it was originally coded. DomIntCom Web Access "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Alignment of elements in a table or form is really a HTML/CSS question. > Just to make matters worse, I have problems with aligning in IE, but not > NN... so perhaps there is no way to get it all working... try a HTML or CSS > group. > > Instead of a form, you could just have a clickable image, with any vars you > need in GET, not POST: > > myvar=myvalue"> > > or perhaps what you want in your case is: > > CS= > Customer Service"> > > > > Depends what you want to achieve on the next page. > > > Justin French > > > > > on 08/10/02 11:13 AM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > > > I would like to do this without using a form... is there a way I can recode > > this? > > > > I have the following table... the button that originates from a form is out > > of alighnment, and sits higher then the rest. how do I solve this? > > > > > border="0"> > > > > > $QUERY_STRING;}?>" method="POST"> > > > name="CS" > > > > > > > > > > > > > > border="0"> > > > > -- > > Jeff Bluemel > > > > > > > > -- > > Jeff Bluemel > > office (307) 787-6962 > > cell (307) 780-6962 > > fax (307) 787-6963 > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is there an alternative to this code?
I would like to do this without using a form... is there a way I can recode this? I have the following table... the button that originates from a form is out of alighnment, and sits higher then the rest. how do I solve this? " method="POST"> -- Jeff Bluemel -- Jeff Bluemel office (307) 787-6962 cell (307) 780-6962 fax (307) 787-6963 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what is the best way to handle connectivity
thanks for the FYI... this is what I as assuming the answer was going to be, but I wanted to make sure. Jeff "Salamander" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jeff, > > ODBC should work just fine - you can just link --with-iodbc as per the > HOWTOs on www.iodbc.org. > If you use a native driver than the Informix client needs to be > installed on the same box. > > Best regards, > Andrew Hill > Director of Technology Evangelism - OpenLink Software > Universal Data Access and the Virtuoso Universal Server > http://www.openlinksw.com/virtuoso/whatis.htm > > > On Saturday, October 5, 2002, at 11:44 PM, Jeff Bluemel wrote: > > > I've got informix on a sco open server box, and my webserver has php > > 4.2.3 > > with apache. I'm wondering what the best way to handle the > > connectivity > > into the sco box is (not concerned with how difficult this is to > > setup, but > > rather pure speed) > > > > do I try to use a native driver? if I use the native driver does > > informix > > have to be installed on the same box? do I just try to use odbc? > > > > -- > > Jeff Bluemel > > > > > > > > -- > > 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] what is the best way to handle connectivity
I've got informix on a sco open server box, and my webserver has php 4.2.3 with apache. I'm wondering what the best way to handle the connectivity into the sco box is (not concerned with how difficult this is to setup, but rather pure speed) do I try to use a native driver? if I use the native driver does informix have to be installed on the same box? do I just try to use odbc? -- Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] recent encrpyt decrypt code... (problems)
ok Tom - that worked... thanks for your help and assistance... I never would have figured this out without the help. Jeff "Tom Rogers" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Sunday, October 6, 2002, 7:32:11 AM, you wrote: > JB> ok - that made things work... here is the output. it looks like it is > JB> still encrypting it. what would the resolution be for this, or can I set > JB> the key to anything I want? > > Ok I have got to the bottom of it :) > You changed the name of the class but did not change the name of the > constructor so the key was never getting set. > So change > class encrypt_decrypt > { > var $secret; > function encrypt_class(){ > $this->secret = 'this is a very long key, even too long for the cipher'; > } > > to: > class encrypt_decrypt{ > var $secret; > function encrypt_decrypt(){ > $this->secret = 'this is a very long key, even too long for the cipher'; > > } > > > > > -- > regards, > Tom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sessions
instead of using the session_register try $_SESSTION[' ssun'] "Steve Vernon" <[EMAIL PROTECTED]> wrote in message 056a01c26cb2$509f2260$a5e387d9@extreme">news:056a01c26cb2$509f2260$a5e387d9@extreme... > Hiya, > Just upgraded to 4.2.3 and I am using the attatched PHP.ini file. I use > sessions on my website, and they dont seem to work now after the upgrade. > Just wondering which lines do I need to alter please? After I logon, they > loose the session after choosing another page. Every page runs the following > code to check the session passwords etc are valid.. > > Thanks, > > Steve > XX > > > > session_register("ssun"); > session_register("sspw"); > > if(!isset($ssun)) $ssun=""; > if(!isset($sspw)) $sspw=""; > > //Attempt to logon. Set the logon form variables to the session variables. > if(isset($sspass)) > { > $sspw=$sspass; > } > > if(isset($ssname)) > { > $ssun=$ssname; > } > > //Make sure no one breaks in, if in the param loggedin was set, unset it. > if(isset($loggedin)) > { > unset($loggedin); > } > > //Link and select the correct database > HIDDEN FOR MY SECURITY > > > //Check if the ssun and sspw are correct > $result = mysql_query("SELECT userid FROM users WHERE > userpassword=PASSWORD('$sspw') AND userid='$ssun'", $db_link); > $norows = mysql_num_rows($result); > > if($norows==1) > { > $loggedin="yes"; > } > else > { > $loggedin="no"; > } > > if(isset($logoff)) > { > if($logoff=="true") > { >$loggedin="no"; >$ssun=""; >$sspw=""; > } > } > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] recent encrpyt decrypt code... (problems)
I had not downloaded mcrypt, but I download it (which required a later version of mhash so I downloaded, and installed it too). I compiled everything with the instrucitons you listed, and I am still getttng the same error messages. Jeff "Tom Rogers" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Friday, October 4, 2002, 3:01:53 PM, you wrote: > JB> I've seen a few other post on this, and it sounds like there is more then > JB> one of use that is trying this script. I've got it so that I can use the > JB> commands, but I still get errors on the page... > > JB> here is what I have done. > > JB> I downloaded libmycrpt from > JB> ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt and configured it with > JB> the following options; > > JB> ./configure \ > JB> --with-included-algos="rijndael-128 arcfour stream cbc cfb"\ > JB> --disable-posix-threads > > That is a class I put together. I use libmcrypt-2.5.2 configured with: > > configure --prefix=/usr --enable-ltdl-install=no > > and mcrypt-2.6.2 configured with: > > configure --prefix=/usr > > and in php configure: > > --with-mcrypt=/usr/src/mcrypt-2.6.2 (thats where it was untarred) > > and it works like a dream :) > > -- > regards, > Tom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] recent encrpyt decrypt code... (problems)
I've seen a few other post on this, and it sounds like there is more then one of use that is trying this script. I've got it so that I can use the commands, but I still get errors on the page... here is what I have done. I downloaded libmycrpt from ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt and configured it with the following options; ./configure \ --with-included-algos="rijndael-128 arcfour stream cbc cfb"\ --disable-posix-threads I then reconfigured php with the --with-mcrpty option. now when I try to run the code I get the following errors; (the php code I will repost inc ase there are any questions) Usage Warning: key size is 0 in /usr/local/apache/htdocs/test.phtml on line 15 Warning: mcrypt_generic_init: Key length incorrect in /usr/local/apache/htdocs/test.phtml on line 15 Warning: mcrypt_generic(): 1 is not a valid MCrypt resource in /usr/local/apache/htdocs/test.phtml on line 16 Warning: mcrypt_generic_deinit(): 1 is not a valid MCrypt resource in /usr/local/apache/htdocs/test.phtml on line 17 encrypted = Warning: key size is 0 in /usr/local/apache/htdocs/test.phtml on line 25 Warning: mcrypt_generic_init: Key length incorrect in /usr/local/apache/htdocs/test.phtml on line 25 Warning: mdecrypt_generic(): 2 is not a valid MCrypt resource in /usr/local/apache/htdocs/test.phtml on line 26 Warning: mcrypt_generic_deinit(): 2 is not a valid MCrypt resource in /usr/local/apache/htdocs/test.phtml on line 29 decrypted = Oops they don't match secret = 'this is a very long key, even too long for the cipher'; } Function encode($id){ $eid = $iv = 0; $len = strlen($id); $id = $len.'-'.$id; $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); $key = substr($this->secret, 0, mcrypt_enc_get_key_size ($td)); $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv); mcrypt_generic_init ($td, $key, $iv); $eid = base64_encode(mcrypt_generic ($td, $id)); mcrypt_generic_deinit($td); return $eid; } Function decode($eid){ $id = $iv = 0; $td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, ""); $key = substr($this->secret, 0, mcrypt_enc_get_key_size ($td)); $iv = pack("a".mcrypt_enc_get_iv_size($td),$iv); mcrypt_generic_init ($td, $key, $iv); $id = mdecrypt_generic ($td, base64_decode($eid)); $len = strtok($id,'-'); $id = substr($id,(strlen($len)+1),$len); mcrypt_generic_deinit($td); return $id; } } ?> Usage encode($word); echo "encrypted = $encrypted "; $decrypted = $e->decode($encrypted); echo "decrypted = $decrypted "; if($word == $decrypted){ echo "They match "; } else{ echo "Oops they don't match "; } ?> -- Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Glaring problem with libmcrypt!!!
yea - I'm having the exact same problem - trying to use that nice little piece of encrypt /decript stuff that was posted earlier "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! I ran through the phpinfo and here's the result. That's explain why > I'm unable to get most of the mcrypt functions to work. Features like > "mcrypt_module_open", "mcrypt_list_algorithms", "mcrypt_get_block_size", > etc. So, what's the problem here? PHP bugs? Please spill your gut out on > this one if you know of one. Thansk! > > --clip-- > > mcrypt > > -- > | mcrypt support| enabled | > -- > | Version | 2.4.x | > | Supported Ciphers | none | > | Supported Modes | none | > -- > > - > | Directive | Local Value | Master Value | > - > | mcrypt.algorithms_dir | no value | no value | > | mcrypt.modes_dir | no value | no value | > - > > --clip-- > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] counting number of records in a MySQL table; how do I get the result?
so why not take that resulting row, and then do an if on it to see if the value is a zero? an extra step, but it would work "John W. Holmes" <[EMAIL PROTECTED]> wrote in message 002c01c26a66$61f0e1a0$7c02a8c0@coconut">news:002c01c26a66$61f0e1a0$7c02a8c0@coconut... > > $result = mysql_query(); > > if (mysql_num_rows($result) > $x) > > -Kevin > > This won't work because a SELECT COUNT(*) query always returns a row, > even if it returns zero as the value. > > $result = mysql_query("SELECT COUNT(*) FROM ... "); > $count = mysql_result($result,0); > > ---John Holmes... > > > - Original Message - > > From: "DonPro" <[EMAIL PROTECTED]> > > To: "php list" <[EMAIL PROTECTED]> > > Sent: Wednesday, October 02, 2002 2:35 PM > > Subject: [PHP] counting number of records in a MySQL table; how do I > get > > the > > result? > > > > > > > Hi, > > > > > > I need to do either an insert or update into a MySQL table. Insert > if > > there > > > are 0 records or update if one record exist: > > > > > > This is my code snippet: > > > > > > if (mysql_query("SELECT COUNT(*) FROM AuthNum") == 0) { > > >mysql_query("INSERT into AuthNum (FirstNum, LastNum, NextNum) > VALUES > > > (1,2,3)",$dblink); > > > } else { > > >mysql_query("Update AuthNum Set FirstNum = 1, LastNum = 2, > NextNum = > > > 3",$dbLink); > > > } > > > > > > My problem is, a record never gets inserted because the SELECT COUNT > > query > > > is returning a resource ID of 2. How can I get the actual number of > > records > > > in the table? > > > > > > Thanks, > > > Don > > > > > > > > > > > > -- > > > 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
Re: [PHP] Re: inputbox?
thanks - I will have to look through things... you explanation made sense, and I believe I can get it to work that way. I think I'm going to try Tom's Java script first, and use this is a fail safe. Jeff "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > phpMyAdmin(.org) is a GUI web interface for managing MySQL databases. it's > open source, so if you like what you see, you can dig around in the code and > "borrow"... they pop-up confirmations on delete and empty type queries. > > as for a simple confirmation script... I don't really have the time right > now but think of it this way... > > - fill in form, POST to a confirmation form > - confirmation form echos what's about to happen back out onto the screen > - confirmation form has many hidden inputs which carry the values > - click yes, form submitted to a process page, containing the values > submitted > > In other words, you have to pass the original form contents THROUGH an > intermediate page which says "are you sure?". > > > Justin > > > > > > > on 02/10/02 12:25 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > > > Justin... > > > > could I talk you into giving me an example in code of this? (I would really > > appreciate it) > > > > where is this phpmyadmin? I'm not seeing a function, and I searched php's > > website for this string, and I'm not finding anything. > > > > Jeff > > > > "Justin French" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >> Confirmation is easy -- the client has the right to ask for this > > component. > >> It's the method in which you want to confirm (javascript, pop-ups, etc) > > that > >> is the problem. > >> > >> It can be as simple as: > >> > >> submit form > >> page asking are you sure you want to blah blah blah > >> submit yes or no > >> action taken > >> > >> No javascript needed -- all php & html. > >> > >> > >> You might want to also take a look at phpMyAdmin, which has javascript > > alert > >> style "are you sure you want to .." ok|cancel > >> > >> > >> Justin > >> > >> > >> > >> on 02/10/02 12:11 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > >> > >>> LOL - I've been using VB for about 6 years, and I'm just beginning to > >>> convert over to php. > >>> > >>> the application I am writing is for prepaid phone cards. if they are > > going > >>> to activate a pin, inactivate, or recharge then I want a confirmation > > box. > >>> > >>> I would prefer to also have a box pop up to get the value they want to > >>> recharge instead of having an input text box on the form. for some > > reason > >>> people seem to over look the text box, and they tend to leave it empty > > vs. > >>> displaying a dialog box that asks for the amount they would like to > >>> recharge. > >>> > >>> I need to go back to my customers, and find out how important a > > confirmation > >>> box is. I had skimmed through the php functions, but didn't see > > anything > >>> that looked what I was looking for. > >>> > >>> > >>> "Brad Bonkoski" <[EMAIL PROTECTED]> wrote in message > >>> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >>>> pop-up windows, reminds me of the days of visual basic programming > >>>> > >>>> I know you can display dialog boxes using javascript, but not sure if > > they > >>> will > >>>> take a value in them, just like a confimirmation type box, like "Are > > you > >>> sure? > >>>> " > >>>> > >>>> To the point, check some javascript references out, I know there are > > code > >>>> repositories sitting out there in cyber-space that will have at least > >>> something > >>>> to start off of. > >>>> -Brad > >>>> > >>>> Justin French wrote: > >>>> > >>>>> I don't understand. Twice. > >>>>> > >>>>> Tell us what you need, slowly and clearly. > >>>>> > >>>>> Justin French > >
[PHP] Re: The latest PHP version??? NOT Ver7.2??
4.2.3 > thanks. > > Can you email me??? > > _ > Do You Yahoo!? > "·¢¶ÌÐÅÓ®ÊÖ»ú,¿ìÀ´²Î¼ÓÑÅ»¢¾ÞÐÇÐã!" > http://cn.ent.yahoo.com/star/midautumn/index.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: inputbox?
Justin... could I talk you into giving me an example in code of this? (I would really appreciate it) where is this phpmyadmin? I'm not seeing a function, and I searched php's website for this string, and I'm not finding anything. Jeff "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Confirmation is easy -- the client has the right to ask for this component. > It's the method in which you want to confirm (javascript, pop-ups, etc) that > is the problem. > > It can be as simple as: > > submit form > page asking are you sure you want to blah blah blah > submit yes or no > action taken > > No javascript needed -- all php & html. > > > You might want to also take a look at phpMyAdmin, which has javascript alert > style "are you sure you want to .." ok|cancel > > > Justin > > > > on 02/10/02 12:11 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > > > LOL - I've been using VB for about 6 years, and I'm just beginning to > > convert over to php. > > > > the application I am writing is for prepaid phone cards. if they are going > > to activate a pin, inactivate, or recharge then I want a confirmation box. > > > > I would prefer to also have a box pop up to get the value they want to > > recharge instead of having an input text box on the form. for some reason > > people seem to over look the text box, and they tend to leave it empty vs. > > displaying a dialog box that asks for the amount they would like to > > recharge. > > > > I need to go back to my customers, and find out how important a confirmation > > box is. I had skimmed through the php functions, but didn't see anything > > that looked what I was looking for. > > > > > > "Brad Bonkoski" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >> pop-up windows, reminds me of the days of visual basic programming > >> > >> I know you can display dialog boxes using javascript, but not sure if they > > will > >> take a value in them, just like a confimirmation type box, like "Are you > > sure? > >> " > >> > >> To the point, check some javascript references out, I know there are code > >> repositories sitting out there in cyber-space that will have at least > > something > >> to start off of. > >> -Brad > >> > >> Justin French wrote: > >> > >>> I don't understand. Twice. > >>> > >>> Tell us what you need, slowly and clearly. > >>> > >>> Justin French > >>> > >>> on 02/10/02 10:35 AM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > >>> > >>>> anybody??? > >>>> > >>>> anyway to pop up an inputbox that will get a variable? also, and yes > > / no > >>>> or ok / cancel boxes I can make pop up? > >>>> > >>>> > >>>> "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message > >>>> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >>>>> is there a way to for an input box to come up looking for a value? I > > know > >>>>> there are a few ways I could resolve my current issue, but I would > > prefer > >>>> to > >>>>> display an inputbox, and use that value in my query. > >>>>> > >>>>> basically I would do a $HTTP_SERVER_VARS['PHP_SELF'] as the action of > > a > >>>>> form, but then I would have to get a value to pass to the query. > > this > >>>> would > >>>>> be for prepaid phone cards. if somebody selected to recharge then I > > would > >>>>> like an input box to be displayed asking the amount they would like > > to > >>>>> recharge. > >>>>> > >>>>> -- > >>>>> Jeff Bluemel > >>>>> > >>>>> > >>>> > >>>> > >>> > >>> -- > >>> 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: Re[2]: [PHP] inputbox?
OK Tom - that script worked beautiful. there are a few different applications that I need this for, and I'm wondering if you can either help me with the coding, or refer me to a webpage that can get me started in the right direction. I need to collect a value that will be used in a query. (assuming this is pretty easy - just use the value listed in post for this form) I also need an OK / Cancel option that I can use a die with if the cancel, or proceed if they select OK. when I use this java script does this reload the page, and go back to the top, or does it simply set the $_POST value? Jeff "Tom Rogers" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Wednesday, October 2, 2002, 11:52:34 AM, you wrote: > TR> Hi, > > TR> Tuesday, October 1, 2002, 1:36:43 PM, you wrote: > JB>> is there a way to for an input box to come up looking for a value? I know > JB>> there are a few ways I could resolve my current issue, but I would prefer to > JB>> display an inputbox, and use that value in my query. > > JB>> basically I would do a $HTTP_SERVER_VARS['PHP_SELF'] as the action of a > JB>> form, but then I would have to get a value to pass to the query. this would > JB>> be for prepaid phone cards. if somebody selected to recharge then I would > JB>> like an input box to be displayed asking the amount they would like to > JB>> recharge. > > JB>> -- > JB>> Jeff Bluemel > > TR> You need something like this: > > TR> > TR> > TR> function ask(){ > TR> if(document.form1.Message.value = prompt('Name','')) > TR> form1.submit(); > TR> } > TR> > TR> > TR> > TR> > TR> > TR> > TR> > > TR> -- > TR> regards, > TR> Tom > > One too many heads...revised code: > > > > function ask(){ > if(document.form1.Message.value = prompt('Name','')) > form1.submit(); > } > > > > > > > > -- > regards, > Tom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] inputbox?
Tom, I am going to work with this command, and see if I can get it to work. Thanks, Jeff "Tom Rogers" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Wednesday, October 2, 2002, 11:52:34 AM, you wrote: > TR> Hi, > > TR> Tuesday, October 1, 2002, 1:36:43 PM, you wrote: > JB>> is there a way to for an input box to come up looking for a value? I know > JB>> there are a few ways I could resolve my current issue, but I would prefer to > JB>> display an inputbox, and use that value in my query. > > JB>> basically I would do a $HTTP_SERVER_VARS['PHP_SELF'] as the action of a > JB>> form, but then I would have to get a value to pass to the query. this would > JB>> be for prepaid phone cards. if somebody selected to recharge then I would > JB>> like an input box to be displayed asking the amount they would like to > JB>> recharge. > > JB>> -- > JB>> Jeff Bluemel > > TR> You need something like this: > > TR> > TR> > TR> function ask(){ > TR> if(document.form1.Message.value = prompt('Name','')) > TR> form1.submit(); > TR> } > TR> > TR> > TR> > TR> > TR> > TR> > TR> > > TR> -- > TR> regards, > TR> Tom > > One too many heads...revised code: > > > > function ask(){ > if(document.form1.Message.value = prompt('Name','')) > form1.submit(); > } > > > > > > > > -- > regards, > Tom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: inputbox?
LOL - I've been using VB for about 6 years, and I'm just beginning to convert over to php. the application I am writing is for prepaid phone cards. if they are going to activate a pin, inactivate, or recharge then I want a confirmation box. I would prefer to also have a box pop up to get the value they want to recharge instead of having an input text box on the form. for some reason people seem to over look the text box, and they tend to leave it empty vs. displaying a dialog box that asks for the amount they would like to recharge. I need to go back to my customers, and find out how important a confirmation box is. I had skimmed through the php functions, but didn't see anything that looked what I was looking for. "Brad Bonkoski" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > pop-up windows, reminds me of the days of visual basic programming > > I know you can display dialog boxes using javascript, but not sure if they will > take a value in them, just like a confimirmation type box, like "Are you sure? > " > > To the point, check some javascript references out, I know there are code > repositories sitting out there in cyber-space that will have at least something > to start off of. > -Brad > > Justin French wrote: > > > I don't understand. Twice. > > > > Tell us what you need, slowly and clearly. > > > > Justin French > > > > on 02/10/02 10:35 AM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > > > > > anybody??? > > > > > > anyway to pop up an inputbox that will get a variable? also, and yes / no > > > or ok / cancel boxes I can make pop up? > > > > > > > > > "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > >> is there a way to for an input box to come up looking for a value? I know > > >> there are a few ways I could resolve my current issue, but I would prefer > > > to > > >> display an inputbox, and use that value in my query. > > >> > > >> basically I would do a $HTTP_SERVER_VARS['PHP_SELF'] as the action of a > > >> form, but then I would have to get a value to pass to the query. this > > > would > > >> be for prepaid phone cards. if somebody selected to recharge then I would > > >> like an input box to be displayed asking the amount they would like to > > >> recharge. > > >> > > >> -- > > >> Jeff Bluemel > > >> > > >> > > > > > > > > > > -- > > 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: inputbox?
anybody??? anyway to pop up an inputbox that will get a variable? also, and yes / no or ok / cancel boxes I can make pop up? "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > is there a way to for an input box to come up looking for a value? I know > there are a few ways I could resolve my current issue, but I would prefer to > display an inputbox, and use that value in my query. > > basically I would do a $HTTP_SERVER_VARS['PHP_SELF'] as the action of a > form, but then I would have to get a value to pass to the query. this would > be for prepaid phone cards. if somebody selected to recharge then I would > like an input box to be displayed asking the amount they would like to > recharge. > > -- > Jeff Bluemel > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] inputbox?
is there a way to for an input box to come up looking for a value? I know there are a few ways I could resolve my current issue, but I would prefer to display an inputbox, and use that value in my query. basically I would do a $HTTP_SERVER_VARS['PHP_SELF'] as the action of a form, but then I would have to get a value to pass to the query. this would be for prepaid phone cards. if somebody selected to recharge then I would like an input box to be displayed asking the amount they would like to recharge. -- Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] syntax question
let me be more specific... if a field value is null how do I test for it in the result set, or the array? here's a real live example... I'm working with prepaid phone cards, and if a card has not expired yet then the field zombie_date will be null. so - when I do the mysql_fetch_assoc ($sql) what value will the field contain if the resulting recordset was a null? instead of leaving that table space blank I would like to populate it with "Not Expired" or something like that. (I have a lot of scenario's where I would like to use that). "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Justin French wrote: > > >on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > > > > > >>how to I test for a null value? > >> > >> > >empty()? isset()? if($var == "")? if($var == "NULL")?? have a look in > >the php manual for string functions, and comparison operators > > > > I think he maybe meant testing for null values in SQL. > > If this is true, there is the null keyword: "is null" and "is not null". > > select * from table_name where column_name is not null > > This selects all rows from a table where the data in column column_name > is not null. Be careful with this, as it actually tests for null and not > an empty string, for example. If you want to test whether a value is > null once you have assigned it to a PHP variable, you can use one of > Justin's suggestions. > > In addition, PHP has null as well. > > Happy hacking. > > Chris > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] syntax question
> mysql_field_name() might help... but generally I know what fields I want to > grab, so I don't need this... I found this answer on http://php.net/mysql. > just as you could :) I've been coding in other languages for about 6 years now, and I have looked through a lot of the mysql stuff, and the explanations just don't make sense for me (or the examples, I can make them work, but don't understand why they work). it seems there are just basic's of the language they expect that you understand. piece by piece I'm getting it, but I'm not happy just copying code, and seeing something work. I've got to know why something worked, and feel like I understand more of the in's and out's. I think the howto's skip over a lot of things that have me confused. it seems like a lot of this stuff deals more with array's, and that's something I never learned to handle in other languages. this may be part of my problem... as far as using the select queries, that's an option most times, but there are some situations where there are too many calls to the database, and the code isn't efficient. here's a sample of things I made work, but don't understand... Date ANI DNIS Country Destination Pay Phone Cost Minutes no - obviously here I understand what fields I'm getting out of the database, but I'd prefer to use a syntax that would print the field names in the top column of the table, and make my code more transportable. with the stuff I'm doing this would be a great help. \n"; foreach ($row as $column) { echo "$column\n"; } echo "\n"; } echo ""; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] syntax question
couple of questions... I'm am learning php & mysql without any books (will also be using postgres, and informix, but assuming most of these are about the same other then sql syntax), and through internet resources. there are a lot of good step throughs on a lot of stuff, but there are some things I'm having a hard time finding how to's on... for instance - if there a command that will give me the name of the fields in the result set? how to I test for a null value? how do I go from one row to the next, or how do I filter a result set based on a value in a column? is there a way to sum a specific field? would appreciate whatever help I can get, and even better if somebody know's a step through that goes through all the basic's of database syntaxes in php. -- Thanks, Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: length function
thanks Edwin... I had looked through the function list, but couldn't find the command... Jeff "@ Edwin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Why, can't you just use strlen()? > > http://www.php.net/manual/en/function.strlen.php > > Or, am I missing something? > > - E > > "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I am looking for a function that will give me the number of characters of > a > > string, or number. I tried using the function length, but that function > > seems to deal with arrays, and doesn't seem to function like I am > intending > > it to. > > > > -- > > > > Thanks, > > > > Jeff Bluemel > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session & cookies
Chris and I have been working on this through private emails, and we (I mean he) finally figured out what the problem was... session.cookie_path was set to /tmp instead of /. I wanted to thank him for taking the time to help me work through this... Jeff "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jeff, > > One quick thought ... > > Is your cookie domain the same domain as the URL domain you are using to > test this? If not, the browser will not send the cookie, so that is a > potential reason for this behavior. > > If the domain is the same, I see no reason why this shouldn't work, but > I have two ideas you can try. > > 1. Rather than using the name of the cookie, try this on the receiving page: > > > print_r($_COOKIE); > ?> > > > This should dump the entire array to the screen and would reveal any > naming problems. > > 2. View the HTTP transactions themselves to make sure the proper > Set-Cookie and Cookie headers are being used. There are several > utilities that can help do this, and I recently wrote one in PHP (it's a > quick hack though) you can get at http://protoscope.org/. The messages > of interest are the original HTTP response from your Web server (which > should contain the Set-Cookie header) and any future HTTP request (which > should contain the Cookie header). This is the most reliable way to > really analyze these types of problems. > > Hopefully these ideas will help uncover something. > > Chris > > Jeff Bluemel wrote: > > >ok - no cookie exists... I have Netscape set to accept all cookies. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] length function
I am looking for a function that will give me the number of characters of a string, or number. I tried using the function length, but that function seems to deal with arrays, and doesn't seem to function like I am intending it to. -- Thanks, Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] java script & session?
ok - I am calling these java script files, but I am calling them from a .phtml file. when the following like from the java script file is called, addMainItem("home.phtml","Home",120,"center",""); it does not pass the session ID number to the home.phtml "John Holmes" <[EMAIL PROTECTED]> wrote in message 001601c2644f$f4e49410$b402a8c0@mango">news:001601c2644f$f4e49410$b402a8c0@mango... > You aren't opening any PHP files, you are opening javascript files. Do > you want the session info passed to the .js files? Is .js parsed as PHP > on your server? Do you lose the session in your .phtml page after you > call the given javascript? What is your question? > > ---John Holmes... > > > -Original Message- > > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, September 25, 2002 12:50 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] java script & session? > > > > what do you think the SESSIONS are??? possibly php session info ? ;) > > > > > > "John Holmes" <[EMAIL PROTECTED]> wrote in message > > 001401c2644d$8fb8d670$b402a8c0@mango">news:001401c2644d$8fb8d670$b402a8c0@mango... > > > And there is any reference to PHP in your question where > > > > > > > -Original Message- > > > > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] > > > > Sent: Wednesday, September 25, 2002 12:34 AM > > > > To: [EMAIL PROTECTED] > > > > Subject: [PHP] java script & session? > > > > > > > > I want drop down menu's in my setup that I am creating. however, > > > when > > > > the > > > > java script opens the links then the session information is not > > > passed. > > > > here's how the stuff is used in my .phtml files. > > > > > > > > > > > > > > > > > > > src="resources/custom_original.js"> > > > > addMainItem("home.phtml","Home",120,"center",""); > > > > src="resources/style.js"> > > > > > > > > > > > > -- > > > > > > > > Thanks, > > > > > > > > Jeff Bluemel > > > > > > > > > > > > > > > > -- > > > > 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
Re: [PHP] java script & session?
what do you think the SESSIONS are??? possibly php session info ? ;) "John Holmes" <[EMAIL PROTECTED]> wrote in message 001401c2644d$8fb8d670$b402a8c0@mango">news:001401c2644d$8fb8d670$b402a8c0@mango... > And there is any reference to PHP in your question where > > > -Original Message- > > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, September 25, 2002 12:34 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] java script & session? > > > > I want drop down menu's in my setup that I am creating. however, > when > > the > > java script opens the links then the session information is not > passed. > > here's how the stuff is used in my .phtml files. > > > > > > > > > src="resources/custom_original.js"> > > addMainItem("home.phtml","Home",120,"center",""); > > > > > > > > -- > > > > Thanks, > > > > Jeff Bluemel > > > > > > > > -- > > 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] java script & session?
I want drop down menu's in my setup that I am creating. however, when the java script opens the links then the session information is not passed. here's how the stuff is used in my .phtml files. addMainItem("home.phtml","Home",120,"center",""); -- Thanks, Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session & cookies
I put this block of code in, and all of the array's they should send back are 100% blank. I will try the protoscope to see what I can turn up on this. "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jeff, > > One quick thought ... > > Is your cookie domain the same domain as the URL domain you are using to > test this? If not, the browser will not send the cookie, so that is a > potential reason for this behavior. > > If the domain is the same, I see no reason why this shouldn't work, but > I have two ideas you can try. > > 1. Rather than using the name of the cookie, try this on the receiving page: > > > print_r($_COOKIE); > ?> > > > This should dump the entire array to the screen and would reveal any > naming problems. > > 2. View the HTTP transactions themselves to make sure the proper > Set-Cookie and Cookie headers are being used. There are several > utilities that can help do this, and I recently wrote one in PHP (it's a > quick hack though) you can get at http://protoscope.org/. The messages > of interest are the original HTTP response from your Web server (which > should contain the Set-Cookie header) and any future HTTP request (which > should contain the Cookie header). This is the most reliable way to > really analyze these types of problems. > > Hopefully these ideas will help uncover something. > > Chris > > Jeff Bluemel wrote: > > >ok - no cookie exists... I have Netscape set to accept all cookies. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session & cookies
ok - no cookie exists... I have Netscape set to accept all cookies. I'm wondering if it is in my link, or if it is a configuration error somewhere. here is a copy of the session options from my php.ini (as copied from Zend Server Center) Session data handler files Session save path/tmp Use cookies to store session ID On Session name DomIntCom Session auto start Off Cookie lifetime0 Cookie path /tmp Cookie domain xxx.xxx.xxx Session handler for serializing data php Garbage collection probability 1 Maximum lifetime of data 1440 HTTP referrer check Empty Session entropy length 0 Session entropy file /dev/urandom Session cache control method nocache Session cache expiration 180 Session use transient sid transport On "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jeff, > > My apologies then. Somehow your response never arrived. It is still best > to always "reply all" for things like this. You get the benefit of > hearing several people's perspectives, and you also potentially help > others who have the same question now or who may have it in the future > (and check the list archives). > > Anyway, back to your problem ... > > Jeff Bluemel wrote: > > >what I mean by this is it was my understanding when reading the sessions > >doc's that there was a way to for the system to use a stored system ID > >stored in an SID, but the information wouldn't be sent to the browser, but > >be stored in a cookie. > > > > Cookies are stored on the client, so they are also sent to the browser. > > Basically, the unique identifier (e.g., PHPSESSID) must be provided by > the Web client in order for it to be associated with previous requests. > The two most common methods of this are for it to send this information > in a cookie (there is a Cookie header in the HTTP request) or as part of > the query string in a URL (such as > http://www.example.org/index.php?PHPSESSID=123456789) that it is requesting. > > >>With use_trans_sid set, PHP is going to append the session ID to the URL > >>of links, etc., on: > >> > >> > >I tried setting the user_trans_sid = 0, but it still will not use a cookie. > >it doesn't appear to change anything when I play with these settings. > > > > Right. I was explaining (poorly looking back) what the use_trans_sid > does. Basically, the idea is that the developer doesn't have to worry > about how the unique identifier is passed back. This is the "easiest" > way to use session management, because it is transparent for the most > part. PHP will try both cookie and URL methods to maintain the unique > identifier, and it will use only a cookie once it can determine that the > client supports them. > > You are having a problem, it sounds like, with the Web client *not* > sending back the cookie in subsequent requests. Thus, use_trans_sid will > append the unique identifier to the URL every time, as it believes the > client to not be supporting cookies (which might just be your problem). > When you combine this with use_only_cookies (sp?), you are basically > telling PHP to ignore the unique identifier if it is sent on the URL. > Thus, it is not receiving the cookie, and it is being instructed to not > use the URL variable. It has no way to identify the client and maintain > state. > > Your problem boils down to one thing: the cookie is not getting passed > back. Focus on this initially. Make sure your Web browser is accepting > the cookie (you can configure most browsers to warn you before accepting > a cookie, so that you can be certain it is being set), and try to make > sure your PHP script is receiving the cookie like it thinks it should > be. For example, if the cookie is named PHPSESSID, try this: > > echo "cookie is [" . $_COOKIE["PHPSESSID"] . "]"; > ?> > > If ths cookie is blank (e.g., "cookie is []"), you have identified your > problem. Hopefully this will help you solve it. > > Happy hacking. > > Chris > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] return the amount of records in a mysql databace
this is only going to return records in a table, and not in a database > select count(*) as n from ... where ... > > -Original Message- > From: Philip J. Newman [mailto:[EMAIL PROTECTED]] > > Can someone point me in the right direction to find out how i can return the > amount of records in a mysql databace ? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Editor
I am using Zend Studio, and I absolutely love it. this isn't just an editor, but a project manager, and has debugging options where it loads the file in your default browser, and then allows you to do step through, add watches etc. http://zend.com/store/products/zend-studio.php "Bryan McLemore" <[EMAIL PROTECTED]> wrote in message 004901c26170$fc6fc510$0101a8c0@fwcmain">news:004901c26170$fc6fc510$0101a8c0@fwcmain... Hi guys, just wondering if anyone could recomend a good editor that is based on windows. Thanks, Bryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] accessing session variables
I'm assuming there has got to be a better answer then this, but I found I had the same problem is I was using headers to go to the next page, but when I used the html tags then everything was fine (the SID wasn't getting passed). "Murat Ö." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i have written > > ini_set("session.name", "SID"); > > before, in page1.php. and i've added it on page2.php before session_start > and it works. > > thanks.. > > > > "Murat Ö." <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > i tried but it didn't work. > > i wrote in page2.php: > > > > > session_start(); > > echo $_SESSION['isim']; > > ?> > > > > and i was noticed: "Undefined index: isim in ." > > > > but i have written $_SESSION['isim']='murat' in page1.php > > > > > > > > "Sascha Cunz" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Just use the session_start() in the second page and they will be magically > > there where you've put them in the first page. > > > > Sascha > > > > Am Samstag, 21. September 2002 17:01 schrieb Murat Ö.: > > > hi, > > > > > > page1.php creates a session and its variables in it in successfully. > the > > > variables and values are created like > > > $_SESSION['x']='abc' > > > > > > page1.php sends the SID information to page2.php via GET method. how > can > > i > > > access the those variables with SID information in page2.php? > > > > > > thanks > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: session & cookies
I responded to this in a private email to you, and not on the forum... I did respond. I will post here again so there is no question; >I want to force it to use a cookie that points to a transparent SID on >my system. what I mean by this is it was my understanding when reading the sessions doc's that there was a way to for the system to use a stored system ID stored in an SID, but the information wouldn't be sent to the browser, but be stored in a cookie. >With use_trans_sid set, PHP is going to append the session ID to the URL >of links, etc., on: I tried setting the user_trans_sid = 0, but it still will not use a cookie. it doesn't appear to change anything when I play with these settings. "Chris Shiflett" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You've already posted this, and you never answered the questions that > were asked. Thus, your question is every bit as unclear as the previous > time. > > Perhaps if you put forth a little effort, we might also. > > Just a helpful suggestion, > > Chris > > Jeff Bluemel wrote: > > >still looking for some solutions on this - anybody else have any > >suggestions? > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: session & cookies
still looking for some solutions on this - anybody else have any suggestions? "Jeff Bluemel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > OK guys... > > here's my question - I'm using 4.2.3 and apache 1.3.26, and I've got > sessions setup. however, it seems to be using an SID attached to the URL, > and I want to force it to use a cookie that points to a transparent SID on > my system. > > I've got the following options in my php.ini, but the system doesn't seem to > ever use a cookie, and the sessions don't die. (that's my biggest concern > is that the user has to login to the system EVERY time he visits the site.) > > session.use_cookies = 1 > session.use_only_cookies = 1 > session.use_trans_sid = 1 > > > > > > -- > > Thanks, > > Jeff Bluemel > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is php even right for this design?
I don't know if this is possible, but in VB (I'd like to find something similar in php) I would open a record set, and then filter / unfilter it for similar issues (in a loop). I'm assuming you could use a similar approach somehow in php. "Robert Cummings" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Beau Hartshorne wrote: > > > > > The admin users will need to run long processes that take about > > > 5-15 minutes each. They cannot timeout and they must be done > > throughout the day > > > while general users are working in the application as well. Is > > > there a big problem with this? What steps should I take to ensure > > > these long processes complete and do not timeout. > > > > What about turning these long processes into perl scripts or C programs > > that can be exec()ed? They'll probably run faster, and they won't time > > out. > > > > I've never done this myself. It's just a suggestion -- does it make > > sense to do it this way? > > Best would be a PHP extension since it wouldn't need to be constantly reloaded :) > > Cheers, > Rob. > -- > .-. > | Robert Cummings | > :-`. > | Webdeployer - Chief PHP and Java Programmer | > :--: > | Mail : mailto:[EMAIL PROTECTED] | > | Phone : (613) 731-4046 x.109 | > :--: > | Website : http://www.webmotion.com | > | Fax : (613) 260-9545 | > `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions
I've had the same problem, and I resolved it by using html tags instead of headers, and the problem was resolved. there are some issues I still haven't been able to work out though (I want it to use cookies instead of SID's). "John Holmes" <[EMAIL PROTECTED]> wrote in message 001b01c260a7$cc6744c0$b402a8c0@mango">news:001b01c260a7$cc6744c0$b402a8c0@mango... > You have session_start() on the second page, too, right?? > > > -Original Message- > > From: Erwin [mailto:[EMAIL PROTECTED]] > > Sent: Friday, September 20, 2002 5:45 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Sessions > > > > Hi all, > > > > I'm having a problem with sessions. I use PHP version 4.2.2. > > The project I'm working on, only uses the global variables, $_GET, > $_POST > > and $_SESSION. > > > > When I store something in the $_SESSION variable, everything goes > well. I > > can print the contents of this array with print_r, and every variable > I > > stored is there. But when I leave the page with the header(...) > directive > > (or any other way), the session is empty! > > > > The session file contains no data (so it is created!), the $_SESSION > > variable is empty... > > > > Some extra information: > > - I've tried this on PHP 4.1.2, and that works OK > > - I've tried output_buffering (on and off) > > - I've tried registered_globals (on and off) > > - I've tried using "session_write_close()" before leaving the page > > - I've checked the "session_start()" statement (Yes, it's there :-) ) > > > > I hope someone can help me with this... > > > > Thanks in advance, > > > > Erwin > > > > > > -- > > 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 & cookies
> Jeff Bluemel wrote: > > >I want to force it to use a cookie that points to a transparent SID on > >my system. > > > > Can you elaborate on this? I have no idea what you mean. for some reason when I was reading the documentation on sessions on php.net I thought it stated that it was possible to have a cookie point at a transaprent ID. I guess one of my biggest concerns is security. I don't want somebody to be able to open a session with an ID, and I want them to login everytime. this all happens behind ssl too. I check my browser cookies, and I never see a cookieis, and my pages always pass a session ID number with them. what is the best, secure way, to have sessions ID's that the browser never see's? > >I've got the following options in my php.ini, but the system doesn't seem to > >ever use a cookie, and the sessions don't die. (that's my biggest concern > >is that the user has to login to the system EVERY time he visits the site.) > > > >session.use_cookies = 1 > >session.use_only_cookies = 1 > >session.use_trans_sid = 1 > > > > With use_trans_sid set, PHP is going to append the session ID to the URL > of links, etc., on: > > 1) The client's first visit, determined by the fact that the client sent > no session ID > 2) Any other visit where the client sent a session ID on the URL but not > in a cookie I set session.use_trans_sid = 0, but I still see the SID in the URL passing from session to session. > It sounds to me like either you're only noticing the first case there, > or your browser is not supplying the cookie on subsequent requests. > Maybe this bit of information will help you. > > Happy hacking. > > Chris > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session & cookies
OK guys... here's my question - I'm using 4.2.3 and apache 1.3.26, and I've got sessions setup. however, it seems to be using an SID attached to the URL, and I want to force it to use a cookie that points to a transparent SID on my system. I've got the following options in my php.ini, but the system doesn't seem to ever use a cookie, and the sessions don't die. (that's my biggest concern is that the user has to login to the system EVERY time he visits the site.) session.use_cookies = 1 session.use_only_cookies = 1 session.use_trans_sid = 1 -- Thanks, Jeff Bluemel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php