RE: [PHP] Pricing for PHP programming???
Interesting, that, since I will be graduating with majors in Computer Information Systems _and_ Mass Communications, but I still need a graphic artist. Does anybody where I can get a good wife? *JK* -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, February 02, 2001 8:56 PM To: johnny p. Cc: Jerry Lake; [EMAIL PROTECTED] Subject: RE: [PHP] Pricing for PHP programming??? tOn Fri, 2 Feb 2001, johnny p. wrote: Hah! My wife has a formal education in graphics design. My web sites would look like crap without her extensive layout skills. :) I'm so lucky... Ah! kindered spirit My wife has a formal education in Mass Communication and Public Relations I wouldn't be in bussiness if she was not able make presentations to drum up clients ! BUT we still lack a graphic designer - don't think I can afford a second wife ;-) Cheers Tarique -- = B2B Application Providers http://www.sanisoft.com Vortal for Nagpur http://nagpurcity.net = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Converting String to Variable
Here's my question: why do you want to do this, and is there a better way to do this, say a hash list or something? BTW, isn't monday defined as a constant that always equals "blah!" It always has for me. -Original Message- From: Randy Johnson [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 03, 2001 9:44 AM To: Ernest E Vogelsinger; Randy Johnson Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Converting String to Variable it may look weird but that is the way it needs to be done. here is a better example $str=myfunct() this returns monday then i want the monday to turn into this $monday so i can do this $monday="BlaH"; thanks randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] last inserted record
Assuming that you do have a primary key, how can you grab the last record you inserted? Can you use @@IDENTITY, or something like that? "Christian Reiniger" [EMAIL PROTECTED] wrote in message 01030310383101.00589@chrisbig">news:01030310383101.00589@chrisbig... On Saturday 03 March 2001 05:16, you wrote: i'm having a little bit of problems with a little mysql table i'm using. the table has no primary key nor index nor nothing. i was wondering if it's possible to select the last inserted record of a table with this characteristics. Add a primary key. now. Accesses without that will be painfully slow. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "These are the people who proudly call themselves "hackers" -- not as the term is now abused by journalists to mean a computer criminal, but in its true and original sense of an enthusiast, an artist, a tinkerer, a problem solver, an expert." - ESR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] script output doesn't show up
Here is the code ?php $connectionid = odbc_connect("usctoday","",""); $resultid = odbc_do($connectionid,"SELECT S_FNAME, S_LNAME, S_BIO FROM STAFF;"); $numrows = odbc_num_rows($resultid); for ($i = 1; $i=$numrows;$i++) { odbc_fetch_row($resultid); $fname = odbc_result($resultid,"S_FNAME"); $lname = odbc_result($resultid,"S_LNAME"); ? h2?php echo("$fname"); ? nbsp; ?php echo("$lname"); ?/h2 ?php } odbc_close($connectionid); ? Problem is that the script output doesn't show up. Any idears? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variable variables
Okay, I read about this feature in the php manual. What I can't figure out is why in the world would anybody want to use this feature? Not to start a flame war, just would like an explanation of why this feature is useful. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Variable variables
Okay, that makes a little sense, but isn't there some sort of collection that will do the same thing (coming from vb). -Original Message- From: Jason Stechschulte [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 6:38 AM To: John Meyer Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Variable variables On Tue, Mar 13, 2001 at 06:36:10AM -0700, John Meyer wrote: Okay, I read about this feature in the php manual. What I can't figure out is why in the world would anybody want to use this feature? Not to start a flame war, just would like an explanation of why this feature is useful. I've really only used them once, but they were handy for that situation. I had a column in a mysql table that was a set column of user privileges, and I wanted to register every value in the set as a session variable. horridcode for($i = 0; $i sizeof($privs); $i++) { $$privs[$i] = 1; session_register($privs[$i]); } /horridcode -- Jason Stechschulte [EMAIL PROTECTED] -- I surely do hope that's a syntax error. -- Larry Wall in [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Good Free PHP Editor?
Actually, I picked up htmlkit when it was mentioned in this group and it's just as good as Visual InterDev, in my opinion. -Original Message- From: Jens Nedal [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 13, 2001 6:58 AM To: Angerer, Chad; 'Simon Garner'; Boget, Chris; [EMAIL PROTECTED] Subject: Re: [PHP] Good Free PHP Editor? About good editors with FTP inbuilt on the Windows side. Most of the FTP features are crap! Completly. The only Editor i know that works good with its inbilt FTP feature is BBEdit, but that again is another platform. BUT if you want a good combination on Windows side you could use Ultraedit and FTP-Netdrive. That programm maps FTP-Host to your Explorer and does all teh upload etc. So you just open and write and thats it. No messing around. regards, Jens on 12.03.2001 21:48 Uhr, Angerer, Chad at [EMAIL PROTECTED] wrote: Yes I use it with NT and run into occasional memory management problems as well. It is a great editor but has small issues that really can annoy a person. Also the FTP engine blows. It can be most unpredictable. Chad -Original Message- From: Simon Garner [mailto:[EMAIL PROTECTED]] Sent: Monday, March 12, 2001 2:43 PM To: Boget, Chris; [EMAIL PROTECTED] Subject: Re: [PHP] Good Free PHP Editor? From: "Boget, Chris" [EMAIL PROTECTED] HomeSite is great. www.allaire.com - not totally free I'm afraid, but there is an eval version. - runs under Windows yes - supports syntax highlighting for lots of languages including HTML, PHP, Perl, SQL, ASP (VB/JS). - can edit multiple files yes - shows line numbers in gutter on left hand side - supports regular-expression based search replace across multiple files/directories - nice interface. Has the worst memory management of any software I've ever used. I have to reboot at lest 10 times a day when I use it. The support forum on their site is filled with complaints on this issue. Their response to this issue was not to fix the memory leak (or whatever it is) but to issue a warning when resources are getting dangerously low to give you the opportunity to save all your work before you reboot. Beyond that, their stance is "Well, if you don't like it, return it and we'll give you a refund". If this wasn't the only piece of software that handled projects the way we needed, we'd have thrown out this piece of garbage software a *long* time ago. Chris Running under Win2K I can have HomeSite 4.5.1 open for weeks, working on 10+ files, without any problems whatsoever. However, I used to run it under Win98 and it would crash 1-2 times per day... Regards Simon Garner -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: PHP vs. ASP
Just a couple of thoughts here: 1. Now() outputs the date, so ASP does have that. 2. I hate the concept of saying that one of these products is superior to the other. Why not just lay out the technical points of both, and let the reader decide. I'm okay with somebody choosing ASP (or PHP) as long as they are basing it on the facts and there particular needs; what I don't like are advocates (read a**holes) turning this into a heated debate devoid of any facts or basis in reality. BTW, I use both and have used both. I'm more concerned with results, not egos. John Meyer Q: What do you do if your linux server crashes. A: First, find a candle...*G* Original Message Follows From: Mike Eheler [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] Re: PHP vs. ASP Date: Wed, 09 Jan 2002 10:57:27 -0800 Well being a former ASP programmer and a current PHP programmer I think I can help you there. The key point is ease of use. PHP provides far more functionality than ASP (try finding a function to print out the date in ASP.. yeah, I thought so), while at the same time giving you access to low-level areas of the language so that you can really make it do whatever you want. Oh yeah, and it's OpenSource. Make it do what you want, and if that doesn't suit your fancy, then change it :) ASP costs -- the server (be it Windows or Unix-based) is gonna cost ya, any extensions to do more advanced things (such as creating images on the fly) is gonna cost ya.. cost cost cost. With ASP I was constantly running into roadblocks because of the way it works. Let's take form submission.. or beyond that.. uploading FILES. You can do it the long, hard way (write your own MIME handler and parse the incoming binary data), or the easy way (shell out $$$ to pay for a professional activex com object to do the job for you). And if that wasn't enough. ASP is just plain slower. Well, that's my 2 cents. There's plenty of more points that could be said, but I think this should give you some good arguments to start with. Mike Jake wrote: Hello there, I need some help. I have to do a technical report(about 2200 words) comparing PHP to ASP. I have already decided to make PHP the winner becasue it is superior. But I am kinda stumped on what areas to compare the two. If you could help me out in suggesting some possible areas of comparison. Keeping in mind that I need about the same amount of info on both PHP and ASP. Also if you could point me in the right direction by including some web links that deal with the topic. Thank You, Jake -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mailing to 19000 users
How about croning the job and splitting up the load as you go. - Original Message - From: Mostafa Al-Mallawani [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 27, 2002 11:23 PM Subject: [PHP] mailing to 19000 users hi, does anyone know how to send mail to 19000 users using the mail() function, I need to create a mailing list of this number of users and looping on 19000 users takes up a heck of a lot of resources...any solutions? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php vs asp
You can use ASP with Mysql, as long as you have myodbc installed on your machine. For me, ASP has been a bit slower, but you can still use it. - Original Message - From: liz lynch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 28, 2002 7:14 AM Subject: [PHP] php vs asp can someone tell me whether or not asp can be used with mysql and is there any drawbacks to using it as opposed to php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Php is serversided????
Two ways this is possible: 1. The user has selected an item and hit the submit button, thereby sending everything to the server and it is working there. 2. The user comes in from a different link, different server, or has a cookie on their machine. - Original Message - From: Morten Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 13, 2002 12:56 PM Subject: [PHP] Php is serversided Hi, I don't understand... Everybody says PHP is server based, so everything is calculated before the user sees it in his browser. But if that is the case how is it then possible to use if-statements. Wouldn't that mean that the if-statement has been executed before the user makes a selection? Please explain it to me, Morten -- 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] Why can't this code display my result?
Could you please give us some error messages, please? ?php $connect = mysql_connect(localhost,user_name,password); $select_data = mysql_select_db(ardani_cd_collection); $query = SELECT * FROM main where description = '$song_title'; $result = mysql_query($query); while($row = mysql_fetch_row($result)) {echo table border='1',TR,TD,$row[1],/TD,TD,$row[2],/TD,TD,$ro w[3],/TD,TD,$row[4],/TD,TD,$row[5],/TD,/TR,/table ;} ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Code works fine on Apache, but not on PWS.
Instead of posting the code, I'll give you the link: http://www.phpbuilder.com/columns/bealers2904.php3?page=1 Short and long of it is the subject line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] problem with a hacker
I'm currently running my site on a win2k server, I'm using PHP for my tag board. Today a hacker managed to overwrite the text file I was using to store all the messages, which really isn't that big a surprise considering the permissions to the folder it is kept in are wide open thanks to my hosting company. You must hunt this scum down and cut out his guts using only a flint rock and some string Or this that the rite for manhood? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Printf fails on large files
At 05:14 PM 8/17/01 -0300, Inércia Sensorial Trabalhando wrote: Hi All, A friend of mine said his printf is failing when he parses a variable from a 4.5 mega file. On smaller files, it works fine. There's a limit on the printf or somewhere else? Thanks. Is he throwing the _entire_ 4.5 MB file into that variable and trying to print that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Protecting include files
At 08:26 PM 8/18/01 -0700, Rasmus Lerdorf wrote: Files ~ \.inc$ Order allow,deny Deny from all BTW, .inc files can include PHP code that is executed, right? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Checking FTP server response
At 03:03 PM 8/20/01 -0700, CC Zona wrote: To test for a valid http address, I open a socket, pass a HEAD or GET request, and look for a status code in the response headers. What should I send to an FTP server to do a similar test? Why not just try and connect to it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php-counter
At 05:49 PM 8/22/01 +0200, you wrote: hi! do you know an easy-to-use-php-counter, which uses mysql to store the data? gert Not off hand, but I could probably program one within the day. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help with php mysql and images...
A couple of things: 1. ASP is not dumb. It was just written by Microsoft. Seriously, though I'd learn both, it would make you much more marketable. 2. First off, create the database. Then ask yourself what are the steps that you have to go through. What your probably looking at right now is selecting the information off of the database and reporting it. I'd _definitely_ think about sitting down with the MySQL manual and the PHP manual, both of which are availible free. Also, look for a good MySQL/PHP book (my favorite is MySQL/PHP Database Applications, by Jay Greenspan and Brad Bulger). You have some work ahead of you, but not a lot. At 10:09 AM 8/22/01 -0700, you wrote: Don't know if this is the place to ask this, but I'll find out soon. I'm trying to create a database in mysql that will hold information About users, it will hold the path to a picture, and it will resize Images on a page... sorry that's a really blunt description. A user will goto this certain page... they bring up the page and the page it self, coded in php, will pull out of the database, the names of everyone that is registered to this certain page. It will list it all in alphabetical order. For anyone interested... the page I'm working on is here... http://www.hypoparathyroidism.com/gallery.asp I am having trouble figuring out how to do it, I'm new to mysql And php actually... I just started learning it about a month ago But I've done some pretty impressive stuff for php. I guess I just need some ideas on how to go about doing this project. Going to that page will help you figure out what I have to do. You see the guy that programmed that page before, did it all In asp. And I don't know anything about asp, and I was told Not to learn anything about asp because it is dumb (no offense To anyone intended) Any help appreciated... mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strange error
At 03:12 PM 8/22/01 -0400, you wrote: Hi, I get an error message which I can't figure out. Its a Parse error: on line 142 which is the last line of the page containing absolutly no code. The last line of code is simply /HTML..Did anyone have a similar experience? Can anyone help me out please? Try to post some code, particularity the lines that come just before line 142. A parse error usually means that something on the previous line is wrong, at least, that's been my experience. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Any point in learning ASP/JSP etc?
At 01:10 AM 8/23/01 +0100, you wrote: Or is PHP the be-all and end all? I know its strong points, but what are the WEAK points of PHP? - seb PHP isn't default on Microsoft systems You have to learn a new language for PHP: ASP is basically either VBScript or JScript around some objects. To answer the question in your subject line, I think that if you were interested in programming, you should want to learn any new technology that you could. Plus, the more languages, the more employable, I would think. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Any point in learning ASP/JSP etc?
At 01:29 AM 8/23/01 +0100, you wrote: Ah ha, but am I better off becoming a PHP guru or a jackofalltrades-notverygoodatanyofthem kind of person ;-) I don't know. I've learned both PHP and ASP, and neither of them have decreased the other in terms of learning. The fact is, you are going to learn what you are going to learn. If you want to go with PHP only, that's your choice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] RE: What development environment do you use for PHP?
At 01:21 PM 8/27/01 -0700, you wrote: I keep my web documents in a CVS repository on a Linux box, and use WinCVS (GNU) to check files in and out on my WinNT desktop. I use ConTEXT (freeware) for editing. Documentation and help are always available at php.net and google.com. I have an Apache 'staging' server, and to keep the document tree up to date with the CVS repository I run a cron job that performs 'cvs update -d' every five minutes from the server document root. Where do you get WinCVS , by the by? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PWS
At 07:27 AM 8/28/01 -0700, you wrote: I have installed PHP CGI 4.0 on my Win 98 machine with PWS and tried this script that I put in the wwwroot directory and called test.php3: ?php $myvar = Hello World; echo $myvar; ? I called the page from my browser like this: http://localhost/test.php3 Why not just name the page test.php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] What does PHP stand for?
At 05:15 PM 8/28/01 +0228, you wrote: It's actually a recursive acronym, like GNU: From the manual: PHP, which stands for 'PHP: Hypertext Preprocessor', is an HTML-embedded scripting language. J Am I making things up, or Did it stand for Perl Hypertext Preprocessor at one time? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Suppressing error messages
It seems to have slipped me little mind, but how do you suppress error messages? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Posting to oneself
Two questions: 1. Can I tell a form to post to itself without specifying the name of the web page? 2. If I have a function on one page called by another, will this resolve correctly? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Posting to oneself
At 12:07 AM 8/30/01 +0200, you wrote: So sprach »John Meyer« am 2001-08-29 um 15:57:02 -0700 : Two questions: 1. Can I tell a form to post to itself without specifying the name of the web page? form action=?php echo $PHP_SELF;? I am getting this error: Undefined variable: PHP_SELF -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Posting to oneself
At 03:18 PM 8/29/01 -0700, you wrote: if you are within a function, try doing this first: global $PHP_SELF; Tried that, same error. BTW, FYI: Apache 1.3.20 (Win32) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] determining the pixel width of a string
Is there anyway to determine the pixel width of a string? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Is there anything in here that could be considered a parse error?
if (empty($DidSurvey[$p_surveyid])) { if (is_array($p_answers)){ foreach($p_answers as $value) { error line-- $sql = INSERT INTO RESULTS(SURVEY_ID, ANSWER_ID) VALUES( . $p_surveyid . , . $value . );; mysql_query($sql); } else { -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File read Parser error
At 11:53 PM 8/30/01 +0200, you wrote: Gary wrote: Can someone tell me why I am getting an error for the second line below. It works locally but not live. ?php $filename = www/name/test/free.txt $toread = fopen($filename, 'r'); $contents = fread($toread, filesize($filename)); fclose($toread); echo $contents; ? It would be useful if you would point out which error it is you are encountering. my guess would be that you need a semicolon on the first line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Lists are back up
At 12:15 PM 6/18/2001 -0700, Rasmus Lerdorf wrote: We have re-enabled the PHP mailing lists. They are now running from a temporary machine sitting on the floor of my spare bedroom. A more permanent home is in the works. -Rasmus Does this also refer to the news server? John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing
Re: [PHP] Is there a user group in Colorado?
At 11:24 AM 6/22/01 -0600, Unni wrote: Is there a user group in Colorado? Thanks If there is one, I'd like to be a part of it. John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Percentages
On Sun, 24 Jun 2001, David Robley wrote: On Mon, 25 Jun 2001 12:04, Tim Thorburn wrote: Hi, Working on a site that needs some billing information. Once upon a time done in ASP where we had the option to use the FormatPercent command - is there an equivalent command within PHP? Using PHP 3.0.16 Stab in the dark as I dunno exactly what FormatPercent does - number_format, printf or sprintf. Takes a decimal number and formats it as a percentage. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to prevent people from downloading images
On Tue, 03 Jul 2001, [EMAIL PROTECTED] wrote: rodrigo [EMAIL PROTECTED] writes: I need a way to prevent the download of some images in a web page. I also require that these images be presented within the web page. That is, I don' want them to be displayed in another window. They should remain embedded in the web page along with the rest of the page elements. I've seen a neat trick in ASP (*boo* *hiss*) where you could take the image, and binary write it out to the web page as the src. Could that be done here? Or another trick might be to show them a low res version of the graphic, then require payment before you give the the high res one. --- John Meyer [EMAIL PROTECTED] Programmer Those who sacrifice liberty for security deserve neither -- Ben Franklin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How to prevent people from downloading images
On Wed, 04 Jul 2001, ..s.c.o.t.t.. wrote: there are two answers to this: 1) it cannot be done. as long as that image is on the person's computer screen, it is physically impossible to prevent that person from saving the image and using it. (a simple tap of the print screen will take a screenshot on windows machines, as someone else mentioned) Agreed, but how about only showing a very small image. Large enough for them to know what it is, but not large enough that saving it would do them much good. -- John Meyer [EMAIL PROTECTED] Programmer Those who sacrifice liberty for security deserve neither -- Ben Franklin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem writting to file...
James Bartlett [EMAIL PROTECTED] wrote: Hi, I'm trying to write data to a file but for some reason it will not store numbers in the file...Here's the code I'm using...(as an example) ?php $fp = fopen(./data.txt, w+); $counter = 0; while ($counter 6) { fwrite($fp, $counter . \n); $counter = $counter +1; } fclose ($fp); ? Is it writing anything out? -- John Meyer Programmer [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] foreach loop
When I go through a foreach loop, are the values of the individual items in the array changed? For instance: $variables = array($author_firstname, $author_lastname, $author_dob, $author_dod, $author_bio); foreach($variables as $value) { $value = strip_tags($value); $value = AddSlashes($value); } will the values be changed outside of the loop? John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Global Variables -- why not have them?
At 02:55 PM 7/7/01 -0400, Mitch Vincent wrote: I've been using PHP for several years now and one question has plagued me the entire time. Why doesn't PHP have global variables? Before someone says it, I do know PHP sort of does have global variables, but having to specify GLOBAL in any function I want to see that variable in disqualifies it from being a truly global variable IMHO.. I suppose I'm more curious than anything else.. Thanks! -Mitch I don't know what the makers of PHP had in mind, but from my experience, having truly global variables is a very bad idea. In fact, you should be trying to limit your need of global variables, so that your program can count on the integrity of the variables. John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] arrays in forms.
Hi, I have a multi-select listbox set up like this: Author (you are able to select more than one.a href=addauthor.phpClick here to add a new author/a)br: select name=author multiple size=5 ?php $result = mysql_query(SELECT AUTHOR_ID, AUTHOR_FNAME, AUTHOR_LNAME FROM AUTHORS;) or die(mysql_error()); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { $option = option value= . $row[AUTHOR_ID] . . $row[AUTHOR_FNAME] . . $row[AUTHOR_LNAME] . /option; echo $option; } ? /selectbr I then have a bit of code that parses through and checks which authors they selected, if any. if isset($author) { if is_array($author) { foreach($authors as $key=$value) { $query = INSERT INTO BYLINE(TITLE_ID, AUTHOR_ID) VALUES( . $titleid . , . $value . );; mysql_auery($query) or die(echo mysql_error()); } } else { $query = INSERT INTO BYLINE(TITLE_ID, AUTHOR_ID) VALUES( . $titleid . , . $author . );; mysql_auery($query) or die(echo mysql_error()); } } What I'd like to know is, is this correct, incorrect, redundant, etc? John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] arrays in forms.
mysql_auery($query) or die(echo mysql_error()); By the way, I know this line should be mysql_query John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how can i creat a file and write a string to it!
At 06:27 PM 7/15/01 +0100, sunny AT wde wrote: i've been looking for an adequate answer all morning in the archives, fwrite($file, $articletext); Don't you have to do a fopen beforehand? John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Example high-profile PHP sites
At 01:14 PM 7/26/2001 -0400, Maurice Rickard wrote: While I do appreciate people's contributions, let me frame the discussion a little. The person I need to convince is an administrator of an organization within North America, and he's never heard of PHP. The response I'm hoping to provoke in him is something like this: You mean _ is using this PHP thing? Wow! They know what they're doing, so we'd better use it, too! Does this help frame things? Thanks for the suggestions! -Maurice I'd probably suggest using more of a What PHP can do tactic rather than Who's using PHP. I'm sorry, but the latter tactic seems like a jumping on the bandwagon approach. John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] separating strings from extensions
Daniel Brown wrote: On Feb 17, 2008 5:37 PM, nihilism machine [EMAIL PROTECTED] wrote: i am using this code to get the extension of a filename: $extension = strtolower(strrchr($fileName,.)); how can i get the text BEFORE the . (period) You can STFW and RTFM. This list should never be your first place to ask simple questions. In any case ? $split = explode('.',strtolower($fileName)); $name = $split[0]; $ext = $split[1]; ? Flame job aside, that's going to fail on a compound extension such as .tar.gz by just returning .tar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] separating strings from extensions
Børge Holen wrote: On Monday 18 February 2008 00:10:30 John Meyer wrote: Daniel Brown wrote: On Feb 17, 2008 5:37 PM, nihilism machine [EMAIL PROTECTED] wrote: i am using this code to get the extension of a filename: $extension = strtolower(strrchr($fileName,.)); how can i get the text BEFORE the . (period) You can STFW and RTFM. This list should never be your first place to ask simple questions. In any case ? $split = explode('.',strtolower($fileName)); $name = $split[0]; $ext = $split[1]; ? Flame job aside, that's going to fail on a compound extension such as .tar.gz by just returning .tar so. it.will.fail.this.one.to.txt and a fix would also fail because you would have to hardcord everygoddamn ending if thats what youre after. How many do you care to count for? I would say stick with the last dot, if its not particulary often you stumble over those .tar.bz2 endings. You could also stick with the first, i.e.: ? $split = explode('.',strtolower($fileName),1); $name = $split[0]; $ext = $split[1]; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how PHP is batter?
Muhammad Hassan Samee wrote: ASP.net VS PHP? how PHP is batter? Without context that question is meaningless and only serves as troll bait. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Swear filter ideas
Richard Lynch wrote: Don't. Trying to solve a social problem with software hacks never works out well. :-) Taking the emotion out of this, if you wanted to catch any list of words (the Esperanto dictionary, the words to that last song that got ground into your head), how would you do it? I agree unless you get a really good fuzzy logic algorithm going, you're never going to be able to do it 100 percent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
On Monday 16 July 2007, Richard Davey wrote: As a published author I would *rather* people read a PDF of my work, than not read it at all because they couldn't afford the printed version. But that is my choice to make, not yours. I would never be so two-faced as to rant about pirates and 'stealing' software, but I hate with a vengeance those who claim what they've done *isn't* stealing. That's just insanity. When it comes down to it, it IS black or white - you either paid for it, or you didn't, and anyone who claims there is some middle ground based on the digital nature of the item is living in a fucking fantasy world. Wake up and smell the coffee. Really? Did you cite and pay every source you used in your book? And what about those of us who downloaded books that we've bought? Seriously, I think you need to get a grip yourself. When and if you become that popular, and when and if PHP becomes that popular, then you can discuss rampant pirating of PHP books online. But until then, it's more theoretical. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
David Powers wrote: Richard Davey wrote: First off, I'd like to know where you got that 2,000 number. Closest I could find was 456 on TPB, and I'm guessing that's 456 people that have downloaded the torrent. Not necessarily 456 that have completely downloaded the book. I didn't post that figure, but it doesn't matter if the actual numbers are 2000 or just 2, it doesn't change a thing. I posted the figure 2,000. There are two listings on that site for my book, PHP Solutions. One has been downloaded 457 times. The other has been downloaded 1,626 times. Although I'm delighted that my book has proved so popular, I would be even more delighted to get some financial reward for my efforts. Fortunately, a lot of honest people have bought legal copies, but certainly not enough to put me in the fat-cat league. :( David Powers Even though there has been 2,000 downloads (very likely of the small torrent file), I don't think you've gotten 2,000 complete downloads of the book. On the 456 downloads, for instance, I noticed only 11 seeders. You aren't really going to be able to download that fast (if you are at all) by sipping from 11 sources. And books have not been the fastest of all downloads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
tedd wrote: At 9:26 AM -0500 7/17/07, Larry Garfield wrote: On Tuesday 17 July 2007, tedd wrote: Once I have written code or words, the time I have spent on that is gone. I will never get that time back, regardless of whether or not I get paid for it after the fact. Ok, then it would be an acceptable excuse for your employer not to give you a paycheck -- after all, you already spent the time, right? That doesn't make sense dude. I don't mean to be putting words in your mouth, but it sounds like your claim here is absurd. I'm not arguing copyright, or any other government bullshit, I'm simply saying that we all work for someone and we all should be paid for our efforts. An author of any digital material (code, books, music, whatever) should be paid for their effort just like anyone else. The idea that because the work product is digital, and thus there was no effort expended in making a copy, and thus implies no obligation to the author, is just plain wrong. I've written software all my life and I have on numerous occasions run into individuals who ask something like Can you get me a copy? It's not worth it for me to pay for it because you add in whatever reason you want. I would just like to get a copy. And you think that if somehow, somebody was able to magically lock down all copies, all of those people would pony up the money and pay you or buy that software? It's the assumption that the music and movie industry make that if only they could lock down all those places the money would come flowing in. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
Richard Lynch wrote: On Mon, July 16, 2007 7:15 am, tedd wrote: I have to agree with Col on this one. Books are not shareware, freeware or open source. They are written for profit and anyone wanting to pirate the books are stealing, plain and simple. And if anyone thinks people will buy the book if it's useful to them, then that's just silly thinking. While some people may, most won't. Dotan, I would report the offending link to the publishers, that's what the authors would do. While I would prefer that authors/publishers provide a cheap/free PDF/eBook version of their book, it is their right, after all their hard work, to choose in what formats to sell/give it. And to say that books are not shareware seems to toss a lot of authors by the side who freely give their work out for one reason or another. Just as there is open source software, there is also open source documentation. Check out the GNU Free Documentation License if you don't believe me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
There is a very very important difference. Stealing/theft is a criminal offence. Copyright infringement is not. For you to be prosecuted for copyright infringement the injured party must bring a civil case. This is a fundamental difference. The reason everyone thinks the terms theft and stealing cover it is because, as I've previously asserted, bodies like the MPAA and RIAA keep referring to it as such. Just because they do that doesn't make it any more accurate. -Stut Although on one level, I say we go with it. I'd love to see those executives at Sony who authorized the rootkits thrown in the slammer for 'breaking-and-entering' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Pirate PHP books online?
Larry Garfield wrote: On Wednesday 18 July 2007, tedd wrote: And just because they do, doesn't make it any less accurate either. I don't care if Hitler agreed with me, there is a fundamental wrongful act of taking something that is not yours regardless of what you, and others, may call it. First Hitler and the Nazis[1] reference. You lose! Thanks for playing. :-) [1] http://en.wikipedia.org/wiki/Godwin's_Law Dang I didn't know that existed, thanks for the reference now I have something for all my other discussions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class ADODB - Method GenID() in MySQL
Renne Rocha wrote: Hello, I am using the ADODB class to connect to a MySQL server. I am trying to generate an ID with the method GenID(), but when I tried this: $id = $db-GenID('table'); The value of $id is equal to zero. I know that MySQL doesn't use sequences like PostgreSQL does (I've used this code in a PostgreSQL project), but in the documentation of ADODB I saw that it is possible to use it. Is there any trick about how to make it work? Thanks. Okay, I'd have to ask at this point what are you using the ID for? If you're generating it for an insert, just put null on the primary key if it's auto-increment and MySQL will do it for you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Class ADODB - Method GenID() in MySQL
Wouldn't this: $id = mysql_insert_id(); $query = UPDATE tablename SET id= . ($id + 1); $result = mysql_query($query); Be a little simpler. But like I said, I'm confused over the need for this in the first place, seeing as how an auto_incremented primary key is self-descriptive. or are you saving this somewhere else in the DB? On 7/19/06, chris smith [EMAIL PROTECTED] wrote: On 7/19/06, Renne Rocha [EMAIL PROTECTED] wrote: Hello, I am using the ADODB class to connect to a MySQL server. I am trying to generate an ID with the method GenID(), but when I tried this: $id = $db-GenID('table'); The value of $id is equal to zero. I know that MySQL doesn't use sequences like PostgreSQL does (I've used this code in a PostgreSQL project), but in the documentation of ADODB I saw that it is possible to use it. Is there any trick about how to make it work? You'll need to insert a value into the table first, then you can do: $query = UPDATE tablename SET id=LAST_INSERT_ID(id+1); $result = mysql_query($query); $id = mysql_insert_id(); This is in the mysql docs somewhere... -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- I'm American, fatboy. What's your excuse?
Re: [PHP] Basic PHP knowledge test
John Nichel wrote: What does $_POST['x'] mean? What does $ in front of a string of chars without quotes mean? That does register globals mean? Is it possible to run php as a cgi script? When it is necessary to use 'var' in php code? I would probably agree that a problem would be better. Here's an idea, have one of your HR people take some existing code and do something to it to give it a bug, then have the guy fix it, and see how close he comes to what's there. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Difference between 2 time entries
|Found this on the PHP web site, you can add the conversions as the first lines in the functions. function callDuration($dateTimeBegin,$dateTimeEnd) { $dif=$dateTimeEnd - $dateTimeBegin; $hours = floor($dif / 3600); $temp_remainder = $dif - ($hours * 3600); $minutes = floor($temp_remainder / 60); $temp_remainder = $temp_remainder - ($minutes * 60); $seconds = $temp_remainder; // leading zero's - not bothered about hours $min_lead=':'; if($minutes =9) $min_lead .= '0'; $sec_lead=':'; if($seconds =9) $sec_lead .= '0'; // difference/duration returned as Hours:Mins:Secs e.g. 01:29:32 return $hours.$min_lead.$minutes.$sec_lead.$seconds; } | Chris Grigor wrote: Morning all, I am looking to get the differnce in hours / minutes between 2 values. Currently I have 2 time entries being retruned from mysql, one which is a start time and the other which is a finish time. So $start = '13:12:17'; $finish = '23:12:17'; How would one get the differnce between these 2 times?? I have looked at using the following but am not to sure function timeDiff($firstTime,$lastTime) { // convert to unix timestamps $firstTime=strtotime($firstTime); $lastTime=strtotime($lastTime); // perform subtraction to get the difference (in seconds) between times $timeDiff=$lastTime-$firstTime; // return the difference return $timeDiff; } //Usage : echo timeDiff($start,$finish); Thanks Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] OT promotion candidates needed
Director, nah. Wait until you are promoted to Dictator of IT. That's where the real power begins. BWAHAHAHAHAH...cough. Enough maniacal laughing for now, back to work. -Original Message- From: Ligaya Turmelle [mailto:[EMAIL PROTECTED] Sent: Sunday, August 06, 2006 7:16 PM To: Jay Blanchard Cc: [php] PHP General List Subject: Re: [PHP] OT promotion candidates needed Jay Blanchard wrote: Good news/kinda' bad news (but not really); I am proud to say that I have been promoted to Director of IT in my little corner of the world. Congrats on the promotion - Love the pretty title. Does it come with letters even? ;) -- life is a game... so have fun. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: non-text data
Gd, BTW, came into this late, have we gotten the old store your images in the filesystem and save the file name in the database argument yet? -Original Message- From: Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem [mailto:[EMAIL PROTECTED] Sent: Sunday, August 13, 2006 10:21 PM To: Chris Cc: mysql@lists.mysql.com Subject: Re: non-text data On Mon, Aug 14, 2006 at 10:42:50AM +1000, Chris wrote: Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem wrote: I use SELECT all from * ... and one row is a gif. How do I get that gif to appear as a gif and not text? In your connecting programming language. Mysql doesn't know or care whether it's a gif, pdf, word doc or anything else. Whatever programming language you are using to connect to mysql and fetch the data will be able to convert that binary data and display an image. PHP? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: non-text data
Depends on how pugnacious I'm feeling, awscrewit, you go for it. -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Sunday, August 13, 2006 10:41 PM To: John Meyer Cc: 'Dave Shariff Yadallee - System Administrator a.k.a. The Root of the Problem'; '[php] PHP General List' Subject: Re: [PHP] RE: non-text data John Meyer wrote: Gd, BTW, came into this late, have we gotten the old store your images in the filesystem and save the file name in the database argument yet? Nope, haven't done that one yet, do you want to start it off or shall I? ;) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] readdir() question
I have a script to list the files in a directory: select name=letters ?php $open = opendir(.); while ($file = readdir($open) != false) { ? option value=?=$file??=$file?/option ?php } ? /select /form And all I am getting are 1s. I think I'm doing it right, what is the disconnect? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] readdir() question
Richard Lynch wrote: On Tue, August 15, 2006 12:04 pm, John Meyer wrote: I have a script to list the files in a directory: select name=letters ?php $open = opendir(.); while ($file = readdir($open) != false) { ? option value=?=$file??=$file?/option ?php } ? /select /form And all I am getting are 1s. I think I'm doing it right, what is the disconnect? It's not a readdir question. It's an Order of Operations question. :-) $file = readdir($open) != false You probably believe that PHP is going to magically know that you want this bit: readdir($open) != false to be done first No, and I fixed that. What I'm wondering about is why this false !== ($dirhandle = opendir('letters')) works, but this ($dirhandle = opendir('letters')) != false does not -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] readdir() question
Richard Lynch wrote: Do you really mean opendir() or do you mean readdir() ??? readdir(). The point is why do you need to put it as !== vs. != -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trying to create an encryption method
I'm trying to create this encryption method for puzzles (nothing super secret, just those cryptograms), but this seems to time out, can anybody point out what I'm doing wrong here: for ($i=1;$i=26;$i++) { $normalAlphabet[$i] = chr($i); } //now, to shuffle for ($j=1;$j=26;$j++) { do { $k = rand(1,26); } while ($k == $j || (strlen(trim($normalAlphabet[$k])) === 0)); $arEncryptedAlphabet[$j] = $normalAlphabet[$k]; $normalAlphabet[$k] = ; } $arNormalString = str_split($normalzedString); $encryptedString = ; for ($i=0;$icount($arNormalString);$i++) { if (ord($arNormalString[$i])=65 ord($arNormalString[$i])=90) { $encryptedString = $encryptedString . $arEncryptedAlphabet[ord($arNormalString[$i]) - 64]; } else { $encryptedString = $encryptedString . $arNormalString[$i]; } } return $encryptedString; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trying to create an encryption method
Modified the script, and that's what I needed, thanks. Jochem Maas wrote: $secret = HalloWorld; $encoded = ; $a = $b = range(a,z); shuffle($b); $c = array_combine($a, $b); foreach (str_split(strtolower($secret)) as $v) $encoded .= isset($c[ $v ]) ? $c[ $v ] : $v; var_dump($c, $secret, $encoded); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trying to create an encryption method
Adapted something from this list and that worked, thanks for the help. Richard Lynch wrote: On Sat, November 4, 2006 10:15 pm, John Meyer wrote: I'm trying to create this encryption method for puzzles (nothing super secret, just those cryptograms), but this seems to time out, can anybody point out what I'm doing wrong here: http://php.net/shuffle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do you do the ? mark after a filename
the ? is a delimiter between the url and the get variables, which are set by the script itself, either through forms or by scripts. Thomas Bonham wrote: Hi All, I keep seeing the ? mark after many file names index.php?id=234. So what I would like to know is how do you make them. I have heard that they can make a programs life sampler when doing somethings with a database. Thank you, Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] one click - two actions?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Not to be rude or anything, but if you want to do two things with one click, wouldn't the javascript list be the place you would want to go? Mel wrote: Could someone please help me figure out how to show some description (where applicable) at the same time as I show an image, when I click on a link, without repeating the entire query? The image and the description are both in the same table in my database. I now show the image when I click on the link which is good, but the description stays on at all times instead of appearing only when active. http://www.squareinch.net/single_page.php This is the code I have for the image area: /* query 1 from client */ $query = SELECT * FROM client where status='active' or status='old' order by companyName; $result = mysql_query($query) or die (Couldn't execute query); while ($aaa = mysql_fetch_array($result,MYSQL_ASSOC)) { echo span class='navCompany'{$aaa['companyName']}/spanspan class='navArrow' /span\n; /* query 2 from job */ $query = SELECT * FROM job WHERE companyId='{$aaa['companyId']}'; $result2 = mysql_query($query) or die (Couldn't execute query2); foreach($aaa as $jobType) { $bbb = mysql_fetch_array($result2,MYSQL_ASSOC); echo span class='navText'a href='single_page.php?art=.$bbb['pix'].'{$bbb['jobType']}/a/span\n; } echo br; } ? /div div class=navbox3?php $image = $_GET['art']; ? img src=images/?php print ($image) ? alt=Portfolio Item border=0 width=285 height=285/div This is the code I have for the description area: /* query 1 from client */ $query = SELECT * FROM client where status='active' or status='old' order by companyName; $result = mysql_query($query) or die (Couldn't execute query); while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { /* query 2 from job */ $query = SELECT * FROM job WHERE companyId='{$row['companyId']}'; $result2 = mysql_query($query) or die (Couldn't execute query2); $url = mysql_query($result2); foreach($row as $url) { $row = mysql_fetch_array($result2,MYSQL_ASSOC); if (url={$row['url']}) echo span class='navText'a href='{$row['url']}'{$row['web']}/a/span; } echo br; } ? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFFWGE2bHd4gglFmoARAnNWAJ0fs+NHm5MbNwDpm3E7Flu3giU+LQCgkF7O uCu6zhUFfviNC+aaxpNy+Vg= =NQVC -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regular expressions
Is there a way to make a regular expression to match on a particular way the letters are arranged? For instance, if you had a word: THAT It could match on any word in the dictionary that had the form: 1231 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular expressions
Darrell Brogdon wrote: Can you elaborate a little? Do you mean that you want certain letters to have a numeric representation? -D no, what I was meaning was in relationship to each other, whether they are the same letter or not. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular expressions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Okay, what I am referring to is cryptograms, where one letter is substituted for another. I would like to be able to list all the words in a dictionary that have that arrangement of their letters. Later on, I would like to be able to do an entire cryptogram that way. Dave Goodchild wrote: Is there a way to make a regular expression to match on a particular way the letters are arranged? For instance, if you had a word: THAT It could match on any word in the dictionary that had the form: 1231 preg_,match('/^(\w){1}\w\w\1$/'); would match the above on a single line for example, where \1 refers to the pattern captured in parentheses at the start. Try and be a little more specific in what you want to match, as regex is hard enough to start with - a detailed and clear description will elicit corresponding responses. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFFWwXkbHd4gglFmoARAooyAJ0S8R3JkLApczGxBA9FrOQQMZSGvwCgmNUX C9idJue2LWK1EL6gO6qttjg= =IqlT -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Coding...
I'd pick up a book Web Database Applications with PHP and MySQL, otherwise known as the Platypus Book, and use that. That will teach you a lot about logins, sessions, as well as using MySQL and PHP together. As far as the database name goes, that has nothing to do with the PHP file name. Jeff wrote: I am pretty new with PHP, but what I've learned in the last 3 weeks is pretty good I think so far! What I'm looking to do is create a login script, and have people being able to login. Now, I have pulled scripts from sites, and everything is working okay. But the problem I have with pulling scripts from other sites, is that the mysql databases are all different. How can I import from one database into the other, so basically all the databases are merged into one main? I also know that each PHP file has to be re-done and look for the new database name, for instance if it was user_name, and the default (Main) database is username .. That I Have to rename all the php files that have user_name to simply username. If anyone is willing to help out with the project I'm working on with another programmer? Hopefully being very cost effective .. or free :) :) Thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reading MS Excel?
On a side note, but going on the basis that the users are uploading .xls files and don't understand how to convert. Would it be better to use php's routines or to automate excel, convert it inside there, and then use the result? Leonard Burton wrote: On 12/28/06, Jiffy Slides Leonard Burton [EMAIL PROTECTED] wrote: HI Will, Is it possible to read Excel files and store the info to DB? If so how? It is best (well depending on the application) to save the files as .csv and then use fgetcsv. it will allow you to parse each line and cell in the file and then go from there. Take Care, -- Leonard Burton, N9URK [EMAIL PROTECTED] The prolonged evacuation would have dramatically affected the survivability of the occupants. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Hello
Edward wrote: How do I create a php document so that people in my nonprofit can vote on issues online through the organization's website? Thanks, Edward Start with PHP, add MySQL or your database of choice, mix and prepare. Serves 500+. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Not able to load the extensions
Apache 2.2 PHP 5.2.6 (as a module) Windows Relevant parts of php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = I:\php\ext extension=I:\php\ext\php_mssql.dll extension=I:\php\ext\php_mysql.dll Note: I did try it with just the name (php_mysql.dll) but it doesn't seem to work either way And httpd.conf: LoadModule php5_module I:\php\php5apache2_2.dll AddType application/x-httpd-php .php PHPIniDir C:\WINDOWS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev
Chris Lott wrote: Thanks for the advice-- I've run Linux without a GUI for a long time, so I'm quite familiar with hand compilations-- but I always wondered if I was just missing something with packaging systems that it seemed to REQUIRE hand-compilation to get a workable development LAMP system. Anytime I tried using packages some need seemed to force me back to doing it by hand. So I guess my more specific question would have been: Are there any distributions that actually TARGET developers and I Was curious about desktop tools. I own Zend but tend to use Homesite and Emacs in regular doses. Guess I will probably stick with Emacs and use Zend more. I know enough Vim to survive, but it just isn't me :) c I've found that Quanta is pretty good for my taste. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max unique number
Philip Hallstrom wrote: [snip] How do i get a unique max number from a mysql table column? [/snip] SELECT MAX(number) FROM table LIMIT 1; That might not be unique though... I'm wondering if the original poster is looking for AUTO_INCREMENT (ie. sequences) to ensure a unique id to use for insertion...? mysql_insert_id() should do the trick for an automatically incremented sequence. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where php at?
tedd wrote: Hi: Related to my cron problem -- where do you get the path to php? My phpinfo() says: http://www.xn--ovg.com/info.php reports it as: /usr/lib/php:/usr/local/lib/php If you're on a linux box, have you tried which php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Amazon WSDL
Hey, is it possible to use the Amazon WSDL within PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Amazon WSDL
Richard Collyer wrote: John Meyer wrote: Hey, is it possible to use the Amazon WSDL within PHP? Lookie what the first google entry for Amazon WSDL php was: http://www.onlamp.com/pub/a/php/2003/07/03/php_amazon_soap.html Richard Nice, now I need to navigate the bloody Amazon web services. Is it just me, or does it look like, just by browsing Amazon itself, you have to use Alexis to do web queries. Specifically, I'm trying to find out how to query using an ISDN. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Standard style of writing your code
Should we really have this arguement about a standard way of writing the code? This is PHP, an open-source project. Isn't that like asking existentialists to adopt a uniform code of conduct? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Configuring the error suppression
Is there anyway to make PHP normally suppress errors, but a piece of code that would show errors on a particular page? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Configuring the error suppression
IG wrote: John Meyer wrote: Is there anyway to make PHP normally suppress errors, but a piece of code that would show errors on a particular page? Sorry forgot to mention how you show errors on a particular page- you would use- ini_set('display_errors', '1'); But are you sure you want to do this? Showing errors to your users is NOT a good idea as it can open your server up to all kinds of security issues. Why not use the log parser idea that I said in my last mail? I didn't get that last e-mail, and I'm on a design web server, not an actual production server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Exceptions in PHP
I have the following script: try { $conn = mysql_connect(localhost,webuser,testme) or die(Could not connect); mysql_select_db(bookcollection,$conn) or die(Could not select database); //first, check to see if there is an author if ($_POST[neworoldauthor] == new) { $sql = SELECT * FROM AUTHORS WHERE FirstName=\ . $_POST[authorfname] . \ AND LastName=\ . $_POST[authorlname] . \; $retval = mysql_query($sql); if (mysql_num_rows($retval) == 0) { $sql = INSERT INTO AUTHORS(FirstName, LastName) VALUES(\ . $_POST[authorfname] . \,\ . $_POST[authorlname] . \); mysql_query($sql); $authorID = mysql_insert_id(); } else { $row = mysql_fetch_array($retval,MYSQL_ASSOC); $authorID = $row[AuthorID]; } } else { // it's an old author $authorID = $_POST[authors]; } //now, check titles $sql = SELECT * FROM TITLES WHERE TITLE_TITLE=\ . $_POST[title] . \; $retval = mysql_query($sql) or die(mysql_error()); if (mysql_num_rows($retval) == 0) { $sql = INSERT INTO TITLES(TITLE_TITLE) VALUES(\ . $_POST[title] . \); mysql_query($sql); $titleID = mysql_insert_id(); } else { $row = mysql_fetch_array($retval,MYSQL_ASSOC); $titleID = $row[TITLE_ID]; } //now, insert the book $sql = INSERT INTO BOOKS(CopyrightYear,CoverType,DatePurchased,EditionNumber,ISBNNumber,Notes,Pages,Publisher,LOCNumber) VALUES(\ . $_POST[copyrightyear] . \,\ . $_POST[covertype] . \,\ . $_POST[datepurchased] . \, . $_POST[editionnumber] . ,\ . $_POST[isbn] . \,\ . addslashes($_POST[notes]) . \, . (isset($_POST[numberofpages])?$_POST[numberofpages]:0) . ,\ . $_POST[publisher] . \,\ . $_POST[locnumber] . \); mysql_query($sql); $bookID = mysql_insert_id(); $sql = INSERT INTO BOOK_TITLE(BOOK_ID,TITLE_ID) VALUES($bookID,$titleID); mysql_query($sql); $sql = INSERT INTO AUTHOR_TITLE(AUTHOR_ID, TITLE_ID) VALUES($authorID,$titleID); mysql_query($sql); $sql = INSERT INTO TITLE_GENRE(TITLE_ID,GENRE_ID) VALUES($titleID, . $_POST[genre] . ); mysql_query($sql); } catch(Exception $e) { echo $e-GetMessage(); mysql_query(ROLLBACK); } ? I'm trying to get to the point where if the query doesn't execute, it pops out a message and rollsback any possible results. It doesn't. What's wrong on this script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Narorwed down my problem to one statement:
$sql = INSERT INTO BOOKS(CopyrightYear,CoverType,DatePurchased,EditionNumber,ISBNNumber,Notes,Pages,Publisher,LOCNumber) VALUES(\ . $_POST[copyrightyear] . \,\ . $_POST[covertype] . \,\ . $_POST[datepurchased] . \, . $_POST[editionnumber] . ,\ . $_POST[isbn] . \,\ . addslashes($_POST[notes]) . \, . (isset($_POST[numberofpages])?$_POST[numberofpages]:0) . ,\ . $_POST[publisher] . \,\ . $_POST[locnumber] . \); Okay, when $_POST[notes] contains quotes, it seems to break the series, ie returns an error at that point of the SQL statement, even with addslashes(), am I doing something wrong there? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OO purism sucks - this is a rant for anyone who is allergic to that kind of thing...
John Nichel wrote: Do what I do, and don't do OO. ;) In other words, do what works, realizing that 99 percent of the time that you're doing indivdual sites, and ignore dogma? Hmm, what a concept! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML form
Martin Marques wrote: Sorry for the OT, but this is PHP output anyway :-) I have a bunch of code to input and modify data through an HTML form. When I modify the options, some are in text, others in textarea, and some are in select options. Now wat I did is make the current value be the selected one, but my browser doesn't seem to get it right. Here is the HTML output: SELECT name=cargo OPTION value=8Profesor titular/OPTION OPTION value=7Profesor asociado/OPTION OPTION value=6Profesor adjunto/OPTION OPTION value=5Jefe de trabajos pracáá½ticos/OPTION OPTION selected value=4Ayudante de cat½edra/OPTION OPTION value=3Ayudante alumno/OPTION OPTION value=2Pasante/OPTION OPTION value=1Colaborador externo/OPTION /SELECT But the browser doesn't show the option Ayudante de catedra selected by default. Am I so blind that I can't see the problem or those my firefox have a problem? Works fine on my firefox, by the way. What version of Firefox are you using? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OO purism sucks - this is a rant for anyone who is allergic to that kind of thing...
Robert Cummings wrote: On Thu, 2006-06-01 at 19:14, Jochem Maas wrote: Robert Cummings wrote: Ahh yes, I do like the elegance of prototypes too. They're a different kind of beast, but a very flexible one. the more I get in it the pretty it gets - javascript doesn't just give you a revolver to shoot yourself with it gives you a Doom3 chainsaw and it's shiny :-) Oh yeah... *rubs the gash in his foot*. I do firmly believe though, that if you have an iota of intelligence, then shooting yourself in the foot will lead to a strong lesson learned :) Protecting idiots from themselves just creates a problem of lots of idiots needing protection from themselves -- that should be a human resources issue, not a language issue IMHO :) Cheers, Rob. What was that joke that I heard. While regular programming gives you enough rope to hang yourself, OO lets you design the tree object. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] If value is odd or not
Steven Osborn wrote: $odd = array(1,3,5,7,9); if(inarray(substr($var,strlen($var)-1,1),$od) { //haha } else { //even } How about this if ($var % 2 == 0) { //it's even } else { //it's odd } -- Online library -- http://pueblonative.110mb.com 126 books and counting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookie Question
tedd wrote: At 6:26 PM -0400 6/23/06, Tom Ray [Lists] wrote: I've run into something rather odd with cookies today. I'm working with this admin section on a site and I'm setting a cookie that is supposed to be good for one hour. So in the cookie I have time()+3600 and all was well or that was until someone fired up IE. It seems that IE refused to set the cookie. After much swearing at IE, I found that if I set it to time()+7200 the cookie would be set. Not if that wasn't odd enough, in Firefox if I logged in at 6PM the cookie said it would expire at 8PM which is correct. However, when I logged in via IE at 6PM it said the cookie would expire at 23:00 hours (11PM for those who don't know)...so my question is...why is this happening and why does IE do this? I checked in Opera, Mozilla and Netscape and they all work the same as Firefox. You answered the question yourself, you're testing IE. It sounds like M$ is trying to make time to adapt to their standard. But, you're not alone -- try Google with IE cookies expiration tedd BTW, I have a question: which is the preferred way to handle variables on the client side: cookies or sessions? Or are there situations where one should be used and the other should be used in these other situations. -- Online library -- http://pueblonative.110mb.com 126 books and counting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading...
BBC wrote: Fatal error: call to a member function an o non object in /url/data.php on line 34 and the syntax is in line 34, so what can I do..? Could you point out which line is line 34? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Preventing double-clicks APPEARS TO WORK FINE
Jay Blanchard wrote: [snip] I am going to do some thinking (typing) out loud here because I need to come up with a solution to double-clicking on a form button issue. [/snip] Isn't there a javascript method that you could use to accomplish the same thing? Either that, or on the first click, you could disable that button. -- Online library -- http://pueblonative.110mb.com 138 books and counting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Preventing double-clicks APPEARS TO WORK FINE
Jay Blanchard wrote: [snip] JavaScript can't be used for such things, or at least it can't be relied upon. What if the user has disabled JavaScript? Or what if the user has specifically disabled the JavaScript behaviour you are relying on? [/snip] Egg Zachary. That was why I wanted a PHP method. Since the SESSION data is set for the activation receipt I do not have to query the database again, save for the initial query to check and see if the data exists. You're still doing two round-trips to the server, which seems very inefficent to regulate user behavior. -- Online library -- http://pueblonative.110mb.com 138 books and counting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple if() statements
Larry Garfield wrote: switch is fine if your elseif comparisons are equality based. If they're not equality based, then they don't map to switch as well. In other words, if you look at a logical ladder as the roots of the tree, as long as each root has the same number of forks (say each fork ends only one way), your fine with a switch. If you have one, however, that has only one condition, and another that has two, then you need an if...elseif logic tree. -- Online library -- http://pueblonative.110mb.com 138 books and counting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Functions
Two things: 1. You're not returning anything from the function. 2. You're not even using the function. [EMAIL PROTECTED] wrote: I am trying to create a function to clean up variables that are user inputted from a form. I am not getting this script to work. Can anyone help. ---Start Script--- function cleaner($var) { trim(strip_tags(ucfirst(addslashes($var; } $var = abc's; echo $var; ---End Script--- When I run the above script it produces nothing. Instead of a result of Abc\'s. -- Online library -- http://pueblonative.110mb.com 138 books and counting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PDF documentation
Hi, does the PHP document come in a PDF form? -- Dr. Joseph Dolan: Isn't there a children's book about an elephant named Babar? Fletch: I don't know. I don't have any. Dr. Joseph Dolan: No children? Fletch: No, elephant books. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Re: Inserting a php file into a mysql database
On Monday 26 December 2005 8:26 am, El Bekko wrote: Use file_get_contents() I'd say... but you'll have the problem the file executes :S Which is why I told him just to treat the php file like a text file (which is what it really is) and use fopen to grab the file, read its contents into a string, and insert that into the database. -- Dr. Joseph Dolan: Isn't there a children's book about an elephant named Babar? Fletch: I don't know. I don't have any. Dr. Joseph Dolan: No children? Fletch: No, elephant books. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] load testing tools
On Tuesday 27 December 2005 12:45 pm, Jared Williams wrote: Anyone have any opinions or suggestions on cheap/free load testing tools for dynamic sites? Microsoft WAST http://www.microsoft.com/technet/archive/itsolutions/intranet/downloads/web stres.mspx Jared You violated one of the Ten Open Source Commandments. Thou shalt not take the name of Microsoft in good! -- Dr. Joseph Dolan: Isn't there a children's book about an elephant named Babar? Fletch: I don't know. I don't have any. Dr. Joseph Dolan: No children? Fletch: No, elephant books. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating a new file (apologies to anybody on php-db who got this)
On Tuesday 27 December 2005 4:07 pm, James Lumb wrote: Hi, Does anyway know whether there is a PHP function which creates a new file? i know there is fwrite, fopen etc but is there any way of creating a new file? Thanks, James fopen() will create a new file if you open it for writing and it does not exist, as per these modes: 'w' Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'w+' Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'a' Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it. 'a+' Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it. 'x' Create and open for writing only; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call. This option is supported in PHP 4.3.2 and later, and only works for local files. 'x+' Create and open for reading and writing; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call. This option is supported in PHP 4.3.2 and later, and only works for local files. -- Dr. Joseph Dolan: Isn't there a children's book about an elephant named Babar? Fletch: I don't know. I don't have any. Dr. Joseph Dolan: No children? Fletch: No, elephant books. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php