Re: [PHP] Images out side the wwwroot
"Philip J. Newman" <[EMAIL PROTECTED]> wrote: > If i was to use PHP to call all my images from out side the > wwwroot, dose anyone have a method that they use? By using an absolute path? - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying a file
Todd Cary <[EMAIL PROTECTED]> wrote: > OK! This makes sense. What is the syntax to do Hmm, did you read (and try) the article mentioned earlier? - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What am i doing wrong? SQL Query in PHP
Hello, "Rahul.Brenda" <[EMAIL PROTECTED]> wrote: > Ok i tried this.. and i didn't get any error listed.. > so it seems that the mySQL Query is not failing in > syntax or logic.. but it's not picking up any rows. > Which is really stupid because i used my phpmyadmin > and i ran this SQL Query there and even then i got my > results.. So, you still have a "blank" page? Check the resulting html source code and see how it looks like. Also, do you have "display_errors = On" in your php.ini? Btw, see if changing this: > > > echo(" $myrow[title] "); to this: echo $myrow["title"]; makes any difference. Just my 2 cents... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variable string names
John's solution is the better one. But if you really wish to stick to your own, try and use eval() to complile $where$i. Edwin John W. Holmes wrote: I have: if ($where1 != '') { $whereArray = array_push($whereArray, $where1); } and I want to repeat for $where1 up to $where8 but rather than write it out 8 times, I'd rather use a loop for ($i=1; $i<=8 i++) { if ($where1 != '') { $whereArray = array_push($whereArray, $where1); } } but how can I change $where1 to $where2, $where3 etc using $i. nothing I try seems to work. Do I use eval? Yes, you can use variable variables, like others have suggested, but why not just use an array? Almost every implementation of variable-variables seems to be a work around that's used instead of arrays. Where are all of your $where variables coming from? If they are from a form, just name them as "where[]", then simply loop through them using foreach($_POST['where']) and check them all. This makes your code more dynamic as you can add/subtract "where[]" elements and your "processing" code doesn't change. With a variable-variable solution, you have to change the number of loops you run each time to change the number of "where" elements you have. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: save to file
Enough answers, I think? If you want EACH value of $_POST on a new line, then why not implode with \n instead of \t? Now you get only one big line, because you only WRITE one \n. Edwin Ryan Holowaychuk wrote: I am trying to save to a text file. And I have managed to do that part now, but what happens is when I save to the file, all the lines get put into one big line in the file. I am creating a roster input that I adding to our website: No, name grade . The roster will contain 15 players So right now the implode puts everything on one line in the text file!!! So I am no sure if anybody can shed some light on this one. Thanks again Ryan //create a new file $fp = fopen("/place/on/server/" . $HTTP_POST_VARS['team'] , "w"); $file_data = implode("\t\", $_POST); //this would return values spit by tabs //write to the open file handle fwrite($fp, $file_data . "\r\n"); //close the file fclose($fp); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
"Sunfire" <[EMAIL PROTECTED]> wrote: > this is true i guess but he doesnt want an image that looks > like a button he wants a 100% true authentic button that is > depressed when you click it and if the image doesnt move when ? You can make something that can be "depressed" with just images--only you have to use javascript to make it work... > you click on it he will throw a 600% royal fit and none the > less he doesnt really care if people with no java support can > or cant get to his site .. that is more the less their problem > to figure out not mine or his... > > guess you have to make everybody happy somehow when making web > sites and stuff... Sounds like you and you're client are not at all concerned about the *visitors* of your website. Who is going to use the site anyway? I hope you're client understands the term "user-friendly". .. > but i tested a browser with java support turned on and one with > it turned off and from what i could see they both worked with > the button i have (and my client should be very impressed since > the button actually depresses when you click it or hit enter on > it).. Java and javascript are different--please don't confuse the two... try it again and see if it'll work with JAVASCRIPT turned off... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
"Sunfire" <[EMAIL PROTECTED]> wrote: > actually yes a link would be rather nice for just going to > another page but my client doesnt want a link he is paying for > a button to be there instead of a link.. so if thats what he > wants and pays for i guess wether i agree with it being there > or not i put it there for him.. I see. Well, in that case, you have another option. You can make an image that looks like a "button" and have that image link to the page in question. One advantage is, it would even work with Javascript turned off... ;) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_start
Hello "Mr Percival" <[EMAIL PROTECTED]> wrote: > Hi, > > According to the PHP manual session_start always returns true. > > Ther are times (like when there is a disk full error on the > server) that the sesison_start will fail because its unable to > write the session tmp file. > > So shouldnt session_start be able to return false if the file > write fails? > > Or does it return false but the manual doesnt say so? > -- I haven't had any "disk full error" experience so I'm not sure but I think what will happen is just php will crash (complain or return an error in other words because your script will stop) instead of returning "FALSE" which you can check later on... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] and
Hello, "Sunfire" <[EMAIL PROTECTED]> wrote: > hi.. > > i have a button on a web page that is supposted to go to > another web page > when either clicked with a mouse or when someone presses enter > on it.. : > > post a prayer > > that is my basic code for the button... my problem is the fact > that when you click the button or hit enter on it all it does > is refresh the page if it even does that. how would i actually > make this button load another page > using php?? Just wondering... why would you need a just to load another page? Aren't links enough? - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] re-populate array keys
Hello, Justin French <[EMAIL PROTECTED]> wrote: > Hi, after asort()ing an array, the numeric keys are obviously > out of order. > what i'd like to do is reset the keys, starting at zero. > > is there a function for this, or do I just walk through the > array with a foreach() and do it manually? So, in other words, after sorting them, you'd like to "change" the keys starting from zero? In that case, I think you can use array_values() ... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pg_connect $B$,;H$($J$$(B
$B$3$s$K$A$O!#(B (B $BNS(B $B7C72(B <[EMAIL PROTECTED]> wrote: (B (B> $B;O$a$^$7$F!#(Blin $B$H?=$7$^$9!#(B (B> (B> php$B$N(Bpg_connect$B$G(BpostgreSQL $B$K@\B3$r;n$_$^$7$?$,!"4X?t$,(B (B> $B8+$D$+$j$^$;$s$H%(%i!<$,=P$F$7$^$$$^$7$?!#F1MM$J8=>]$,Ax(B (B> $B6x$7$?J}$,$$$?$h$&$G$9$,!"4N?4$J2r7hJ}K!$O8+$D$+$j$^$;$s(B (B> $B$G$7$?!#$I$J$?$+$,2r7hJ}K!$r$4B8CN$G$7$?$i!"CN7C$r$*B_$7(B (B> $B$/$@$5$$!#(B (B $B$^$:!"F|K\8l$N(BML$B!J(Bhttp://ns1.php.gr.jp/mailman/listinfo/php-users$B!K(B $B$b$"$j$^$9$N$G!"F|K\8l$G=q$/>l9g$O$=$A$i$N$GJ9$$$?$[$&$,$H;W(B $B$$$^$9!#(B (B $BEj9F$9$kA0$K!"A0$N%a!<%k$r8!:w$7$F$+$iEj9F$7$?$[$&$,$G$9!#$"(B $B$H!"Ej9F$9$k$H$-$K!"4D6-$d%$%s%9%H!<%kJ}K!$J$I$r=q$$$F$/$@$5$$%M!#(B (B $B$G!"http://bb.yahoo.co.jp/ (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: help needed building query string based on which form fieldsthat are filled.
Don't get your question right, but you get all your vars in the querystring after submitting the form. There, you should check on whether or not the var is filled (i.e. $var <> "" or so). There's no other way :-( so your guess is pretty ok. BTW: use Javascript to modify the submitted values. Edwin Anders Thoresson wrote: Hi, I've got a html form where not all fields need to be filled by the users. How can I build a MySQL query based on which fields the user have filled? My guess is that I can do something like this: if(!empty($f_name)) { some_commands_to_add_$f_name_to_querystring } if(!empty($l_name)) { some_commands_to_add_$f_name_to_querystring } some_commands_to_build_querystring_based_on_if's $result = mysql_query($query) But what commands/functions should I use to build the query? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] any change to see php source?
See www.php.net. Qt wrote: Thank you chris, Help full Do you have any link for installation manual "Chris Hayes" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 21:36 1-2-2003, you wrote: I am studying on php. And the book say, when the server see php extension it is running php file and giving results to the visiting browser. But as I see related directories are normal directory, doesn' t like cgi-bin directories. Is there any change to see php file source such as file open function or something else? I am not going to somebody else file. Just I want to be sure how secure the php? It's all in CVS, read the source: I think he does not mean the PHP program source, but his scripts' source. Normally people cannot see the script source, as long as you use .php as file extension. In some PHP/server setups people can see the source when they type filename.phps, see the installation instruction file in the php package for details. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using tags with php
Are you absolutely sure that the query gives result? Try and add "or die (mysql_error())" behind mysql_connect, mysql_select_db and mysql_query. For the rest, it looks pretty good to me Sunfire wrote: ok let me try this question thing again... i am having a problem using tags by using current values kept in a mysql table. how do you get the values out of the table and into a form so they show as the value= part of the tag? i tried just aabout everything and it doesnt work even htmlspecialchars() doesnt work.. all i get for output on the page is the rest of the script printed on the screen after the value= part of the tag..is there any way to fix it? - Original Message - From: "Philip Olson" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 8:01 PM Subject: Re: [PHP] using tags with php On Sat, 1 Feb 2003, Sunfire wrote: hi.. i took your idea... i put the error reporting code at the top of the script and ran it as the problem was still there to see what would happen.. instead i get 0 messages from the reporting system and all i get is the last 7 chars of the print line and the }?> at the end of the script... so for instance if i do: print(" starting from the \n all the way to the rest of the script where it says }?> at the end dont know if this is a bug or not but its getting hard to figure out what the problem with my echo or print statements are... here is the whole script: its supposed to get all fields and then display in input text boxes the current values in that certain record i know i missed some stuff in it with the query but at this point was supposed to be a test to see if i could even put it in the box in the first place... but here is the code: Please step back, slow down, and write your question in a short concise format. I have no clue what the above means. edit member pick some of these: \n\n"); // Try this instead, see also: htmlspecialchars()* print ""; Regards, Philip * http://www.php.net/manual/en/faq.html.php#faq.html.encoding } ?> /*end*/ any changes to make it work would be appreciated...tnx - Original Message - From: "Philip Olson" <[EMAIL PROTECTED]> To: "Sunfire" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 6:48 PM Subject: Re: [PHP] using tags with php (IMPORTANT READ) On Sat, 1 Feb 2003, Sunfire wrote: if i do this: /*all the mysql login stuff here*/ $query=mysql_query("select * from members"); while($new=mysql_fetch_array($query)){ echo "$new['company']"; /*so on through the field list*/ } on output all i get is the title with a submit button.. otherwise blank.. There is a bug in PHP 4.3.0 regarding the use of arrays in strings. The following gave a parse error before PHP 4.3.0: print "Do not do this: $arr['key']"; Now it gives an E_NOTICE error due to changes to the string scanner. In PHP 4.3.1 it will no longer give a bogus E_NOTICE and instead it will work (no parse error either). Surrounding the array with {braces} in the string works regardless, so: print "You can do this: {$arr['key']}"; Regarding this question, don't write it like that but instead do the following (no quotes needed): echo $new['company']; For those wondering about this bug, see: http://bugs.php.net/bug.php?id=21820 The string documentation has been updated to demonstrate the array in string phenomena (except the bug hasn't been mentioned as I'm waiting for it to be committed first). http://www.php.net/types.string Sunfire, you aren't seeing this E_NOTICE error because your error level is turned down (by default). Put this on top of your script to see them all: error_reporting(E_ALL); Regards, Philip same thing with fetch_object()...and i have 1 row in the members table..im sort of confused now that it doesnt work for a wierd reason any better ideas on how to get the stuff out of the table and into vars? maybe im doing it wrong - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 5:33 PM Subject: Re: [PHP] using tags with php In a message dated 2/1/2003 2:02:06 PM Pacific Standard Time, [EMAIL PROTECTED] writes: i tried getting the values into vars using fetch_array/fetch_object and fetch_row and tried to put them in variables but for some odd reason it really doesnt work because when i try to use the vars in the value section instead of printing in the edit box the content of the variable i usually end up with "?>", ">", "" instead... any reason this shows up? and when i do: echo ""; then on the web page i end up with some thing like this instead of the edit box: ">";;"> }?> any reason for that? It sounds like $name and/or $new_var may be empty. Did you echo the variables before using
Re: [PHP] Loading CSV data into MySQL
Or add a "insert_date" column of type "timestamp" to the database. This will automatically store the time of insertion. Then use ORDER BY insert_date. Edwin Jason Sheets wrote: You could create a integer column with an autoincrement flag, then order the rows by this column, that should give you the data in the order it was inserted into the db. Depending on your database there are other ways to do it. Jason On Sat, 2003-02-01 at 18:07, John W. Holmes wrote: On Sat, 2003-02-01 at 17:25, John W. Holmes wrote: I'm loading a .csv file into MySQL, done it a million times but for some reason it is scrambling the row order. All the fields are making it in correctly but the order of the rows seems to end up totally random. I've done this a million times and never saw this.. So? Why does it matter to you what order the rows are in the database, as long as the right data is there? The order is irrelevant. Because in this instance I need it to come out in the order it is actually in. Then use an ORDER BY in your query. If you're relying on the database to spit out rows in the order they went in, then you're wrong. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.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
Re: [PHP] Re: HEEELP...please
[EMAIL PROTECTED] wrote: [snip] > Problem is - the only php.ini file is in a work directory for mod_php4 > installation. As far as I know, this file would not be read by apache > or the php module. [/snip] Run phpinfo() and see whether there's a reference to where the php.ini being used resides... Then, edit it accordingly (as somebody already mentioned). HTH, - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: how to passing two dimension array
"Larry Brown" <[EMAIL PROTECTED]> wrote: > For some reason I was not able to find the original question here. Well, you can always check the archives/thread... > The original question is about inserting the value from a two > dimensional array into a form not passing a two dimensional array from > a php script to a php script right? ??? I don't think I understand this but anyway I was just trying to add to the last thread. The purpose of which is just to show another way to echo... - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] checking status of a HTML checkbox
"Larry Brown" <[EMAIL PROTECTED]> wrote: > Also look at empty(). I don't know if the $_POST array will send the > key if it as no variable. I know on a regular post it does send the > variable, but it has no value. What's a "regular post" anyway? Well, the key is passed even when there's even though the field might be empty. > I have used isset with just receiving post data and got > strange results. On one I had an isset statement that ran a result > that Maybe you can post the code--I'm sure somebody here can fix it... ...[snip]... > then isset may not always work. At least not in my experience--it always served its purpose ;) - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can I use an external 'template' file and still use PHP variables?
"Daevid Vincent" <[EMAIL PROTECTED]> wrote: > I've posted this a few weeks ago with no response. I want to use an > external > "email template" as it were, so that the sales guys can edit it as they > like and simply shuffle the variables around that they need > $username and $password (either with or without the tags). > > I don't want them mucking around in my code and potentially screwing it > up. Not to mention having a huge 'email' text in between those > HTMLMESSAGE markers is ugly as hell and ends up making the color-coding > in HomeSite all kinds of whack at the end of it. > > I tried to use: > > $message = << include("/pathto/customer_email.php"); > HTMLMESSAGE; > > But $message has the literal string > ''include("/pathto/customer_email.php");'' instead of including the > file. Grr.. (wouldn't it make sense that an include() should be parsed > FIRST with the contents put in place basically? This seems like a 'bug' > not a feature. Well, include() will parse the file--maybe you're just doing it the wrong way... ;) I'm not sure how your customer_email.php looks like but consider this: Then in inc.php you have: Running the first script should echo: General PHP, how are you doing? So, as you can see the $name was replaced. Just a simple example... - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Column size, user input and htmlspecialchars
Hello, "Jim" <[EMAIL PROTECTED]> wrote: ...[snip]... > How do you guys go about resolving this situation? Well, first, increase the size of your field, say VARCHAR(100) then in your form, use "maxlength" like this: That would prevent them from entering more that 50 characters. (At least, that's how it should work.) But, just to make sure, count the characters entered using strlen() or something before you use htmlspecialchars()... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: how to passing two dimension array
Or, "Noel Wade" <[EMAIL PROTECTED]> wrote: > You're missing string concatenation operators. I use "echo" instead of > "print" - but here's how it should look with either: > > echo ""; Try this instead: Just add curly brackets before and after the variable and don't forget the "$" sign. So, this > > print ""; would be like this: print ""; or this: echo ""; - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] checking status of a HTML checkbox
"Shams" <[EMAIL PROTECTED]> wrote: [snip] > At the moment I am doing this: > > if ( $_POST["insurance"] == "yes" ) > { > } > > But is there a more "accurate" way of checking the exsistence of > "insurance"? [/snip] I think you're looking for isset(): http://www.php.net/manual/en/function.isset.php - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gettext and translations
Hello, "electroteque" <[EMAIL PROTECTED]> wrote: > hi i am just reading up on gettext , it says its for translating messages > , how about translating entire site content ? Mmm, I don't think anything like that exists--at least, not yet. There are or no sites (or software) that can perfectly translate any entire site. And, don't expect anything that would translate your entire encyclopaedia automatically as well... :) > and a question i have been > asked is how authentic is the translations ? Well, for gettext's translations, I believe the translators are real humans (and they're native speakers) so you can expect a high quality translation that serves its purpose... Just MHO, - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make server response to emails
Hello, "See kok Boon" <[EMAIL PROTECTED]> wrote: > Hi experts, Well, I'm no expert ;) so let me just tell you where you can find more info. I think you're looking for something like what PHP's mailing list is using. It's called ezmlm. Pls. check their site: http://www.ezmlm.org/ - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] string prints out as number (E+10...), why?
Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: > - Edwin wrote: > > > > I guess it's because the number is converted automatically to an > > exponential notation if it goes over a certain number of digits--makes > > it easier to read... > > I figured as much. But why? I found a solution by changing the precision > of floats in the php.ini file. > > But I still find it strange that PHP will, internally, happily treat my > variable as a string but when it comes time to print it out, it decides > that it's a number and formats it without my asking it to. Mmm, I'm not sure if I understand this correctly but I don't think PHP will "just decide" that your string IS a number and *formats* it. Consider this: '; echo $var2; // echoes ?> As you can see, PHP didn't "touch" the string version... Anyway, I don't think the conversion to an exponential notation is peculiar to PHP--my math teacher required me to do the same :) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] string prints out as number (E+10...), why?
Hello, Jean-Christian Imbeault <[EMAIL PROTECTED]> wrote: > I'm passing a var into a function which is a 16 digit number, but when I > try to print it out I get 1.111E+15 instead of the expected > 11. > > Why? I guess it's because the number is converted automatically to an exponential notation if it goes over a certain number of digits--makes it easier to read... > How can I change this behaviour? Perhaps, you can use sprintf() http://www.php.net/manual/en/function.sprintf.php HTH, - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] time stamp screwing up
"- [ Paul Ferrie ] -" <[EMAIL PROTECTED]> wrote: > So > > Is NOW() a mysql function? Well, you can check for yourself ;) It should be somewhere around here: http://www.mysql.com/doc/en/Date_and_time_functions.html - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() not working on Win2k
"Rad Craig" <[EMAIL PROTECTED]> wrote: [snip] > I don't have another outside SMTP server to check it on. Will yahoo > and others like that work for testing this? [/snip] Yes and no. I think this depends on the server. With Yahoo? No, it wouldn't/shouldn't work... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] progress page
Hello, [EMAIL PROTECTED] (Edward Peloke) wrote: > I am working on an application that will take data from the user and > run then check through all the data to find matches. Instead of the > user seeing a blank screen while the page is loading, I would like to > pop up a page that says, processing, please wait and maybe have an > icon like a progress bar or something. How do I pop up a page and > have it disappear when the the other page is done loading? You can use javascript + (perhaps) an animated gif that runs left on the browser window. Just don't expect it to work esp. on browsers that has javascript turned off ;) This has been discussed many times--please check the archives... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini - changes aren't taking?
..in other words, it's possible that you could be editing/making changes on the *wrong* php.ini file... - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() not working on Win2k
Hello, "Rad Craig" <[EMAIL PROTECTED]> wrote: > yes, I've tried: > > SMTP = localhost > SMTP = 127.0.0.1 > SMTP = mail.mydomain.com > SMTP = internal.ip.address > > None made any difference, so I've set it back to localhost. ...and of course you restarted your web server after each changes? Have you tried another SMTP server? Perhaps, one outside? - E ...[snip]... __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system()
Hello, Richard Baskett <[EMAIL PROTECTED]> wrote: > When using the system() function, let's say starting up a program, can > that program start in the background while the rest of the page is > parsed or does it have to wait until the system command has finished > whatever it is doing? You can use the "&" to make it run in the background. Like this: program_to_start & (in linux) - E __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] loading a different web page ...
Looking for this? http://www.php.net/manual/en/function.header.php - E "Kenn Murrah" <[EMAIL PROTECTED]> wrote: > i know this is an elementary question, but i can't even figure out > what to search for at php.net > > i need php code that, when executed, takes you to a different web > page, i.e. > when browser goes to www.abc.com, he's automatically redirected to > www.xyz.com ... > > thanks in advance for the help. __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] socket_set_blocking()
Hello, <[EMAIL PROTECTED]> wrote: > I was not able to get php's ftp functions working for me, they were uploading zero byte files, so I am now attempting to use fsockopen to accomplish the task. > > I found this script: http://www.phpbuilder.com/mail/php-general/2001102/1333.php > > It uses the function: socket_set_blocking(), and php.net says that this is an alias for stream_set_blocking(). What does blocking mode mean? I am not familiar with this concept, can someone explain. > I think it's explained here. (Not sure if it'll help though...) http://www.php.net/manual/en/function.stream-set-blocking.php > As for the issue of socket_set_blocking() being an alias for stream_set_blocking(), why would I not just use stream_set_blocking? > The reason is also found above. (Hint: Because it may not be available in the version of php you are using.) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can PHP do this...?
Hello, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: > > OK. I think I understand this, but let me ask just to be sure. > > > > So if I setup in my page something to this effect: > > if ($_SERVER['!HTTPS']) { > > echo "Switching over to SSL..."; > > echo ""; > > } else { > > echo "**Rest of Page**"; > > } > > > > Would this work? I am about to add a secind site to my site using an alias > > in Apache. Example is http://www.mysite.com for first site and > > http://www.mysite.com/2ndsite. Except I want everything for the second > site > > to be https. Make sense? > > if(!isset($_SERVER['HTTPS'])) > { header("Location: https://www.mysite.com/2ndsite";); } > > That should work. Or you could echo the META redirect if you wanted to > display a page, but this should do it transparently. There is probably a way > to do it with just Apache, too, that wouldn't involve PHP. I think there's some useful info here (about doing it with "just Apache"): http://httpd.apache.org/docs-2.0/ssl/ssl_howto.html Just in case... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms
Hello, "Chris Hewitt" <[EMAIL PROTECTED]> wrote: [snip] > GET or POST method (I'm not sure whether there is a default). [/snip] GET is the default... should be... I guess... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fgetcsv Help
Hello, "Justin French" <[EMAIL PROTECTED]> wrote: [snip] > Sample line from your CSV should look like this: > > --- > "1","foo","harry said \"what is it?\"","foo" > "1","bah","\"don't know\" said sally","something" > --- > > When echoing these values to the browser, you would strip the slashes. [/snip] The double quotes aren't really necessary unless 1. You have a comma in the field 2. You have double quotes in the field So, 1,foo,"Harry said ""what is it""",foo would have no problem with fgetcsv(). And, btw, the " are also "escaped" with another ". - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: filemtime -help
Hello, (B (B"Mekrand" <[EMAIL PROTECTED]> wrote in message (B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... (B> i have a problem with filemtime function, i want script print out the date (B> of file last modified. (B> here is code, (B> $fp=fopen("ex.txt","r"); (B> echo date("j F Y H:i", filemtime($fp)); (B> fclose($fp); (B (BI guess you have to check the manual again :) (B (BYou don't need fopen() and fclose() here. Just do: (B (B echo date("j F Y H:i", filemtime("ex.txt")); (B (B- E (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] run query
Oops, ok, I misread the original question :) "Rich Gray" <[EMAIL PROTECTED]> wrote: > Er... but the original poster wanted a count of rows returned by a > particular query... your method just returns the number of rows in the > table... Anyway, you're right. If you already have a result then use mysql_num_rows(). - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] run query
Or, "Jon Haworth" <[EMAIL PROTECTED]> wrote: > Hi Diana, > > > After I run a query lik this, > > $db->query($sql); > > > > what is the quickest way to find out how many > > records result? > > Look into mysql_num_rows (or the equivalent if you're not using MySQL) ... you can even do it faster by using a "select count(*) as something from some_table" More info (found in the manual): http://www.faqts.com/knowledge_base/view.phtml/aid/114/fid/12 HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help - uploading multiple files
Hello, "Allred, Mark" <[EMAIL PROTECTED]> wrote: > Darn, that's what I was afraid of. > > Is there a way to do this in a client-side language like JavaScript? Javascript? No, I don't think so. (Maybe Java.) But, of course, you can always get a second opinion from a Javascript ML :) - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Theoretical - Device server using PHP - Is this possible?
Hello, "Steve Jackson" <[EMAIL PROTECTED]> wrote: > Hi all, > > I work for a company that manufactures device servers. They currently > have a very low internal memory (about 8MB) which is more than enough > for TCP/IP connections (which BTW we just released the code open source > to anyone interested www.opentcp.org) to devices but I was wondering if > there was any way we could give these device servers more functionality > by somehow using PHP. Obviously the device server itself has nowhere > near enough memory to have PHP installed upon it but it would be > interesting to see if anyone has any ideas or theories about if this is > possible. Not that I can answer you question but I think it is possible to run php (maybe a stripped down version?) with a small amount of memory--there's one that runs on a pda... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script not working from one computer
Hello, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: ...[snip]... > Browser's are the same (128bit). It's not a laptop. > The web page can pull up You mean, the web "browser", right? :) > any other external web page correctly. And, I assume pull up "external web page" means web pages served from the same server where you cannot login? > What gets me is that the computer can pull up the log in page. It can pull > up another, unprotected page from that web server. But, no matter who tries > to log in from that machine, I get a bad username and password, even though > they are right. It's like the browser is sending bad data to a script that > works fine from every other computer. > > Anyone else have any other ideas? Have you tried using another browser and see what happens? - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date() on two diff. servers
Hello gurus, "Ford, Mike [LSS]" <[EMAIL PROTECTED]> wrote: [snip] > To amplify on this: > ... [/snip] Interesting comments! ...not sure if I understood everything though :( Anyway, for Justin's original problem, I think it'll be solve by "simply" doing two things: 1. Add " GMT" to the end of the string being passed to strtotime(). 2. Use gmdate() instead of date(). Ex. 1039558389 // without it, echo $my_stamp --> 1039525989 $my_stamp = strtotime($my_date); echo "$my_stamp"; echo gmdate('D, d M Y G:i:s', $my_stamp); // Conclusion: Using strtotime() with GMT will create // a timestamp that if used with gmdate() will produce // desired result whichever timezone you run the script. ?> That should work. If not, tell me about it later--I'm more than happy to be corrected. But for now, I'll be taking some rest :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date() on two diff. servers
"Justin French" <[EMAIL PROTECTED]> wrote: > on 09/12/02 3:06 PM, @ Edwin ([EMAIL PROTECTED]) wrote: > > > [snip] > >> Perhaps strtotime() is NOT running off GMT, > > [/snip] > > > > Bingo! > > *GULP*... so, what we're saying is, that if I intend to pass data around on > multiple servers (in different timezones) using a unix timestamp for dates > (which i prefer to do), I should be using gmdate() and gmmktime() rather > than date() and strtotime()? I'm afraid so... > That will sure as hell be a few lines of code to dig through Well... just hope that others chime in and suggest a better solution :) > I'll also need an accurate (and daylight savings compliant!) way of > determining the how far ahead of the GMT the server currently is, or for a > specific timezone for a specific project (eg this current one, which is > basing it's dates on Sydney, Australia. If I understand the problem correctly and if my understanding of the functions are correct, I'm not sure if you'd really need something like this. Consider this: "; echo "GMT Timestamp: $timestamp_gmt"; echo "This script was run on: "; echo "$run_local (DATE with Local Timestamp)"; echo "$run_gmt (GMDATE with GMT Timestamp)"; ?> As you can see, although the timestamps are different, they produce the same results. So, *I think*, using gmdate() and gmmktime() would be enough. (Or, if you insist on using strtotime(), consider the example(s) in the "User Contributed Notes" I mentioned earlier.) I hope this give you some hints. - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date() on two diff. servers
"Justin French" <[EMAIL PROTECTED]> wrote: [snip] > Perhaps strtotime() is NOT running off GMT, [/snip] Bingo! ...or, Bull's eye!, whatever :) Anyway, I think this is "implied" in the manual. http://www.php.net/manual/en/function.strtotime.php Also, check "User Contributed Notes": piran at pobox dot com php at webdevelopers dot cz HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date() on two diff. servers
But, then again, it could be just because the other server's time is really late... (caused by old motherboard batteries, etc.) - E "@ Edwin" <[EMAIL PROTECTED]> wrote: > Hello, > > "John W. Holmes" <[EMAIL PROTECTED]> wrote: > > > Daylight Savings Time? > > John, I think "Daylight Saving Time" creates a difference of 1 hour and not > 1 day :) > > Anyway, I live in a place where we don't practice this so I could be > wrong... > > ...[snip]... > > > > Now, what could be causing this problem? IMHO, no matter where you > > are in > > > the world (or more to the point, what timezone you are in), 1039525200 > > > seconds after a certain date (in this case the unix epoch) should be > > > another > > > certain date, yes? > > Justin, it depends how you got your "timestamp" in the first place, I > think... > > I could be wrong again here but aren't these different? > > mktime() > gmmktime() > > - E > > ...[snip]... > > -- > 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] date() on two diff. servers
Hello, "John W. Holmes" <[EMAIL PROTECTED]> wrote: > Daylight Savings Time? John, I think "Daylight Saving Time" creates a difference of 1 hour and not 1 day :) Anyway, I live in a place where we don't practice this so I could be wrong... ...[snip]... > > Now, what could be causing this problem? IMHO, no matter where you > are in > > the world (or more to the point, what timezone you are in), 1039525200 > > seconds after a certain date (in this case the unix epoch) should be > > another > > certain date, yes? Justin, it depends how you got your "timestamp" in the first place, I think... I could be wrong again here but aren't these different? mktime() gmmktime() - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Allowed memory size exhausted
Hello, "Jeff Schwartz" <[EMAIL PROTECTED]> wrote: > > I have a large amount of data (1,948,280 bytes) that I tried to write out to a file using > > if ($fp = fopen($file,"w")): > > fwrite($fp,$contents,strlen($contents)); > > fclose($fp); > > endif; I'm not sure if I understand this correctly but don't you think you don't need strlen($contents) up there? Also, try fopen($file,"wb"). And here, > and got "Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1948281 bytes)" on the 2nd line. So, I tried to write out smaller portions with: > > if ($fp = fopen($file,"w")): > > $size = 4096; > > while (strlen($contents)){ > > $temp = substr($contents,0,$size); > > fwrite($fp,$temp,$size); > > $contents = substr($contents,$size+1); > > } > > fclose($fp); > > endif; ...doing "$contents = substr($contents,$size+1);" would actually cause you to lose some data. Try this instead: if ($fp = fopen($file,"wb")): // add "b" $size = 4096; while (strlen($contents)){ $temp = substr($contents,0,$size); fwrite($fp,$temp); // remove $size $contents = substr($contents,$size); // remove "+1" } fclose($fp); endif; I didn't test so I'm not sure if it'll work--just some ideas... HTH, - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Humour me
Hello, "John Taylor-Johnston" <[EMAIL PROTECTED]> wrote: > Humour me. New server. I'm a little tired. > Where is my php.ini on a red hat server? I took it :) Anyway, Run phpinfo() --should give you a hint... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] String to an Array
Hello, "Rodrigo de Oliveira Costa" <[EMAIL PROTECTED]> wrote: > Hi guys, I got a string that I need to be transformed into na array of > characters, something like: > > > $str ="im the one trying to do this"; > > //this is the string > > I'd like to get an array that I can access something like $array[0] and > get the value " i ". And this foward. Anyone have any clues on this? You can actually treat $str "like" an array so $str[0] would be "i". If you're after something else, check the archives for more info: http://marc.theaimsgroup.com/?t=100526380400016&r=1&w=2 - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where can I find a new HowTo of compiling php with gd support???
Did you try Google? Keyword: "compiling php with gd support" <[EMAIL PROTECTED]> wrote: > Hi folks, > > a single and simple question : > > Where can I find a new HowTo of compiling php with gd support??? > > Incl Bugtraps? > > Oliver Etzel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() problems...
Hello, "Anthony Ritter" <[EMAIL PROTECTED]> wrote: > DL, > I'm not sure I understand. Let me try :) > I had this working a few months ago by changing the php.ini settings to: > > SMTP = localhost ;for win32 only > sendmail_from = [EMAIL PROTECTED] ;for win32 only > > and I was able to run that script on my box and get an e-mail returned to > me. > > Now, I getting a "failed to connect". Strange... (I mean it's strange that it worked before. I don't think that setting would work unless you have your own mail server in your pc.) > Please advise. I think what DL meant was to change "localhost" to (Ex.) smtp.yourdomain.com > I'm using MS OE5. In that case you'll find that info by clicking Tools -> Account -> Mail -> Property then click "Server" and check under SMTP. HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output of MySQl sorted query to text or Word file.
Oops... <[EMAIL PROTECTED]> wrote: > success. And I have read through the user contributed notes and havent' > found it there. Sorry 'bout the link earlier. (You could find some hints under file() though...) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Output of MySQl sorted query to text or Word file.
Hello, <[EMAIL PROTECTED]> wrote: ...[snip]... > What do I need to use to create real linefeeds or new lines when viewing > under windows? Try the manual again and check specifically the "User Contributed Notes"--I'm sure you'll find something :) http://www.php.net/manual/en/function.fputs.php - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Check wheter GD function is working
Hello, <[EMAIL PROTECTED]> wrote: > Hello list, > > how can I check wheter GD-function is working and running? First check phpinfo() and see under "gd" then read more info here: http://www.php.net/manual/en/ref.image.php - E PS: Pls. don't flood the list with same messages... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Script not working from one computer
Hello, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: [snip] > So, I'm sure it's not the PHP script, so I'm looking for ideas of what I > should check, settings wise, on the client computer? Any help is greatly > appreciated. [/snip] Well, "my magic PHP 8-ball says..." Just kidding :) Anyway, here's a long shot: What browser are you using? Encryption is 128bit? If you're using one with 40bit or 56bit(?), I'm sure it won't work against a server with 128bit SSL... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Validating get and post data
"John W. Holmes" <[EMAIL PROTECTED]> wrote: > I think the problem is just the incorrect use of a switch. If you change > your code to > > switch(1) Or, switch(true) for that matter... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Validating get and post data
Hello, "Matt" <[EMAIL PROTECTED]> wrote: > I think what's happening here is a type issue. The comparison is returning a > boolean, so when $c != '0', the switch is true and the case is resolving to > true, and executing. But when $c == '0', with switch is (false), but the > case is true. Change the case to > ($c > chr(58) and $c < chr(58)): > pass in '09090' and see what you get. Perhaps the case isn't the right > structure for this test. I think you're in the right track. Running these would produce different results: -- script 1 -- $s = '0'; switch ($s){ case ($s > chr(47) && $s < chr(58)): echo 'Yehey!'; break; default: echo 'Boo!'; } -- script 2 -- $s = 0; switch ($s){ case ($s > chr(47) && $s < chr(58)): echo 'Yehey!'; break; default: echo 'Boo!'; } BTW, there's no problem if you use "if...else" clause... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP --with-dbm enabled???
Hello, (B (B"Vernon" <[EMAIL PROTECTED]> wrote in message (B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... (B> I'm being told that I need to have php compiled --with-dbm and it is not, (B> but it is complied --with-db3. Is that the same thing or do I need (B> recopile --with-dbm to use the dbmopen() function? (B (BI think you can find the answer here: (B (B http://www.php.net/manual/en/ref.dba.php (B (B- E (B (B (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IIS 5
Hello, "Chris Edwards" <[EMAIL PROTECTED]> wrote: > I'm getting "You are not authorized to view this page" when trying to run > .php files. You mean plain html files work fine? > How do I fix this? I'm running php isapi on iis 5 on w2k > server. How did you configure it? Anyway, it sounds like a permission problem so try checking whether your server (or the user running as the server) is allowed to read files and traverse directories that you're trying to access. Just some ideas, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] printing array
Hello, "empty" <[EMAIL PROTECTED]> wrote: > Hi > $stra=("aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll"); > $splited = array(); > $splited = split(",",$stra); > $c=count($splited); > for($i=0 ; $i<$c ; $i+=2){ > echo "$splited[$i]"; > echo "$splited[$i+1]"; // *error is here > > //Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in D:\sites\c\htemp.php on line 12 > echo "" > } > ?> > > I want to see on the screen is that > aabb > ccdd > eeff > gghh > iijj > kkll > > but the code above says wrong :( Try incrementing $i outside: for($i=0 ; $i<$c ; $i++){ echo "$splited[$i]"; $i++; echo "$splited[$i]"; echo ""; } HTH, - E PS BTW, notice the $i++ on the top as well. And also, the semi-colon after ""--you'll get a "parse error" again :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: & in Query String
Hello, "Chris Shiflett" <[EMAIL PROTECTED]> wrote: [snip] > Does it not work for you? [/snip] It does, just like I said earlier :) Anyway, I just wanted to add that not only in IE6 but even in NN4 or N7 (also in linux) it works perfectly fine. - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php bugs (Chinese word display problem)-help
Hello, "Tom Culpepper" <[EMAIL PROTECTED]> wrote: > I am not positive of the problem as I can not see your code, but if you > want to display the words that end in '5C' the you can do them like so: > \(escape character) like this: \(95 5C 5C) Putting a space (or some other character) after the character in question is actually a good "workaround"--though not really a solution :( Anyway, this kind of problem also exist with Chinese characters used in Japanese (sjis encoding). There could be various ways to handle this but here are some: 1. Try using a different encoding. Like utf-8 or some other Chinese encoding. (In Japanese, you can use euc instead of sjis.) 2. Creating your own addslashes function for "escaping". These are basically from the Japanese ML: (It's, of course, in Japanese.) http://ns1.php.gr.jp/pipermail/php-users/2001-August/001641.html By the way Samuel, there's a patched version of php that I've mention here: http://marc.theaimsgroup.com/?l=php-general&m=103781121614978&w=2 The patched version corrected some problems having to do with multi-byte strings so it might just work for Chinese as well. There were also some other info in the site I mentioned above but I'm afraid they're all in Japanese so... Anyway, I justed to post some ideas that might help. Also, please make sure to check the manual about multibyte strings-- http://www.php.net/manual/en/ref.mbstring.php - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple page form
"Chris Boget" <[EMAIL PROTECTED]> wrote: > > So, you are using a database to store the records? > > Yes. What's the point in taking the user's information if you aren't > going to store it somewhere. Even if all you need to do is email > the data upon completion of the form, storing the data for later use > would be a good idea. Not always. Are your users aware of this? Just wondering... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: & in Query String
Hello, "Jonathan Rosenberg (Tabby's Place)" <[EMAIL PROTECTED]> wrote: [snip] > I'm missing something here. If you use '&' to separate arguments on the > query string, how do they get separated out for access via $_GET? [/snip] Don't worry about it, just try it :) Anyway, the link that has & would be translated to &. (The browser should take care of this since it's the proper way to do it anyway...) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using mbstring without having /configure'd it
Hello, (B (B"Oliver Spiesshofer" <[EMAIL PROTECTED]> wrote: (B (B> Hi, (B> (B> Is it possible to use mbstring after setting the necessary values in (B> ini_set() or htaccess without having it enabled during /configure? (B (BNo. (B (BWell, if you're using windoze, you can probably just do it in your php.ini (Bbut it seems like you're not, so... (B (BAnyway, (B (B- E (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sorting parsed XML
"Geoff Hankerson" <[EMAIL PROTECTED]> wrote: > You don't need to do client-side transformation (although you could > check user agent and do it client-side if the browser supports it). > You can use Php's XSLT functions see the manual for more info. > > I was just suggesting this as a potential option. It may not be > appropriate in this situation. I don't really know enough about the > programming challenge we are looking at to say for sure I see. I thought you were saying that use XSLT and access the xml file directly--my apologies. Anyway, _that_ is certainly a potential option... :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sorting parsed XML
"Geoff Hankerson" <[EMAIL PROTECTED]> wrote: > This seems to me to be more easily handled by XSLT. (Not the only option > but a good one). > XSLT lets you select only the nodes you want and also sort them as well. Perhaps... but not all browsers support it. Anyway, you can also select the nodes in PHP and you can sort them as well. And you can do more than that... ;) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql -> xml
Hello, "Snijders, Mark" <[EMAIL PROTECTED]> wrote: > hello, > > For connection data between my site, and another site, I need to export my > MySql data to a XML file. > > Does anybody know any excisting scripts for this? so I don't have to make it > all myself? Have you checked the latest version of phpMyAdmin? You can export to XML--check how it works :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to obtain unique XML Elements
Hello, "David Pratt" <[EMAIL PROTECTED]> wrote: > Anyone have a simple technique for obtaining a unique list of elements from > an XML file? > > Am looking for something that will identify the first opening tag ie > and the single tag so that I get an array of tags > that I can print out. Having a bit of trouble with regex to get something > to work. > > Basic idea I had is to open file, read through each line with regex, add > matches to array, and then do unique elements of array and write to another > file. > > Is there a better way? Yes. Have you checked the manual? :) http://www.php.net/manual/en/ref.xml.php - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upgrade issues
"Chris Knipe" <[EMAIL PROTECTED]> wrote: > > > if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php")) { > > > $modpath = "themes/$ThemeSel/"; > > > } > > > > > > I don't get it? > > > > > > Warning: Unable to access themes/DeepBlue/modules/News/index.php in > > > /usr/local/www/v-webs/games.savage.za.org/html/index.php on line 46 > > > > > > Line 46 is the if statement > > > > If you have using a new php.ini file, perhaps you can compare it with an > old > > one and see if there's anything different--might give you a hint. > > Yeah, and no. It's FreeBSD-Ports, my php.ini is unchanged. FreeBSD > installs the new / updated ini files as ini-dist, so hence, nothing on my > settings has changed. I did also check to verify this, and it is indeed the > correct ini file, with the correct settings... > > > But then again, perhaps the problem is somewhere else... (i.e. file is not > > there, permissions, etc.) > > Yes the file does not exist. But isn't that why file_exists() is there? Right, I might be typing faster than I am thinking... :) Still, just make sure that PHP is using the php.ini file that you think it's using. The file that _you_ check didn't change but _php_ might be looking somewhere else... Of course, I could be wrong--haven't used FreeBSD/Ports--only linux. Perhaps, somebody else knows the answer... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Sorting parsed XML
Hello, "Chris" <[EMAIL PROTECTED]> wrote: > I'm trying to write PHP code that will not only parse the XML but also > allow me to sort the parsed information by the values parsed. I'm not sure if I really understand but let me try... ...[snip code]... Adding echo ''; before this and > $xml_parser = xml_parser_create(); ...[snip code]... after this > xml_parser_free($xml_parser); echo ''; shows a good view that you have a table with two columns. If you'd like to sort these, then I think you might be able to do something like this: 1. Instead of printf()'ing your 's or 's inside the class/function, why don't you try "putting" it inside an array? (Maybe with array_push() or something.) Then, 2. If you already have an array, perhaps you can use one of the functions here for sorting: http://www.php.net/manual/en/ref.array.php HTH, - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browser going to page twice?
Hello, "Leif K-Brooks" <[EMAIL PROTECTED]> wrote: > I'm having a weird problem. I guess so. I don't understand what it is :) > When I submit a form on my site, it often > sends twice. Sends what twice? > I'm not sure if this is a client-side or server-side > problem, but it doesn't happen on other sites. Which sites? > Is this a common > problem, or am I making some dumb mistake? I'm not sure :) But perhaps you can post some code or something... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux Question
Just to add... Here's something that might interest you: http://www.alistapart.com/stories/alternate/ ... and here's another one: (Should be better than the one discussed above :) ) http://www.alistapart.com/stories/phpswitch/ - E "Marek Kilimajer" <[EMAIL PROTECTED]> wrote: > You might solve this by providing different style sheet to on linux > running browsers: > if(ereg('Linux',$_SERVER['HTTP_USER_AGENT'])) { > echo ''; > } else { > echo ''; > } > > > conbud wrote: > > >Hey. This really isnt a PHP question. but what fonts do you reccomend using > >so they look decent on linux. Mainly looking for a good font that will look > >nice in MoZilla and Galeon. Almost all the fonts Ive used so far appear > >really tiny or really bold and not very good to read. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Connection string and Monday Morning blues
Hello, There could be a lot of problems here but what *exactly* is the problem? No more coffee, perhaps? :) Post the error, if there's any. Or, take away the "@" sign and see what happens... - E "Paul Dionne" <[EMAIL PROTECTED]> wrote: > Ug, I hate Mondays. must drink more coffee. > > Anyway, got a problem I hope someone can help with or at least jumpstart my > brain. > > I wrote a few web pages, work fine on my machine. Uploaded them on Friday > and they don't seem to work. Looks like I am not connecting to the > database because every page I look at seems to end when it is suppose to > connect. > > //** > function ConnOpen($CheckForError) > { > > > > @ $db = mysql_pconnect("webserver", "username", "password"); > if (!$db) > { > $CheckForError= "Error: Could not connect to database. Ple > ase try again later."; > return $CheckForError; > exit; > } > mysql_select_db("database"); > > > > } > //** > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sending POST vars to pop-up window - How?
Hello, "Monty" <[EMAIL PROTECTED]> wrote: > I'm writing a poll app. I want it to work this way: > > 1. On web page, user selects choice, clicks VOTE. > > 2. Clicking VOTE triggers a pop-up window. > > 3. PHP script running in pop-up records vote, displays results. > > Problem is, POSTed vars that come from forms aren't available in the popup > window if I make the FORM action = javascript:popWin('/poll.php'). > > Is setting the vote choice in a session var the only way to make this work, > or is there a way to pass vars via a form POST to the popup window? I think one way you can try is to use JavaScript's onClick() with submit.form. There was a discussion on a similar subject ("passing js values to php") not long time ago. Maybe you can check the archives... But, what if JavaScript is turned off? - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: image generation with PHP
Hello, Myrage wrote: > No luck > I have installed GD lib and zlib and all into c:\php\extensions bur i > still > get an error > > *Fatal error*: Call to undefined function: imagecreate() in > *c:\inetpub\wwwroot\image.php* on line *24* Run phpinfo() and check again (under GD). See if you can find some hints... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send multiple SQL staments in one query
Hello, "1LT John W. Holmes" <[EMAIL PROTECTED]> wrote: [snip] > No, can't do it. Only one query per mysql_query() call. Not sure with other > database interfaces, but it should be the same. [/snip] Yes, you cannot do it in MySQL. But you can do it with others. (I think it was discussed before--about "sql injection" or something...) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Send multiple SQL staments in one query
Hello, "Seth Remington" <[EMAIL PROTECTED]> wrote: [snip] > Here's a function that I use to run multiple SQL statements at once - [/snip] ...perhaps, a better way to put it is "run multiple SQL statements" _one after another_ :) It's a good approach though. ;) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upgrade issues
Hello, "Chris Knipe" <[EMAIL PROTECTED]> wrote: > Lo all, > > I upgraded from PHP 4.2.1 to 4.2.2, and now all of a sudden the following > code is generating a WARNING??? > > > if (file_exists("themes/$ThemeSel/modules/$name/$mod_file.php")) { > $modpath = "themes/$ThemeSel/"; > } > > I don't get it? > > Warning: Unable to access themes/DeepBlue/modules/News/index.php in > /usr/local/www/v-webs/games.savage.za.org/html/index.php on line 46 > > Line 46 is the if statement If you have using a new php.ini file, perhaps you can compare it with an old one and see if there's anything different--might give you a hint. Or, you might want to check the manual about error reporting and see what you can do about it: http://www.php.net/manual/en/function.error-reporting.php But then again, perhaps the problem is somewhere else... (i.e. file is not there, permissions, etc.) HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] does //commenting reduce performance?
Hello, "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote: > As PHP is an interpreter it needs to scan every line and every token of > code as it runs it. Thus said, of course using comments takes more time to > execute than having no comments. > > I have no profiling yet how much having comments or blank lines would > actually effect execution times, but I doubt it would be really an issue > since PHP, once a comment start is encountered, doesn't parse the text but > just scans for the end-comment tag. That said, it's reasonable to think that // // I // have // long // comments // that // extends // hundreds, // if not, // thousands // of lines. // Just kidding! :) // would be faster (unnoticeable it may be) than /* - I have long comments that extends hundreds, if not, thousands of lines. Just kidding! :) - */ Anyway, it's *always* better to have comments than nothing at all... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Secureing PHP.
Hello, "Steven Adams" <[EMAIL PROTECTED]> wrote: > Hi, > I am looking to secure my php install, like the settings in php.ini etc. > > I am using apache 1.3.27 and running latest php. > > Is there like a tut or something that can take u thought the php.ini and > explain ina little more detail? > > safe_mode = Off > > is that a bad idea or should i leave it on.. I suggest you leave it on. (Never really had any reason myself to turn it on.) More info in the manual: http://www.php.net/manual/en/features.safe-mode.php - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting mysql dump using php
Hello, ...seems like Rich is not available yet so let me try :) "See Kok Boon" <[EMAIL PROTECTED]> wrote: > hi Rich, > > yes think i need more info to the "mysqldump utility". i suppose you mean > there is in fact this utility? Well, most probably you'll be able to find it inside your mysql/bin directory. Check the manual for more info: http://www.mysql.com/doc/en/mysqldump.html And of course you can google for some related info ;) http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=mysqldump HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting info from users comp?
"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote: > Of course it is possible for any application running locally to fetch any > data about your hardware - e.g. M$ does it with their semi-automatic bug > reporting feature (in Win XP). However you'd need hardware and OS specific > applications to accomplish this. True, I agree. That's why if you have read my earlier post(s) on this thread you'll see that what I'm trying to say is very similar to your conclusion :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting info from users comp?
Hello, "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote: > So you're talking about a Trojan, do you? No, not really. I was talking about "legitimate" programs run by the users themselves. - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP_SITE and FTP_EXEC prob
Hello, "António Godinho" <[EMAIL PROTECTED]> wrote: [snip] > Here's the code: > ftp_exec($conn_id,"site chmod 755 /home/to/public_html/index.php"); > > I tried with ftp_exec and ftp_site, any advice? [/snip] Have you tried it without the word "site"? Like: ftp_exec($conn, "chmod... "); Haven't tried this though... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] echo'ing array contents through reference variable ... why doesn't this work???
Hello, "-<[ Rene Brehmer ]>-" <[EMAIL PROTECTED]> wrote: > I've run into something I don't understand... > > This is my test code: > > $premieredag = > array("2002-11-22","2002-11-29","2002-12-06","2002-12-18"); > $d20021122 = array("001"); > $d20021129 = array("002","003","004"); > $d20021206 = array("005","006","007"); > $d20021218 = array("008","009"); > > for ($i = 0; $i < count($premieredag); $i++) { > echo(""); > echo date("j. F Y",strtotime($premieredag[$i])); > echo (" \n"); > echo("\n"); > $pdag = "d".str_replace("-","",$premieredag[$i]); > for ($n = 0; $i < count($$pdag); $n++) { It seems like $i would always be TRUE here, no? Just guessing... - E ...[snip]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting info from users comp?
Hello, "-<[ Rene Brehmer ]>-" <[EMAIL PROTECTED]> wrote: > Hi @ Edwin, > > On Wed, 20 Nov 2002 01:24:18 +0900, you wrote about "Re: [PHP] Getting > info from users comp?" something that looked like this: > > >> And if its not possible with PHP, what language then? > > > >I don't think this is possible with a server-side language. But of course, > >this in NOT impossible with a client-side language (i.e. programs created > >with C, Delphi, etc. and run on the users' pc.). > > You can't get that kind of information through the browser --- security > imfrictions --- the info the browser can deliver is limited to > resolutions, screen dimensions (in pixels), usernames, IPs, browser > versions, installed plugins ... and stuff like that ... > > You can't get hardware info without either a plugin to the browser, or a > seperate program that sends the info to the server for storage, where it > can be retrieved by PHP... or other server-side stuff... True. But I think you missed one thing--I wasn't even talking about your browser. ;) I said, "programs" that was "run on the users' pc". You don't even need a browser for this :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help needed with forms
Hello, "Van Andel, Robert" <[EMAIL PROTECTED]> wrote: > Sounds like JavaScript would be the answer here. You can use a javascript > function to validate the form before it is even submitted. Yes, perhaps. But people can turn off JavaScript so you might want to use JavaScript AND PHP to validate your forms... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pause for user input?
"Larry Brown" <[EMAIL PROTECTED]> wrote: > The idea is to have the script start to load, prompt for a question or more, > then use the data from the response to complete loading the page and avoid > having to post all of the variables from page to page to get all of the > responses back. A lot of the questions are formed based on the answers to > previous questions so I'm trying to keep the number of separate pages to a > minimum by using such a technique. I understand that Java can provide this > function, but I want to do as much with PHP and as little as possible with > Java. I think you're referring to JavaScript and NOT Java. But, whether it's Java or Javascript, you cannot really pause/stop the browser then do something to "complete loading the page." (Unless you press "stop"--but this would require you to reload.) Anyway, Javascript (if you're referring to it) doesn't have that kind of function (AFAIK). Javascript can hide/unhide element on your form. It can also enable/disable a checkbox, for example. But those functions would only work AFTER the page is already loaded--and _not_ while it is loading. (Also, *after* the Javascript file--if you're using and external one--is already downloaded inside the your visitors' disk, etc.) - E PS BTW, Javascript (support) can be turned off by your visitors--maybe you already know that... And... not all browsers supports Java. (But then again, you don't even need a browser to run Java! What am I saying here?...) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server-server file copy question
Hello, "Richard Fox" <[EMAIL PROTECTED]> wrote: > Hi, > > I am using PHP 4.4.2.. I need a function to copy a file from one server to > another. The src/dst filenames are relative to the Document Root of the website, > but I can build an absolute path name if necessary. I can't use ftp because the > ftp ports are closed on these servers. I would like to use http or ssh for > the file transfer. The application is that multiple files can be copied from > website to website on our various servers. I have been looking around at > mailing lists, etc but haven't found a function described which does a > non-ftp inter-IP file copy, only client/server file uploads and ftp > functions. Check: http://www.php.net/manual/en/ref.exec.php And check: (I assume you're using linux...) man scp Just some ideas, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for compiled Windows PHP installation with multistring fts support
Hello, "Simon Dedeyne" <[EMAIL PROTECTED]> wrote: > > Sorry, I meant multibyte strings, like when you want to display > Japanese. ...well, then, you can find one here: (Japanese site) http://www.geocities.jp/rui_hirokawa/php/ or, download the file directly: http://www.geocities.jp/rui_hirokawa/php/win/php-4.2.2-Win32-mb-1.0.lzh That file is already patched. (Esp. for problems that affects Japanese characters, e.g. shift-jis bug, etc.) The person who compiled (and/or patched) it is an author (or co-author) of this series: http://www.amazon.co.jp/exec/obidos/ASIN/4797320974/ref=ase_ruihirokaspag-22 /250-6587854-7764234 HTH, - E PS BTW, it's a good idea to reply to the list. Doing so would give more opportunity to more people to extend more help :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] scrolling data from db
Hello, "Edward Peloke" <[EMAIL PROTECTED]> wrote: > I have a large amount of data to present to the user. Currently, I am just > putting it in a table and displaying it on the page, if it is more than a > page of course the page just scrolls. Is there a way o, without using > frames, to put all the data from the db in the middle of the page with a > scroll bar on the side that just scrolls the data, I mean the header and > footer of the php page do not move? I am sure I will need javascript for > this...right? Not really... Of course, you can use javascript. (I think somebody just posted--er, kindly posted--a sample code...) You can also use CSS to make the header, etc. be "fixed" on different location of your browser window. However, this approach works only on browsers that support that css. (e.g. Mozilla-based browsers like N7, etc. or Opera 6...) How about another approach using "iframes"? (Personally, I don't like frames or iframes...) It might work for you. But then again, the best way IMHO, is to divide your table into different sections or pages. Do you really need to keep them in one page? Just some ideas... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pause for user input?
Hello, "Larry Brown" <[EMAIL PROTECTED]> wrote: > Does anyone know of a method to pause during the processing of a script to > prompt a user for information and then incorporate the user's response for > the remainder of the script? ... in addition to what the others already said, let me just ask a couple of questions: 1. Do you really need to "pause"? What did you exactly mean by "pause"? 2. Is it even necessary to "pause"? Just wondering... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] manage Form data
Hello, "??? ?ta?" <[EMAIL PROTECTED]> wrote: > Can you show me an example? I already tried that but it doesn't work... Please don't get me wrong but... Saying that "it doesn't work..." doesn't work either. You have to at least help others to help you. Show some codes, error messages, etc. And try to be more specific on what/where "doesn't work..." - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flush() issue
Hello, "Andrew Brampton" <[EMAIL PROTECTED]> wrote: > Are you outputing each row in a table? > IE won't start displaying the table until the tag, that might be > causing your problem... ...then, CSS to the rescue... :) Try this: ... HTH, - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pass file data through forms
Hello, "??? ?ta?" <[EMAIL PROTECTED]> wrote: > Is there any way of submitting a file , pass all the data for it throuhg > another form and upload from another form? I'm not sure if I understand your question correctly but you can try using the sample code in the manual for uploading files. Then, instead of moving it to your desired folder, you can just move it first to a temporary folder. This way, if one decided to cancel/abort, you can just unlink() or do some cleaning up of the folder later on. (May not be the best way but I think it'll work...) Just use your imagination, you might just find a better way :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stripping HTML tags, but keeping entities...
Hello, (B (B"David Russell" <[EMAIL PROTECTED]> wrote: (B (B...[snip]... (B (B> Strip_tags removes all info after the < sign. Obviously I would like to (B> convert it to a > entity, but how can I do both of these? (B (BHave you tried this? (B (B http://www.php.net/manual/en/function.preg-replace.php (B (B- E (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New commercial software needs beta testers
"Jeremy Wilson" <[EMAIL PROTECTED]> wrote: > Well fine... by reading a bunch of your other posts when you talk to > people, it looks like you are just a rude SOB... so I am really not > offended. Who is offending who? You attacked a ml with a spam (yes, it's spam) and now you're attacking people? And do you expect people here to test your software? I think I'm missing something here... Or, maybe I'm in the wrong ml? Is this the php (general) ml? I better get some rest... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php