[PHP] Include() problems
I just ran into a somewhat strange problem with an include failing. I have the following in my script: include(dirname(__FILE__)."/LNScreens/LNScrMain.php"); include(dirname(__FILE__)."/LNDataBase/LNDataBase.php"); The first file is included just fine, but the LNDataBase file fails (Failed opening for inclusion). My directory structure is: /LNDataBase LNDataBase.php /LNScreens LNScrMain.php index.php The file exists and it seems to be the exact same syntax as what I used to include the other file. What else could possibly be wrong? Thanks for any help, Leo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: PHP-based SMS solution
On Wed, 12 Feb 2003, YC Nyon wrote: > I am developing a web-based GPS vehicle tracking solution using php. > I'm looking on how php can communicate with a SMSC using Smpp to issue AT > commands. I am not aware of any libraries which allow you to talk SMPP directly to SMSC. Youre probably better of by using a SMSGW such as Kannel between PHP and SMSC. http://www.kannel.org/ -- Mika Tuupola http://www.appelsiini.net/~tuupola/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: crypt()
Hello 'salt' basically is the initialization sequence for the encryption. This makes the function use more random numbers since the salt will be different on different calls. At least it should be So in order for your crypt() to work you have to pass the same salt to both functions. To determine the 'salt' take the first two letters/numbers (this is the defualt but better check the PHP constant CRYPT_SALT_LENGTH for the real length of the salt) of the crypted text and pass them as the salt to the second and they should come out equal... "; $test2=crypt('test', substr($test, 0, 2)); // if CRYPT_SALT_LENGTH is more then two just pass in that number as the // third parameter to substr print $test2. ""; ?> Have fun experimenting around Stefan
Re: [PHP] image creation error
i've recompile my php4.3 in redhat with ./configure --with-mysql --with-apache=../apache_1.3.x --with-gd --with-zlib and i receive this error upon make make: *** Warning: File `libphp4.la' has modification time in the future (2003-0 2-14 16:04:12 > 2003-02-14 15:47:10) make: Nothing to be done for `all'. make: *** Warning: Clock skew detected. Your build may be incomplete. What should be the problem? - Original Message - From: "Kevin Waterson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 14, 2003 3:07 PM Subject: Re: [PHP] image creation error > This one time, at band camp, > "Michael P. Carel" <[EMAIL PROTECTED]> wrote: > > > Hi to all, > > > > Im receiving a Fatal error: Call to undefined function: > > imagecreatefromjpeg() . > > You need to install gd > > in your config line add > > --with-gd > > Kevin > > -- > __ > (_ \ > _) ) > | / / _ ) / _ | / ___) / _ ) > | | ( (/ / ( ( | |( (___ ( (/ / > |_| \) \_||_| \) \) > Kevin Waterson > Port Macquarie, Australia > > -- > 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] image creation error
This one time, at band camp, "Michael P. Carel" <[EMAIL PROTECTED]> wrote: > Hi to all, > > Im receiving a Fatal error: Call to undefined function: > imagecreatefromjpeg() . You need to install gd in your config line add --with-gd Kevin -- __ (_ \ _) ) | / / _ ) / _ | / ___) / _ ) | | ( (/ / ( ( | |( (___ ( (/ / |_| \) \_||_| \) \) Kevin Waterson Port Macquarie, Australia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image creation error
Hi to all, Im receiving a Fatal error: Call to undefined function: imagecreatefromjpeg() . Do i need to recompile PHP? mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Process array after form submission problem
Cheers, Solved the problem exactly how I wanted it. Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 > -Original Message- > From: Matt Schroebel [mailto:[EMAIL PROTECTED]] > Sent: 13. helmikuuta 2003 21:29 > To: Php-General; Steve Jackson > Subject: RE: [PHP] Process array after form submission problem > > > > > > -Original Message- > > From: Steve Jackson [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, February 13, 2003 2:10 PM > > To: Php-General > > Subject: [PHP] Process array after form submission problem > > > > > > Hi, > > > > My problem is that I have a dynamic form with vars which I > > want to process. > > > > The variables are checkbox names with a variable number of > > checkboxes but > > all currently have the same variable name. > > > > ie. > > > > > > "{$array["code"]}"> > type = checkbox name = grant value = "{$array["code"]}"> > > checkbox name = grant value = "{$array["code"]}"> > > > > The array code works fine in that the values reflect what is > > in the DB. > > > > I understand that $grant will be an array? (am I right?) so > > how do I use PHP > > to look at $grant as an array in my processing script rather than an > > ordinary variable? I can get the DB to update if there is > > only one checked > > box but otherwise it updates the DB with the value of the > > last checkbox. > Add [] to the end of the item name like: > > > $grant = $_POST['grant']; > if (is_array($grant)) { > echo 'Items checked:'; > foreach ($grant as $value) { > echo "$value"; > } > } > > -- > 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] upgrading from 4.1.2 to 4.3.0 - can anyone point me to a list ofMUST DO'S
I've heard that there are significant changes made between 4.1.2 and 4.3.0 so I need to know what the effects are going to be on our existing sites running old code. Is there a document that explains the effects of upgrading to 4.3.0 from 4.1.2 along with the steps I need to take to make my sites compatible with whatever PHP's new changes are? I've heard bits and pieces - which may as well be rumours - so I'd like to be able to find something in writing from the php.net site if possible. so far no luck. thanks, brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] encrypt passwords on URL
HI This is a sort-of continuation on my previous question regarding being able to "puch" a file to a client machine using PHP. I have created a login page that connects to the ftp server and then lists the contents of the folder. My original hope was that I could somehow have the user just click on the file he want's to download it, but since the files are not in a webfolder, I couldn't just make links to them... Another scenraio that could work is to simply have the user go to ftp://username:[EMAIL PROTECTED] BUT, that leaves the password on the URL and the data is sensitive. So, my question: Can I encrypt the password with PHP and then generate the link as above but with the encrypted password? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: I need examples of WRITING to XML wth PHP
Hello, On 02/13/2003 10:52 PM, Daevid Vincent wrote: I see tons of examples of how to read in an xml schema and use the variables and such, but how do I then change values and re-save the schema again? Can someone point me at a simple but function form that simply reads a .xml file, populates the form, and allows you to change values in the form and then resave the .xml file again. This seems like it should be so basic, yet I can't find anything... Thanks in advance. If you want to compose and save an XML document, you may want to try this class: http://www.phpclasses.org/xmlwriter -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] programming question
You could make $category_array2 global function getGrandParent($cat_id, $year_model_id, $x) { global $category_array2 ... olinux --- Thomas Moore <[EMAIL PROTECTED]> wrote: > I am trying to return a variable from a recursive > function. If the recursive > function gets called, the nothing is returned. For > example, below I am > trying to get the category_array2 variable returned. > It works if the > recursive function within the IF statement does not > get called, but if it > does, it does not pass back the variable. > > Any help would be greatly appreciated. I am tearing > hair at this point! > -tom > > showMasterCategories($year, $model_id, > $syear_model_id, $keyword, $make_id, > $display_mode, $catid) > { > $category_array2[$i] = getParent($category_id, > $year_model_id, $i, $catid); > } > > > function getGrandParent($cat_id, $year_model_id, $x) > { > // to get highest level category "master category" > $query = "SELECT distinct C2.category_id, > C2.category, CC2.category_id "; > $query .= " FROM CATEGORY C2, CHILD_CATEGORY CC, > CHILD_CATEGORY CC2"; > $query .= " where C2.category_id = CC.category_id > and CC.child_category_id > = $cat_id and CC2.child_category_id = > C2.category_id"; > > //print "$query"; > $result99 = mysql_query($query) > or die("Query failed - $query"); > > list( $ch_category_id, $category, $pcategory_id) = > mysql_fetch_row($result99); > > if ($pcategory_id == 0) { > > print "PARENT=> > $category:$pcategory_id:$year_model_id: $x"; > $category_array2[$x] = > "$category:$ch_category_id:$year_model_id"; > print "just before returning: > $category_array2[$x]"; > return $category_array2[$x]; > $x = $x + 1; > } else { > print "cat-> $category > id->$ch_category_id"; > getGrandParent($ch_category_id, $year_model_id, > $x); > } > //print "$query"; > //$result_set = mysql_num_rows($result); > } > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: Login system using PHP/MySql
What is your question? What errors are you getting? Here's a couple articles that you should read. Both include code that accomplishes what you are after. A Complete, Secure User Login System http://phpbuilder.com/columns/tim2505.php3 Building a Members Area with PHP: Part 1/6 http://www.devarticles.com/art/1/241 (you can find the other 5 parts) olinux --- YC Nyon <[EMAIL PROTECTED]> wrote: > Hi, > > I have looked at many examples session-based of > login/password system to > protect webpages but can't get it to work. Seems > simple but... I have php > and mysql installed in my windows server. > > If any kind soul can point me to a working (easy) > setup of this task, i > would be most grateful. > > Nyon > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system > (http://www.grisoft.com). > Version: 6.0.449 / Virus Database: 251 - Release > Date: 27/01/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] crypt()
On Friday 14 February 2003 03:20, Edward Peloke wrote: > Is there anyway to make crypt() behave like md5() and give the same results > for the same string? All of the passwords for the db I am using had > crpyt() applied to them before they were entered in the db. How do I then > verify that passwords match? The example in the manual shows how to verify the password. > I just did this: > $test=crypt('test'); > print $test. ""; > $test2=crypt('test'); > print $test2. ""; > > and it printed out two completely different strings. I saw in the > functions list it was talking about salt but I am not sure what that means. -- 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 -- /* Bank error in your favor. Collect $200. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD and 4.3
On Friday 14 February 2003 03:09, Joseph Bannon wrote: > > Do you have freetype2 installed? > > No, but I removed the --with-freetype-dir=/usr and it > installed ok. Does this mean I wont be able to create > text on images? Try it. You did configure with --enable-gd-native-ttf ? > Basiclly, I want to configure php so that I can create > images with text on them, like a graphic counter. I > don't care what font is used, so if there is a default > font with GD, that's ok. -- 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 -- /* Even historians fail to learn from history -- they repeat the same mistakes. -- John Gill, "Patterns of Force", stardate 2534.7 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reading File Name
On Friday 14 February 2003 08:40, PR wrote: > Hello all, > > I am fairly new to PHP and I am trying to read files in > the directory (gif files)and based on the names of > the files create links on the page. The words within the file will be > separated with underscores(02_13_2002_This_file_name.gif but I do not > have to use underscores if it is going to make things easier). > I am also trying to sort the names as they are represented as > names/dates combination.. You'll find that using ISO format for date -- MMDD (with underscores/hyphens/whatever between each element if you wish) -- will enable easy sorting by date. > Could anyone help me to jump start this especially with splitting the > name and sorting? Should I read the file names into an array and sort it? > (read first 10 characters [date] split it - put into an array; then > read the rest parse it and place into an array?) Use explode(). And yes, use arrays. -- 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 -- /* You can no more win a war than you can win an earthquake. -- Jeannette Rankin */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Templates
On 13 Feb 2003 at 17:00, Darren Young wrote: > I'm looking around for some options on using templates with PHP. I've > used several Perl solutions in the past, but never tried it in PHP. > Digging on the web yields several options so I'd love some thoughts or > comments. The real driver is that the basic site design could change > over time and I'd like to have the basic HTML in the templates, and the > real logic in the PHP code. Well, it seems every Perl programmer at one point or another wrote their own templating system. I went from my own to HTML::Template to a big fan of Template::Toolkit. The best one imho in PHP is Smarty. I'd rank it up there with Template::Toolkit. Take a look: http://smarty.php.net/ Of course it's very easy to change not only the look and feel but the actual layout and everything else about it. Best thing about not writing your own personal propriertary system is you benefit from the world at at large. I haven't used Smarty in a awhile as I've been mired in a CMS but I just recently had a chance to use it and I see it has been improving. Take a good look at it. Peter "Reality is that which, when you stop believing in it, doesn't go away". -- Philip K. Dick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Login system using PHP/MySql
Hi, I have looked at many examples session-based of login/password system to protect webpages but can't get it to work. Seems simple but... I have php and mysql installed in my windows server. If any kind soul can point me to a working (easy) setup of this task, i would be most grateful. Nyon --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] programming question
I am trying to return a variable from a recursive function. If the recursive function gets called, the nothing is returned. For example, below I am trying to get the category_array2 variable returned. It works if the recursive function within the IF statement does not get called, but if it does, it does not pass back the variable. Any help would be greatly appreciated. I am tearing hair at this point! -tom showMasterCategories($year, $model_id, $syear_model_id, $keyword, $make_id, $display_mode, $catid) { $category_array2[$i] = getParent($category_id, $year_model_id, $i, $catid); } function getGrandParent($cat_id, $year_model_id, $x) { // to get highest level category "master category" $query = "SELECT distinct C2.category_id, C2.category, CC2.category_id "; $query .= " FROM CATEGORY C2, CHILD_CATEGORY CC, CHILD_CATEGORY CC2"; $query .= " where C2.category_id = CC.category_id and CC.child_category_id = $cat_id and CC2.child_category_id = C2.category_id"; //print "$query"; $result99 = mysql_query($query) or die("Query failed - $query"); list( $ch_category_id, $category, $pcategory_id) = mysql_fetch_row($result99); if ($pcategory_id == 0) { print "PARENT=> $category:$pcategory_id:$year_model_id: $x"; $category_array2[$x] = "$category:$ch_category_id:$year_model_id"; print "just before returning: $category_array2[$x]"; return $category_array2[$x]; $x = $x + 1; } else { print "cat-> $category id->$ch_category_id"; getGrandParent($ch_category_id, $year_model_id, $x); } //print "$query"; //$result_set = mysql_num_rows($result); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I need examples of WRITING to XML wth PHP
I see tons of examples of how to read in an xml schema and use the variables and such, but how do I then change values and re-save the schema again? Can someone point me at a simple but function form that simply reads a .xml file, populates the form, and allows you to change values in the form and then resave the .xml file again. This seems like it should be so basic, yet I can't find anything... Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Reading File Name
Hello all, I am fairly new to PHP and I am trying to read files in the directory (gif files)and based on the names of the files create links on the page. The words within the file will be separated with underscores(02_13_2002_This_file_name.gif but I do not have to use underscores if it is going to make things easier). I am also trying to sort the names as they are represented as names/dates combination.. Could anyone help me to jump start this especially with splitting the name and sorting? Should I read the file names into an array and sort it? (read first 10 characters [date] split it - put into an array; then read the rest parse it and place into an array?) Here is what I have so far (basically reading files in a directory - not tested yet): ".$file.""; } } ?> -- Best regards, Paul mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sorting multidimensional arrays
On Thu, 13 Feb 2003, Sean Brown wrote: > Let's say I've got an array like so: > > $myarray[0]["firstname"] = "Mickey"; > $myarray[0]["lastname"] = "Mouse"; > $myarray[0]["score"] = 20; > > $myarray[1]["firstname"] = "Donald"; > $myarray[1]["lastname"] = "Duck"; > $myarray[1]["score"] = 10; > > I'd like be able to sort the array using different dimensions before I > cycle through a while loop to print out the results. For instance, by > lastname, or by score. I can't seem to get array_multisort() to do it. array_multisort() isn't what you want. > Any ideas? I've seen this question too many times go through here w/ lots of links, and no code ... so here ya go. (And I think someone else asked a similar question today too ... you too, listen up ;) You can use the usort() function to your advantage. This is how: Obviously, you could sort by the other keys by changing the value of $sortKey, in the code above, or sort in reverse order by flipping the inequality comparison operator in myCompare(). http://www.php.net/manual/en/function.usort.php ... for all your usort() goodness. g.luck, ~Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Templates
on 14/02/03 10:20 AM, Darren Young ([EMAIL PROTECTED]) wrote: > That's pretty much what I'm doing today, header page, menu page, content > page and a footer. Each of which includes a shared functions file as > well via require_once(). Only real problem is keeping track of > tables/rows/columns across all the various files. The 'where was that > supposed to be...' kind of thing. yeah, well a complex layout will kill it pretty quick :) The other way is go down the route of a 'fusebox' -- one script that shows all pages within the site. index.php Stuff you can call that script with p=contact p=home p=about p=members&action=validate&step=3&favcolor=blue And just make sure the include files do what they need to. > Here's another one, there's no way to set a cookie after the headers > have been sent, true? Any way around this at all or at that point am I > best to use session variables and/or hidden fields. Hidden fields, yes. You are going to have the same problem with sessions... sessions must be set before the headers are sent too. You need to either change the logic on your page so that you set the cookie BEFORE the , or enable output buffering, so that you can set the cookie or session whenever you like, then do a flush. Personally, I've never seen the need to use OB, because I've found a way to work that I'm comfortable with. eg: In otherwords, I execute any code that I need to BEFORE the headers are sent, to ensure that I CAN set cookies, sessions, or use header()... I set some simple triggers like $show_form to decide what I want to do in the body. Each to their own, but it works great for me over many many applications. Justin Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error compiling php
Hello - I am attempting to upgrade one of our older PHP servers (4.0.1pl2) to PHP 4.3.0. We are running a fairly old version of apache (1.3.12) and MySQL (3.22.32). My question is - does PHP 4.3.0 support older versions of MySQL? When I go to configure PHP 4.3.0 it works fine, but during compile I get the following errors: lmysqlclient -lpng -lz -ljpeg -lz -lcrypt -lresolv -lm -ldl -lnsl -lcrypt -o sapi/cli/php ext/mysql/php_mysql.o: In function `zif_mysql_client_encoding': /home/aplocher/php-4.3.0/ext/mysql/php_mysql.c:1077: undefined reference to `mysql_character_set_name' ext/mysql/php_mysql.o: In function `zif_mysql_real_escape_string': /home/aplocher/php-4.3.0/ext/mysql/php_mysql.c:1671: undefined reference to `mysql_real_escape_string' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 My configure string looks like this - the MySQL directory should be fine because this configure string is exactly the same as the one used for 4.0.1pl2 (minus the GD/graphics stuff): './configure' '--with-mysql=/usr/local/mysql' '--with-apache=../apache_1.3.12' '--enable-track-vars' '--with-gd' '--with-jpeg-dir=/usr/lib' '--with-zlib-dir=/usr/local/lib' Any help would be really great. Thanks -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Templates
That's pretty much what I'm doing today, header page, menu page, content page and a footer. Each of which includes a shared functions file as well via require_once(). Only real problem is keeping track of tables/rows/columns across all the various files. The 'where was that supposed to be...' kind of thing. Here's another one, there's no way to set a cookie after the headers have been sent, true? Any way around this at all or at that point am I best to use session variables and/or hidden fields. I haven't done pure web development in a few years and am trying to catch back up quickly. Any "best practices" assistance would be appreciated. Thanks for the response by the way. /DAY -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 5:22 PM To: Darren Young; [EMAIL PROTECTED] Subject: Re: [PHP] Templates Go for a complex situation if that's what you want, or consider the basics: home.php tag // include('inc/header_html.php'); ?> Welcome to our website! contact.php tag // include('inc/header_html.php'); ?> Contact us: [EMAIL PROTECTED] If you update any code in any of the 3 include files, you will update the entire site's look, feel and actions. It still allows for you to execute unique PHP code either before or after the HTML starts too. Strip your site down to what's common, and what's unique to each page, and see where you go from there. Justin on 14/02/03 10:00 AM, Darren Young ([EMAIL PROTECTED]) wrote: > > I'm looking around for some options on using templates with PHP. I've > used several Perl solutions in the past, but never tried it in PHP. > Digging on the web yields several options so I'd love some thoughts or > comments. The real driver is that the basic site design could change > over time and I'd like to have the basic HTML in the templates, and > the real logic in the PHP code. > > Thanks in advance, > > Darren Young > -- 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] Calculating U.S. Taxes (regional)
Hello everyone! I'm looking for some resources that helps you calculate regional taxes. If you have any leads,then please let me know. I'm writing an e-commerce application that will charge users different tax fees, based on where they are located. I hope to find a script that already does that or gain access to an online service that maintains this type of data. I'm open to solutions with the following technologies: PHP SOAP XML or a general Value/Pair response. Any help would be greatly appreciated. Thanks in advance! -john =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity Web Developement. Database. Hosting. Multimedia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Templates
> If you update any code in any of the 3 include files, you will update the > entire site's look, feel and actions. It still allows for you to execute > unique PHP code either before or after the HTML starts too. I forgot to mention that a whole heap of your formatting and visial design can be achieved with CSS too... don't get yourself trapped by making the content hard to update. A simple means that it's just as updateable as the rest of your code, by tweaking a few lines of CSS in header_html.php Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Templates
Go for a complex situation if that's what you want, or consider the basics: home.php tag // include('inc/header_html.php'); ?> Welcome to our website! contact.php tag // include('inc/header_html.php'); ?> Contact us: [EMAIL PROTECTED] If you update any code in any of the 3 include files, you will update the entire site's look, feel and actions. It still allows for you to execute unique PHP code either before or after the HTML starts too. Strip your site down to what's common, and what's unique to each page, and see where you go from there. Justin on 14/02/03 10:00 AM, Darren Young ([EMAIL PROTECTED]) wrote: > > I'm looking around for some options on using templates with PHP. I've > used several Perl solutions in the past, but never tried it in PHP. > Digging on the web yields several options so I'd love some thoughts or > comments. The real driver is that the basic site design could change > over time and I'd like to have the basic HTML in the templates, and the > real logic in the PHP code. > > Thanks in advance, > > Darren Young > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Templates
I'm looking around for some options on using templates with PHP. I've used several Perl solutions in the past, but never tried it in PHP. Digging on the web yields several options so I'd love some thoughts or comments. The real driver is that the basic site design could change over time and I'd like to have the basic HTML in the templates, and the real logic in the PHP code. Thanks in advance, Darren Young -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sorting multidimensional arrays
Let's say I've got an array like so: $myarray[0]["firstname"] = "Mickey"; $myarray[0]["lastname"] = "Mouse"; $myarray[0]["score"] = 20; $myarray[1]["firstname"] = "Donald"; $myarray[1]["lastname"] = "Duck"; $myarray[1]["score"] = 10; I'd like be able to sort the array using different dimensions before I cycle through a while loop to print out the results. For instance, by lastname, or by score. I can't seem to get array_multisort() to do it. Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Use GnuPG with PHP?
I want to be able to encrypt a block of text using a passphrase. Then when I get the email, I just need to unlock it using that passphrase (no keys...i think). Can anyone tell me how to do this in PHP code? TIA -- Mike Yrabedra President 323 Enterprises Home of The MacDock and The MacSurfshop [http://macdock.com] : [http://macsurfshop.com] VOICE: 770.382.1195 iChat/AIM: ichatmacdock ___ "in all your ways acknowledge Him and He will direct your paths." Proverbs 3:6 NIV <{{{>< -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Add a record and recover it's ID in one operation
--- Chris Kay <[EMAIL PROTECTED]> wrote: > > Something like this perhaps untested > > function insert($query) { > // Connect info > mysql_connect("host","user","pass"); > > // Select DB > mysql_select_db("DBname"); > > // Perform insert > $indb=mysql_query($query); > > // Gets record ID > $dbq=mysql_query("select last_insert_id()"); > $data=mysql_fetch_row($dbq); > > // Return ID > return $data[0]; > } You can replace everything after "// Gets record ID" with this: return mysql_insert_id(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Add a record and recover it's ID in one operation
Something like this perhaps untested function insert($query) { // Connect info mysql_connect("host","user","pass"); // Select DB mysql_select_db("DBname"); // Perform insert $indb=mysql_query($query); // Gets record ID $dbq=mysql_query("select last_insert_id()"); $data=mysql_fetch_row($dbq); // Return ID return $data[0]; } - Chris Kay Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: 1300 882 221 - -Original Message- From: Daniel Page [mailto:[EMAIL PROTECTED]] Sent: Friday, 14 February 2003 8:18 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Add a record and recover it's ID in one operation Thanks! I stand corrected. I'll check the PHP online manual more often, and for now, I'm off to optimise my database and rewrite a few queries :) Cheers, Daniel "Leif K-Brooks" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > www.php.net/mysql-insert-id > > Daniel Page wrote: > > >Hi, > > > >Imagine a table with an auto-increment id number field and a text field for > >the username. > >User B (with user name 'johnny') could write to the database a millisecond > >after user A, with the same username. When user A looks for the last record > >written by Johnny, A will find the record entered by B. > > > >Is there a way to directly recover the auto-incremented number as like a > >return value (or somthing like that) of the write query as to be able to > >identify immediately what record you just wrote? > > > >This is just for argument's sake - I just would like to know if it is > >possible. My current solution is inserting the login time of the current > >user and/or IP, and adding that to make a temporary ID key where you select > >the latest entry written where username = your username and login time > >string = hhmmss info so you can immdately find your latest entered data, > >though recovering immediately the ID would have been a more elegant solution > >for this. > > > >Cheers, > >Daniel > > > > > > > > > > > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > -- 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] What's the scoop on PHP 5?
The latest cvs snapshots for PHP4.3.x and PHP5.0.x can be found at http://snaps.php.net Danny. - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 8:50 PM Subject: [PHP] What's the scoop on PHP 5? > Anyone know what the status of PHP 5 is? I can't find reference of it > on php.net, and the only place I can find an alpha of it is at the PHP > Museum. > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > > -- > 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] Simple PHP script
In a message dated 2/13/2003 1:11:35 PM Pacific Standard Time, [EMAIL PROTECTED] writes: >I am new to PHP and had just written a simple php script to get things >started. I have the following code: > >if($submit1) { >echo "hello $vname"; >} else { >?> > > >Input yourname > > > > > >} >?> >So this page is suppose to display a input box and a submit button and once >you enter ur name and press the button, it should show Hello [ur name] and >the input box at the bottom of it and the button below and the process >continue. > >I tried running it and inputted some text and pressed the button, and the >Hello [ur name] didn't show up, it just display an input box and the submit >button. > My guess would be that you have register_globals = Off. You can change it to register_globals = On in your php.ini file. But it would be better to learn to program with globals turned off. The following program would run correctly. Input yourname Janet --- Janet Valade Author, PHP & MySQL for Dummies -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Simple PHP script
Thanks everyone, It worked. Kelvin -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 4:13 PM To: Poon, Kelvin (Infomart) Cc: '[EMAIL PROTECTED]' Subject: Re: [PHP] Simple PHP script Sigh if ( $_POST['submit1'] ) { echo ( "Hello $_POST['vname']" ); } http://www.php.net/manual/en/language.variables.scope.php http://www.php.net/manual/en/language.variables.external.php Poon, Kelvin (Infomart) wrote: > Hi, > > I am new to PHP and had just written a simple php script to get things > started. I have the following code: > > > > > if($submit1) { > echo "hello $vname"; > } else { > ?> > > > Input yourname > > > > } > ?> > > > > So this page is suppose to display a input box and a submit button and once > you enter ur name and press the button, it should show Hello [ur name] and > the input box at the bottom of it and the button below and the process > continue. > > I tried running it and inputted some text and pressed the button, and the > Hello [ur name] didn't show up, it just display an input box and the submit > button. > > Can someone please help me? > > Thanks a lot > > Kelvin > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add a record and recover it's ID in one operation
Thanks! I stand corrected. I'll check the PHP online manual more often, and for now, I'm off to optimise my database and rewrite a few queries :) Cheers, Daniel "Leif K-Brooks" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > www.php.net/mysql-insert-id > > Daniel Page wrote: > > >Hi, > > > >Imagine a table with an auto-increment id number field and a text field for > >the username. > >User B (with user name 'johnny') could write to the database a millisecond > >after user A, with the same username. When user A looks for the last record > >written by Johnny, A will find the record entered by B. > > > >Is there a way to directly recover the auto-incremented number as like a > >return value (or somthing like that) of the write query as to be able to > >identify immediately what record you just wrote? > > > >This is just for argument's sake - I just would like to know if it is > >possible. My current solution is inserting the login time of the current > >user and/or IP, and adding that to make a temporary ID key where you select > >the latest entry written where username = your username and login time > >string = hhmmss info so you can immdately find your latest entered data, > >though recovering immediately the ID would have been a more elegant solution > >for this. > > > >Cheers, > >Daniel > > > > > > > > > > > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple PHP script
Sigh if ( $_POST['submit1'] ) { echo ( "Hello $_POST['vname']" ); } http://www.php.net/manual/en/language.variables.scope.php http://www.php.net/manual/en/language.variables.external.php Poon, Kelvin (Infomart) wrote: Hi, I am new to PHP and had just written a simple php script to get things started. I have the following code: Input yourname So this page is suppose to display a input box and a submit button and once you enter ur name and press the button, it should show Hello [ur name] and the input box at the bottom of it and the button below and the process continue. I tried running it and inputted some text and pressed the button, and the Hello [ur name] didn't show up, it just display an input box and the submit button. Can someone please help me? Thanks a lot Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] By reference
On Thu, 13 Feb 2003, Chris Boget wrote: > $firstVar = "123ABC"; > > $secondVar &= $firstVar; &= is a bitwise AND, and an assignment. This didn't do what you expected it to do. > $thirdVar = &$firstVar; =& is a reference assignment. This did what you expected it to do. > Why? I thought that "&=" made it so that the left operand was > pointing to the memory location of the right? You make the left operand point to the memory location of the right operand with =&. =& is the only reference assignment available, besides passing/returning by reference with functions. $stuff = "1234"; $ref =& $stuff;// $ref points to $stuff's data print $ref . "\n"; // prints "1234" $stuff = "5678"; print $ref . "\n"; // prints "5678" hth, ~Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Simple PHP script
Hi, I am new to PHP and had just written a simple php script to get things started. I have the following code: Input yourname So this page is suppose to display a input box and a submit button and once you enter ur name and press the button, it should show Hello [ur name] and the input box at the bottom of it and the button below and the process continue. I tried running it and inputted some text and pressed the button, and the Hello [ur name] didn't show up, it just display an input box and the submit button. Can someone please help me? Thanks a lot Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add a record and recover it's ID in one operation
www.php.net/mysql-insert-id Daniel Page wrote: Hi, Imagine a table with an auto-increment id number field and a text field for the username. User B (with user name 'johnny') could write to the database a millisecond after user A, with the same username. When user A looks for the last record written by Johnny, A will find the record entered by B. Is there a way to directly recover the auto-incremented number as like a return value (or somthing like that) of the write query as to be able to identify immediately what record you just wrote? This is just for argument's sake - I just would like to know if it is possible. My current solution is inserting the login time of the current user and/or IP, and adding that to make a temporary ID key where you select the latest entry written where username = your username and login time string = hhmmss info so you can immdately find your latest entered data, though recovering immediately the ID would have been a more elegant solution for this. Cheers, Daniel -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Add a record and recover it's ID in one operation
Hi, Imagine a table with an auto-increment id number field and a text field for the username. User B (with user name 'johnny') could write to the database a millisecond after user A, with the same username. When user A looks for the last record written by Johnny, A will find the record entered by B. Is there a way to directly recover the auto-incremented number as like a return value (or somthing like that) of the write query as to be able to identify immediately what record you just wrote? This is just for argument's sake - I just would like to know if it is possible. My current solution is inserting the login time of the current user and/or IP, and adding that to make a temporary ID key where you select the latest entry written where username = your username and login time string = hhmmss info so you can immdately find your latest entered data, though recovering immediately the ID would have been a more elegant solution for this. Cheers, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Enable CLI on Mac OS X
Hello all, I am running a few Apache 1.3.x / PHP 4.2.3 systems and I would like to mess around with using PHP from the command line. I installed PHP from a nice .pkg installer from Tenon (www.tenon.com) and it runs fine. The problem is that there is no source code on my system to run a simple ./configure --enable-cli etc... I am thinking that I need to install PHP (v4.3 while I am at it) from scratch to do this. I was wondering if anyone can think of a work around or any other ideas? Thanks, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD and 4.3
> Do you have freetype2 installed? No, but I removed the --with-freetype-dir=/usr and it installed ok. Does this mean I wont be able to create text on images? Here is basically what I want to do if that helps... I want to configure php so that I can create images with text on them, like a graphic counter. I don't care what font is used, so if there is a default font with GD, that's ok. > J. __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] By reference
I thought I understood this but evidently not... Consider the following: $firstVar = "123ABC"; $secondVar &= $firstVar; $thirdVar = &$firstVar; echo $secondVar; echo ''; echo $thirdVar; When I echo $secondVar, I get '0' but when I echo $thirdVar, I get the value of $firstVar. Why? I thought that "&=" made it so that the left operand was pointing to the memory location of the right? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sososoosos!!!!
ROTFLMAO!! Strong Bad on PHP ... we totally need to make Strong Bad the PHP mascot ;) At 03:32 PM 2/13/2003 -0500, you wrote: Do you know how many internet etiquette rules you're breaking by typing in all caps like that? Well you're breaking one. Don't type in all caps. --Strong Bad Anyway, download the .zip from http://www.php.net/downloads.php and read the installation instructions included with it. Luis A wrote: HI EVERY BODY=20 I HAVE THE FOLLOWING TROUBLE INSTALING PHP GUYS I NEED THE INFO HOW CAN I INATALL PHP MODULE IN WINDOWS USING = APACHE VERSION apache_1.3.26-win32-x86-no_src.msi I BEEN TRIED THE VERSIONapache_1.3.26-win32-x86-no_src.exe BUT HE = SEND IT TO ME A ERROR ON THE SYSTEM AND HE DOES NOT WORKING WHAT DU U SUBGEST ?? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- 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's the scoop on PHP 5?
Anyone know what the status of PHP 5 is? I can't find reference of it on php.net, and the only place I can find an alpha of it is at the PHP Museum. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] problems with cookies and PHP
I have been playing with this at home. Perhaps this makes it a bit easier. boolean setcookie ( string name [, string value [, int expire [, string path [, string domain [, int secure]) boolean setcookie (name, value, expire, path, domain, secure) Fwiw, a solution from another project: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sososoosos!!!!
Do you know how many internet etiquette rules you're breaking by typing in all caps like that? Well you're breaking one. Don't type in all caps. --Strong Bad Anyway, download the .zip from http://www.php.net/downloads.php and read the installation instructions included with it. Luis A wrote: HI EVERY BODY=20 I HAVE THE FOLLOWING TROUBLE INSTALING PHP GUYS I NEED THE INFO HOW CAN I INATALL PHP MODULE IN WINDOWS USING = APACHE VERSION apache_1.3.26-win32-x86-no_src.msi I BEEN TRIED THE VERSIONapache_1.3.26-win32-x86-no_src.exe BUT HE = SEND IT TO ME A ERROR ON THE SYSTEM AND HE DOES NOT WORKING WHAT DU U SUBGEST ?? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sososoosos!!!!
HI EVERY BODY=20 I HAVE THE FOLLOWING TROUBLE INSTALING PHP GUYS I NEED THE INFO HOW CAN I INATALL PHP MODULE IN WINDOWS USING = APACHE VERSION apache_1.3.26-win32-x86-no_src.msi I BEEN TRIED THE VERSIONapache_1.3.26-win32-x86-no_src.exe BUT HE = SEND IT TO ME A ERROR ON THE SYSTEM AND HE DOES NOT WORKING WHAT DU U SUBGEST ??
Re: [PHP] problems with cookies and PHP
In your code, it appears you are attempting to determine the value of the cookie immediately upon setting. The value of the cookie is NOT available at this point; a new page must be opened. Why are you setting time to 0? If you want cookie to disappear at end of the session, use NULL. Are you certain that $_COOKIE[] is available to you? have you tried $HTTP_COOKIE_VARS[]? Your code ends with two braces ( } ); why? It should end with a single brace. - Original Message - From: "Joshua Chapman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:57 PM Subject: [PHP] problems with cookies and PHP This is driving me nuts... it won't set or reset the cookie no errors no nothing... I've learned quite a bit about cookies and PHP thus far but something important must still be eluding me. I've read the manual entry on it, is there any other tutorial out there that's better? what am I doing wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sorting multi-dimensional array
Steve, Have you tired Usort ?? http://www.php.net/manual/en/function.usort.php On Thursday, February 13, 2003, at 01:08 PM, Steve Buehler wrote: PHP version 4.2.2 I sure hope that I can get somebody to help me figure this one out. I have a multi-dimensional array that I need to sort. Here is the code that I have so far: function gettourndivs(){ GLOBAL $sea_id,$PHP_SELF; $result=get_mysql_query("SELECT * FROM `games` WHERE sea_id = '$sea_id' AND deleted != '1' GROUP BY div_id ORDER BY `type`"); $i="0"; while(($row=mysql_fetch_object($result))){ $divname=getdivisionname($row->div_id); $array[$i][divid]=$row->div_id; $array[$i][divname]=$divname; $array[$i++][type]=$row->type; } reset($array); // I need it to sort the array on the divname field here before going to the output. // and instead of it doing it by the $ii, it should ouput in the correct alphabetic order of the "divname" field. for($ii=0;$ii<$i;$ii++){ echo "$ii," . $array[$ii][divid].","; echo $array[$ii][divname].","; echo $array[$ii][type] . "\n"; } } Here is the output: and I need to sort it on the third field so that it would be in alphabetic order, but keeping the other items on that line when it moves to the correct position. 0,91,Mens Open ,0 1,20,U11 Boys ,0 2,65,U17-19 Boys ,0 3,30,U12 Boys Premiership ,0 4,69,U16-17 Girls ,0 5,34,U12 Girls Premiership ,0 6,29,U12 Boys ,1 7,78,U19 Girls ,1 8,100,Mens O-30 ,1 9,11,U10 Boys ,1 10,47,U14 Boys ,1 11,56,U15 Boys ,1 12,24,U11 Girls ,1 13,42,U13 Girls ,1 14,60,U15 Girls ,1 15,35,U12 Girls UEFA Cup ,1 16,53,U14 Girls UEFA Cup ,1 17,52,U14 Girls Premiership ,1 18,38,U13 Boys ,2 19,110,U16 Boys ,2 Is this possible? I have looked at array_multisort and unless I am reading it wrong, it doesn't look like it would do what I needed. Thank You Steve -- 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] Exotic Assign operators what do they do.
At 20:38 13-2-2003, you wrote: The PHP manual neglects to tell us what these assignment operators are, can somebody point me to what they mean? http://nl.php.net/manual/en/language.operators.bitwise.php please also chek the user annotations for examples &= |= ^= ~= <<= >>= just curious that's all -- Jeff Bearer, RHCE Webmaster, PittsburghLIVE.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Exotic Assign operators what do they do.
The PHP manual neglects to tell us what these assignment operators are, can somebody point me to what they mean? &= |= ^= ~= <<= >>= just curious that's all -- Jeff Bearer, RHCE Webmaster, PittsburghLIVE.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
On Friday 14 February 2003 03:17, David T-G wrote: > Mike, et al -- > > ...and then Mike Kercher said... > % > % You might also check out your timeout value in php.ini This should not have an effect because PHP only starts executing *after* the file has been fully uploaded. > I'll definitely need to tweak that for the real world, but this was > locally on a laptop. It was fun to watch the two drive lights flash back > and forth as I watched my free space go down by 200M or so :-) -- 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 -- /* Q: Why did the astrophysicist order three hamburgers? A: Because he was hungry. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Process array after form submission problem
> -Original Message- > From: Steve Jackson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 13, 2003 2:10 PM > To: Php-General > Subject: [PHP] Process array after form submission problem > > > Hi, > > My problem is that I have a dynamic form with vars which I > want to process. > > The variables are checkbox names with a variable number of > checkboxes but > all currently have the same variable name. > > ie. > > > > > > > The array code works fine in that the values reflect what is > in the DB. > > I understand that $grant will be an array? (am I right?) so > how do I use PHP > to look at $grant as an array in my processing script rather than an > ordinary variable? I can get the DB to update if there is > only one checked > box but otherwise it updates the DB with the value of the > last checkbox. Add [] to the end of the item name like: '; foreach ($grant as $value) { echo "$value"; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] crypt()
Is there anyway to make crypt() behave like md5() and give the same results for the same string? All of the passwords for the db I am using had crpyt() applied to them before they were entered in the db. How do I then verify that passwords match? I just did this: $test=crypt('test'); print $test. ""; $test2=crypt('test'); print $test2. ""; and it printed out two completely different strings. I saw in the functions list it was talking about salt but I am not sure what that means. Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
Hi again -- ...and then David T-G said... % ... % Ahhh... After reading it *twice* I realized that I'm using method='post' % and so I need to set post_max_size as well. I've now confirmed that I % can upload multiple MAX_FILE_SIZE files up to post_max_size :-) Oh, yeah -- and now I need to see if I can override php.ini settings in my script because the production server is set to 2M :-) Thanks again & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg96856/pgp0.pgp Description: PGP signature
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
Mike, et al -- ...and then Mike Kercher said... % % You might also check out your timeout value in php.ini I'll definitely need to tweak that for the real world, but this was locally on a laptop. It was fun to watch the two drive lights flash back and forth as I watched my free space go down by 200M or so :-) Thanks & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg96855/pgp0.pgp Description: PGP signature
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
Jason, et al -- ...and then Jason Wong said... % % On Friday 14 February 2003 02:44, David T-G wrote: % % > Yes, I'm back again with another upload question. I promise I've been % > paying attention in class, but I just can't get this to work! % % [snip] % % > Now I'm at a loss for where to turn to fix this. It would seem that % > everything is in place! Is there an apache directive that I need as % > well, perhaps? % % manual > Handling file uploads > Common Pitfalls Ahhh... After reading it *twice* I realized that I'm using method='post' and so I need to set post_max_size as well. I've now confirmed that I can upload multiple MAX_FILE_SIZE files up to post_max_size :-) Yeah, I feel stupid, but I'm happy :-) % % -- % Jason Wong -> Gremlins Associates -> www.gremlins.biz Thanks again! & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg96854/pgp0.pgp Description: PGP signature
[PHP] Process array after form submission problem
Hi, My problem is that I have a dynamic form with vars which I want to process. The variables are checkbox names with a variable number of checkboxes but all currently have the same variable name. ie. The array code works fine in that the values reflect what is in the DB. I understand that $grant will be an array? (am I right?) so how do I use PHP to look at $grant as an array in my processing script rather than an ordinary variable? I can get the DB to update if there is only one checked box but otherwise it updates the DB with the value of the last checkbox. Any ideas? Steve Jackson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uploading files and MAX_FILE_SIZE and php.ini
You might also check out your timeout value in php.ini -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 12:57 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini On Friday 14 February 2003 02:44, David T-G wrote: > Yes, I'm back again with another upload question. I promise I've been > paying attention in class, but I just can't get this to work! [snip] > Now I'm at a loss for where to turn to fix this. It would seem that > everything is in place! Is there an apache directive that I need as > well, perhaps? manual > Handling file uploads > Common Pitfalls -- 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 -- /* So this is what it feels like to be potato salad */ -- 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] GD and 4.3
> Do you have freetype2 installed? No, but I removed the --with-freetype-dir=/usr and it installed ok. Does this mean I wont be able to create text on images? Basiclly, I want to configure php so that I can create images with text on them, like a graphic counter. I don't care what font is used, so if there is a default font with GD, that's ok. J. __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sorting multi-dimensional array
PHP version 4.2.2 I sure hope that I can get somebody to help me figure this one out. I have a multi-dimensional array that I need to sort. Here is the code that I have so far: function gettourndivs(){ GLOBAL $sea_id,$PHP_SELF; $result=get_mysql_query("SELECT * FROM `games` WHERE sea_id = '$sea_id' AND deleted != '1' GROUP BY div_id ORDER BY `type`"); $i="0"; while(($row=mysql_fetch_object($result))){ $divname=getdivisionname($row->div_id); $array[$i][divid]=$row->div_id; $array[$i][divname]=$divname; $array[$i++][type]=$row->type; } reset($array); // I need it to sort the array on the divname field here before going to the output. // and instead of it doing it by the $ii, it should ouput in the correct alphabetic order of the "divname" field. for($ii=0;$ii<$i;$ii++){ echo "$ii," . $array[$ii][divid].","; echo $array[$ii][divname].","; echo $array[$ii][type] . "\n"; } } Here is the output: and I need to sort it on the third field so that it would be in alphabetic order, but keeping the other items on that line when it moves to the correct position. 0,91,Mens Open ,0 1,20,U11 Boys ,0 2,65,U17-19 Boys ,0 3,30,U12 Boys Premiership ,0 4,69,U16-17 Girls ,0 5,34,U12 Girls Premiership ,0 6,29,U12 Boys ,1 7,78,U19 Girls ,1 8,100,Mens O-30 ,1 9,11,U10 Boys ,1 10,47,U14 Boys ,1 11,56,U15 Boys ,1 12,24,U11 Girls ,1 13,42,U13 Girls ,1 14,60,U15 Girls ,1 15,35,U12 Girls UEFA Cup ,1 16,53,U14 Girls UEFA Cup ,1 17,52,U14 Girls Premiership ,1 18,38,U13 Boys ,2 19,110,U16 Boys ,2 Is this possible? I have looked at array_multisort and unless I am reading it wrong, it doesn't look like it would do what I needed. Thank You Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD and 4.3
On Friday 14 February 2003 02:50, Joseph Bannon wrote: > Can someone tell me what is wrong? I get this error > message when I try to configure > > checking for jpeg_read_header in -ljpeg... yes > checking for png_write_image in -lpng... yes > If configure fails try --with-xpm-dir= > configure: error: freetype2 not found! Do you have freetype2 installed? -- 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 young lady had an unusual list, Linked in part to a structural weakness. She set no preconditions. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problems with cookies and PHP
This is driving me nuts... it won't set or reset the cookie no errors no nothing... I've learned quite a bit about cookies and PHP thus far but something important must still be eluding me. I've read the manual entry on it, is there any other tutorial out there that's better? what am I doing wrong?
Re: [PHP] uploading files and MAX_FILE_SIZE and php.ini
On Friday 14 February 2003 02:44, David T-G wrote: > Yes, I'm back again with another upload question. I promise I've been > paying attention in class, but I just can't get this to work! [snip] > Now I'm at a loss for where to turn to fix this. It would seem that > everything is in place! Is there an apache directive that I need as > well, perhaps? manual > Handling file uploads > Common Pitfalls -- 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 -- /* So this is what it feels like to be potato salad */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD and 4.3
Can someone tell me what is wrong? I get this error message when I try to configure checking for jpeg_read_header in -ljpeg... yes checking for png_write_image in -lpng... yes If configure fails try --with-xpm-dir= configure: error: freetype2 not found! Here is my configure... ./configure --with-mysql=/home/mysql-3.23.53 --with-apache=/home/apache_1.3.27 --enable-track-vars --prefix=/home/php-4.3.0 --with-gd --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --with-zlib-dir=/usr __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] uploading files and MAX_FILE_SIZE and php.ini
Hi, all -- Yes, I'm back again with another upload question. I promise I've been paying attention in class, but I just can't get this to work! The default upload_max_filesize in my php.ini was 2M, but I changed it to 200M and restarted the server, and now phpinfo() reports 200M. I created a dinky little upload form, which is attached, to either accept an upload or tell me that it got one, and I can successfully upload files of 7M (much bigger than the original 2M). After initial failures, I added a hidden form field MAX_FILE_SIZE as has been suggested (but sometimes contested) in other posts. I still cannot, however, upload anything larger; a 9M file as well as some 30M and 40M tests just doesn't appear. I have only 5-10M of my 256M available, but I have 90M of swap free and over 1G free on /, the monolithic root partition. Now I'm at a loss for where to turn to fix this. It would seem that everything is in place! Is there an apache directive that I need as well, perhaps? TIA & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! Send me some files! " ; #print(exec("id")); ### #phpinfo() ; ### if ( $_FILES[uploads] ) { print "I HAVE _FILES!\n" ; ### print "\n";### print_r($_FILES); print "\n"; ### } else { print " OK, buddy. Time to send me some files. " ; } print " " ; ?> msg96845/pgp0.pgp Description: PGP signature
Re: [PHP] form within form
Rather than form within a form, provide 3 fields: old password, new password, username Verify against old password. If that's valid, then change password. Or am I missing something here? - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:30 PM Subject: RE: [PHP] form within form I apologize I mean when they click the 'verify' button, I verify their username and password before I allow them to update it. Eddie -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 1:27 PM To: Edward Peloke; Php-General@Lists. Php. Net Subject: Re: [PHP] form within form What do you mean by "verify that info"? Do you mena verify for content, or form, or what... - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:22 PM Subject: [PHP] form within form I am creating a form to allow the user to change his/her password. After the user enters their username and old password, I need to verify that info before they can change their user name and password. So I tried using a form within a form but am having some problems with passing the parameters back and forth...any new ideas would be greatly appreciated. I will fill in all the db stuff later. Thanks, Eddie UserName: '> Password: New Password: Verify Password: -- 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] form within form
Forms cannot be nested, there can be no form within form. Simply use 4 fields - username, oldpassw, newpassw, newpassw2 (must be equal newpassw), when the form is submited, check if username and oldpassw are valid, newpassw = newpassw2, and if everything is right, you can update to the new password Edward Peloke wrote: I am creating a form to allow the user to change his/her password. After the user enters their username and old password, I need to verify that info before they can change their user name and password. So I tried using a form within a form but am having some problems with passing the parameters back and forth...any new ideas would be greatly appreciated. I will fill in all the db stuff later. Thanks, Eddie UserName: '> Password: New Password: Verify Password: name=reset> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form within form
On Friday 14 February 2003 02:22, Edward Peloke wrote: > I am creating a form to allow the user to change his/her password. After > the user enters their username and old password, I need to verify that info > before they can change their user name and password. So I tried using a > form within a form but am having some problems with passing the parameters > back and forth...any new ideas would be greatly appreciated. I will fill > in all the db stuff later. You cannot nest tags. Sort that out then worry about the PHP. -- 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 -- /* I know what "custody" [of the children] means. "Get even." That's all custody means. Get even with your old lady. -- Lenny Bruce */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ftp file to client machine
At 18:45 13.02.2003, Petre Agenbag spoke out and said: [snip] >But I am baffeled for the rest, ie, what to do on the download.ftp page. >First I tried the ftp_get() with the $file used as the local and remote >files, but it seems that that will not download the file to the client >machine, but rather to the server itself. You need to "think" being the server - that is the server (on behalf of your script) downloads the file. >So, how can I have the file download to the client's machine ( ps, the >files are NOT inside a webfolder, so I cannot simply make links to them, >and yes, it is done for security reasons; basically I am trusting/using >vsftp's security instead of having to devise my own method..) You have two options: 1) Don't download the file yourself but give the user an ftp link after reading the directory. This seems impractical in your case since you need to log into the server. 2) Download the file to the server, then transmit it to the client's machine using an appropriate mime header: header('Content-Type: application/octet-stream'); This will have the browser give the user the "save as" dialog. -- >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] form within form
I apologize I mean when they click the 'verify' button, I verify their username and password before I allow them to update it. Eddie -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 1:27 PM To: Edward Peloke; Php-General@Lists. Php. Net Subject: Re: [PHP] form within form What do you mean by "verify that info"? Do you mena verify for content, or form, or what... - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:22 PM Subject: [PHP] form within form I am creating a form to allow the user to change his/her password. After the user enters their username and old password, I need to verify that info before they can change their user name and password. So I tried using a form within a form but am having some problems with passing the parameters back and forth...any new ideas would be greatly appreciated. I will fill in all the db stuff later. Thanks, Eddie UserName: '> Password: New Password: Verify Password: -- 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] form within form
My bad...I see your code now. On Thu, 2003-02-13 at 12:22, [EMAIL PROTECTED] wrote: > I am creating a form to allow the user to change his/her password. After > the user enters their username and old password, I need to verify that info > before they can change their user name and password. So I tried using a > form within a form but am having some problems with passing the parameters > back and forth...any new ideas would be greatly appreciated. I will fill in > all the db stuff later. > > Thanks, > Eddie > > > > > > > > > > UserName: > > > > '> > > > > > > > Password: > > > > > > > > > > > > > > > > > > New Password: > > > > > > > > > > > > Verify Password: > > > > > > > > > > > > > > > > > name=reset> > -- Cory Hicks <[EMAIL PROTECTED]> TRI-International -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] form within form
Can we see some code? Maybe we could help.. Cory On Thu, 2003-02-13 at 12:26, [EMAIL PROTECTED] wrote: > ALso, global variables are off... > > -Original Message- > From: Edward Peloke [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 13, 2003 1:22 PM > To: Php-General@Lists. Php. Net > Subject: [PHP] form within form > > > I am creating a form to allow the user to change his/her password. After > the user enters their username and old password, I need to verify that info > before they can change their user name and password. So I tried using a > form within a form but am having some problems with passing the parameters > back and forth...any new ideas would be greatly appreciated. I will fill in > all the db stuff later. > > Thanks, > Eddie > > > > > > > > > > UserName: > > > > '> > > > > > > > Password: > > > > > > > > > > > > > > > > > > New Password: > > > > > > > > > > > > Verify Password: > > > > > > > > > > > > > > > > > name=reset> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Cory Hicks <[EMAIL PROTECTED]> TRI-International -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form within form
What do you mean by "verify that info"? Do you mena verify for content, or form, or what... - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:22 PM Subject: [PHP] form within form I am creating a form to allow the user to change his/her password. After the user enters their username and old password, I need to verify that info before they can change their user name and password. So I tried using a form within a form but am having some problems with passing the parameters back and forth...any new ideas would be greatly appreciated. I will fill in all the db stuff later. Thanks, Eddie UserName: '> Password: New Password: Verify Password: -- 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] form within form
ALso, global variables are off... -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 1:22 PM To: Php-General@Lists. Php. Net Subject: [PHP] form within form I am creating a form to allow the user to change his/her password. After the user enters their username and old password, I need to verify that info before they can change their user name and password. So I tried using a form within a form but am having some problems with passing the parameters back and forth...any new ideas would be greatly appreciated. I will fill in all the db stuff later. Thanks, Eddie UserName: '> Password: New Password: Verify Password: -- 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: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2
you can breath now ... :) Vernon wrote: I finally got it! I had to downgrade to an older verison of the php-mysql for God know what reason. I am back up now. -- Lucas Lain [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing a comma from a form field
$thestr = str_replace(",","",$thestring); - Original Message - From: "Ben C." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:13 PM Subject: [PHP] Removing a comma from a form field I'm trying to update a field which contains a $USD figure. But when I update it as 200,000 it become 200. I need to take out the comma. Is using ereg_replace function the best way of doing so? What do you think. Thanks, Ben -- 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] Removing a comma from a form field
If the comma is all you have to worry about, you don't need regex. Use www.php.et/str-replace. Ben C. wrote: I'm trying to update a field which contains a $USD figure. But when I update it as 200,000 it become 200. I need to take out the comma. Is using ereg_replace function the best way of doing so? What do you think. Thanks, Ben -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] form within form
I am creating a form to allow the user to change his/her password. After the user enters their username and old password, I need to verify that info before they can change their user name and password. So I tried using a form within a form but am having some problems with passing the parameters back and forth...any new ideas would be greatly appreciated. I will fill in all the db stuff later. Thanks, Eddie UserName: '> Password: New Password: Verify Password: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Removing a comma from a form field
I'm trying to update a field which contains a $USD figure. But when I update it as 200,000 it become 200. I need to take out the comma. Is using ereg_replace function the best way of doing so? What do you think. Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ftp file to client machine
HI I am trying to do the following: I have an ftp server configured, but instead of the user having to use an ftp client, I'd like them to use the browser: So I'm trying to make a mini web-based ftp client. Idea is to get their username and password ( and maybe the ftp address as well?) and to then have php log into the server and list the contents of the folder (no need to handel subfolders etc.). Then I would want them to be able to click on the file to download it. I have done the first part with no problem as per below: "; die; } else { echo "Connected to $ftp_server, for user $ftp_user_name"; } // get dir listing $file_list = ftp_nlist($conn_id,""); foreach ($file_list as $num=>$val) { echo "$val "; } ftp_close($conn_id); ?> But I am baffeled for the rest, ie, what to do on the download.ftp page. First I tried the ftp_get() with the $file used as the local and remote files, but it seems that that will not download the file to the client machine, but rather to the server itself. So, how can I have the file download to the client's machine ( ps, the files are NOT inside a webfolder, so I cannot simply make links to them, and yes, it is done for security reasons; basically I am trusting/using vsftp's security instead of having to devise my own method..) Please point out my obvious lack in knowledge of these matters. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problems with cookies and PHP
You have to set the cookie again. Fireborn Silvaranth wrote: ok now it will print it's value correctly but what about actually changing the cookie's value? this line: $_COOKIE['userInfo']="userID"; sets $_COOKIE['userInfo'] to "userID" but it does not change the cookie file itself. what must I do to accomplish that? - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Fireborn Silvaranth" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 9:41 AM Subject: Re: [PHP] problems with cookies and PHP print "$_COOKIE['userInfo']"; Should be: print $_COOKIE['userInfo']; -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
Re: [PHP] problems with cookies and PHP
setcookie("userinfo","userid",NULL,"/"); - Original Message - From: "Fireborn Silvaranth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 11:58 AM Subject: [PHP] problems with cookies and PHP ok now it will print it's value correctly but what about actually changing the cookie's value? this line: $_COOKIE['userInfo']="userID"; sets $_COOKIE['userInfo'] to "userID" but it does not change the cookie file itself. what must I do to accomplish that? - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Fireborn Silvaranth" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 9:41 AM Subject: Re: [PHP] problems with cookies and PHP > > >print "$_COOKIE['userInfo']"; > > > > > Should be: > print $_COOKIE['userInfo']; > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > -- 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
Fw: [PHP] sending e-mail with 'Bcc:' and 'Cc:' not working....
mail("[EMAIL PROTECTED]","This Is A Subject",$message,"From: [EMAIL PROTECTED]\r\nCc: [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]\r\nBcc: [EMAIL PROTECTED],[EMAIL PROTECTED]"); Separate addesses with commas. Separate CC and BCC with \r\n - Original Message - From: "Scott Fletcher" <[EMAIL PROTECTED]> To: <> Sent: Thursday, February 13, 2003 11:32 AM Subject: [PHP] sending e-mail with 'Bcc:' and 'Cc:' not working I'm a little puzzled on why does either of these two, 'Bcc' and 'Cc' not work when I had successfully send the e-mail. My best guess is that I need additional header, if so then what are the required header needed to make this 'Bcc' and 'Cc' work? Here's the Internet Header from the " To: " e-mail that worked. --clip-- Received: from localhost (host.domain.com [0.0.0.0]) by hostname.domain with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 1KAAMHG6; Thu, 13 Feb 2003 11:58:34 -0500 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: e-Mail Test Date: Thu, 13 Feb 2003 12:03:48 EST --clip-- Thanks -- 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] problems with cookies and PHP
ok now it will print it's value correctly but what about actually changing the cookie's value? this line: $_COOKIE['userInfo']="userID"; sets $_COOKIE['userInfo'] to "userID" but it does not change the cookie file itself. what must I do to accomplish that? - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Fireborn Silvaranth" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 9:41 AM Subject: Re: [PHP] problems with cookies and PHP > > >print "$_COOKIE['userInfo']"; > > > > > Should be: > print $_COOKIE['userInfo']; > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail question
Try: mail('[EMAIL PROTECTED]','subject','hello '.($a ? 'andreas')); Jonas Geiregat wrote: is it possible to do something like mail("[EMAIL PROTECTED]","subject","hello if($a){ return andreas; }"); or what would be the best solution for this ? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problems with cookies and PHP
I'm having problems with cookies and PHP and I'm not sure how to solve them. I've been working on a user tracking system for our site and I need to have the site remember them after they close their browser then come back. The only way I can think to do that is with cookies. I need to have PHP set a temp cookie on the first page then on the second page have it see the temp cookie and set it with an ID that will follow them on our site for a month or so. the simple code I've written to try to do this this is just for my use... basically call the page once and it'll set a temp cookie then call another page with the same script and it'll see the temp cookie and set it with a different variable. Thoughts? I'm using IE 6 to test this little bit. Thanks!
[PHP] Need help with PHP CLI
Hello everyone! I'm having trouble accessing the argument list from a php script, from the command line. I'm calling the script as >>./myscript.php argument1 argument2 myscript.php contains #!/usr/local/php -q $argv and $argc both returns blank. I looked at the global variables ($GLOBALS and $GLOBALS[$argv]) and noticed that $ARGC and $ARGV were not listed. Am I missing something? Is this method outdated? i.e. echo $argv[$i]. It seems like $ARGV is not even present, let alone be an array. Please advise. I'm using PHP 4.2.3 on Apache 1.23.xx and Linux. Thanks in advance! -john =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity Web Developement. Database. Hosting. Multimedia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sending e-mail with 'Bcc:' and 'Cc:' not working....
I'm a little puzzled on why does either of these two, 'Bcc' and 'Cc' not work when I had successfully send the e-mail. My best guess is that I need additional header, if so then what are the required header needed to make this 'Bcc' and 'Cc' work? Here's the Internet Header from the " To: " e-mail that worked. --clip-- Received: from localhost (host.domain.com [0.0.0.0]) by hostname.domain with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 1KAAMHG6; Thu, 13 Feb 2003 11:58:34 -0500 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: e-Mail Test Date: Thu, 13 Feb 2003 12:03:48 EST --clip-- Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SNMPGET returns "Invalid object identifier: .1.3.6.1.2.1.1.1.0"
Hey All, Ok I've been going nuts (as well as spending 6hours) trying to figure out what's going on with this. When I poll my switch from the commandline using net-snmp's snmpget tool I get the proper response: adxitutil1# ./snmpget -v 1 -c public xxx.xxx.xxx.xxx 1.3.6.1.2.1.1.1.0 SNMPv2-MIB::sysDescr.0 = STRING: Cisco Internetwork Operating System Software IOS (tm) C3500XL Software (C3500XL-C3H2S-M), Version 12.0(5.2)XU, MAINTENANCE INTERIM SOFTWARE Copyright (c) 1986-2000 by cisco Systems, Inc. Compiled Mon 17-Jul-00 18:29 by ayounes Now, when I do the SNMPGET call from PHP: $a = snmpget("10.1.0.11", "public", ".1.3.6.1.2.1.1.1.0"); echo "A == $a "; I get: Warning: snmpget() [function.snmpget]: Invalid object identifier: .1.3.6.1.2.1.1.1.0 in /usr/local/apache2/htdocs/snmpget_test.php on line 11 Yet: $a = snmpwalkoid("xxx.xxx.xxx.xxx", "public", ""); for (reset($a); $i = key($a); next($a)) { echo "$i: $a[$i]\n"; } Returns: SNMPv2-MIB::sysDescr.0: Cisco Internetwork Operating System Software IOS (tm) C3500XL Software (C3500XL-C3H2S-M), Version 12.0(5.2)XU, MAINTENANCE INTERIM SOFTWARE Copyright (c) 1986-2000 by cisco Systems, Inc. Compiled Mon 17-Jul-00 18:29 by ayounes SNMPv2-MIB::sysObjectID.0: SNMPv2-SMI::enterprises.9.1.248 SNMPv2-MIB::sysUpTime.0: 229:1:20:43.90 SNMPv2-MIB::sysContact.0: SNMPv2-MIB::sysName.0: is.good.beer.com I am running: FreeBSD5.0 Apache-2.0.44 PHP-4.3.0 net-snmp-5.0.6 (I have also tried net-snmp-5.0.7, net-snmp-5.0.4, net-snmp-5.0.0 and ucd-snmp-4.2.x with the same results. #define NO_ZEROLENGTH_COMMUNITY 1 has been uncommented in net-snmp-5.0.6's acconfig.h file and PHP was configured with: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-snmp=/usr/local --with-gd=/usr/local --with-png-dir=/usr/local --with-zlib-dir=/usr/local *whimper* help! Has anyone seen this behaviour before? The scripts that I am using for testing work fine on my windows server with php, apache, and mysql...any suggestions aside from formating and rebuilding the box with an older OS and apps? Cheers, Mike Lindsay [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2
So the file is looked for in /usr/lib/php4, but resides in /usr/lib/php, you should move it Vernon wrote: OK, I looked up that file and found that I needed to install the MySQL-shared-3.23.51-1.i386.rpm which I did and realized that I already have the php-mysql installed. But am still getting the same erro message when restarting. However I did find the file you were asking about but in the /usr/lib/php folder and here is what I got: ldd /usr/lib/php/mysql.so libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10 (0x40026000) libc.so.6 => /lib/i686/libc.so.6 (0x40057000) libz.so.1 => /usr/lib/libz.so.1 (0x40193000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x401a1000) libnsl.so.1 => /lib/libnsl.so.1 (0x401ce000) libm.so.6 => /lib/i686/libm.so.6 (0x401e5000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Before you upgrade mod_php4 on FreeBSD!
msg96819/pgp0.pgp Description: PGP signature
RE: [PHP] cookie problem....
>From your code snip it looks like you are missing ?> after the if contruct. Bryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD and 4.3
On Friday 14 February 2003 00:22, Joseph Bannon wrote: > Are there any special configuration commands I have to > include at install to use GD? Depending on what you mean by special the answer could be YES or NO. --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --with-zlib-dir=/usr ... will probably cover all the common functionality -- 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 -- /* Change your language to Finnish. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2
I finally got it! I had to downgrade to an older verison of the php-mysql for God know what reason. I am back up now. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD and 4.3
Are there any special configuration commands I have to include at install to use GD? J. __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Before you upgrade mod_php4 on FreeBSD!
I too have been very dismayed by their decision to remove the CyberCash module. I'm consequently forced to never upgrade my PHP again as I depend on that module. Verisign, as you mention, *DOES* support Cybercash still, and switching to payflow will cost us money - not only with Verisign, but with the time it would take to rewrite the portion of our website that has to talk with them. -matthew I think I heard Kirk Strauser say: >I just finished struggling with repairing a bad situation on a FreeBSD >4.7-STABLE server. During a routine ports upgrade, we discovered to our >dismay that the folks who make PHP4 decided that the Cybercash module was >obsolete since Verisign doesn't support Cybercash anymore. > >Unfortunately, they were wrong; Verisign *does* support Cybercash, and >people still depend on that module. > >If you use mod_php4 in a production environment, please be warned that >several modules were removed from the 4.3.0 system. Be absolutely sure that >you don't use any of the deleted features before updating. >=2D-=20 >Kirk Strauser > > >--=-=-= >Content-Type: application/pgp-signature > >-BEGIN PGP SIGNATURE- >Version: GnuPG v1.2.1 (GNU/Linux) > >iD8DBQA+Swli5sRg+Y0CpvERAi5WAJoDYAkFtleAxFzZYOup0ri+gz+PawCgijne >+dsZ2OM3jpIZ80uxlgiDGfs= >=XvbP >-END PGP SIGNATURE- >--=-=-=-- > > >To Unsubscribe: send mail to [EMAIL PROTECTED] >with "unsubscribe freebsd-stable" in the body of the message > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2
OK, I looked up that file and found that I needed to install the MySQL-shared-3.23.51-1.i386.rpm which I did and realized that I already have the php-mysql installed. But am still getting the same erro message when restarting. However I did find the file you were asking about but in the /usr/lib/php folder and here is what I got: ldd /usr/lib/php/mysql.so libmysqlclient.so.10 => /usr/lib/libmysqlclient.so.10 (0x40026000) libc.so.6 => /lib/i686/libc.so.6 (0x40057000) libz.so.1 => /usr/lib/libz.so.1 (0x40193000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x401a1000) libnsl.so.1 => /lib/libnsl.so.1 (0x401ce000) libm.so.6 => /lib/i686/libm.so.6 (0x401e5000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php