[PHP] test
... -- 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] Test 2
This is only a test. I apologize. -- 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 bring selected rows to upper page
At 09.05.01 09:28, you wrote: Hello friends, I want to prepare a page as attached. But main problem is how can I bring the data to upper page when lower page's row is selected. I want to take all data on selected row to the upper pages fileds. please help me. Murat If you sent a php-made page to the client, it is out of your(the servers) control. You could do something like Layer (doesn´t work on all browsers) or some JavaScript(same as above), or have some selects on your page. You should redesing you page. HTH Oliver -- 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] VERY URGENT
On 8-May-01 at 18:50, Christian Dechery ([EMAIL PROTECTED]) wrote: what in Gods name is that? A pretty well known con. Usually it involves Angola; this crew seems to have at least changed the names and made a few of the other details less obvious. (They probably get revealed later after the in-person or phone meeting.) Despite what it says, they want your money, your account info, and whatever other info they can get from you and translate into money they shouldn't have. Identity theft wouldn't surprise me at all... Even if it were legitimate to the extent that events would occur as outlined; and they weren't just trolling for your account and other info; then you'd probably be guilty of money laundering for going along with their scheme. Check snopes.com - I'm pretty sure they have an entry for this general fraud; and possibly even for this specific variant. -Pat -- 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] VERY URGENT
Aah, welcome to the new South Africa, everybody :-) Rudolf Visagie [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 08:46 To: Christian Dechery Cc: [EMAIL PROTECTED] Subject: Re: [PHP] VERY URGENT On 8-May-01 at 18:50, Christian Dechery ([EMAIL PROTECTED]) wrote: what in Gods name is that? A pretty well known con. Usually it involves Angola; this crew seems to have at least changed the names and made a few of the other details less obvious. (They probably get revealed later after the in-person or phone meeting.) Despite what it says, they want your money, your account info, and whatever other info they can get from you and translate into money they shouldn't have. Identity theft wouldn't surprise me at all... Even if it were legitimate to the extent that events would occur as outlined; and they weren't just trolling for your account and other info; then you'd probably be guilty of money laundering for going along with their scheme. Check snopes.com - I'm pretty sure they have an entry for this general fraud; and possibly even for this specific variant. -Pat -- 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] Sorry, what is PWS
On Sat, 5 May 2001, Thomas Edison Jr. wrote: Latest version of PWS is 4.0! If u're looking for something esy fast to get running, PWS is it. It is not something as easy as apache to install. If you install any Linux or BSD distribution, you get can apache to run out of the box without any effort! No reason to go to network neighbourhood properties and whatsoever... Anuradha -- 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] Starting PHP script with crontab
What about wget foo.bar.com/script.php Anuradha On Thu, 3 May 2001, Noah Spitzer-Williams wrote: is there a service on the web that can do this for you? i once found a site that would accept a url and an interval and would retrieve that url (therefore running any code you had in there) on your interval - Noah Anuradha Ratnaweera [EMAIL PROTECTED] wrote in message Pine.LNX.4.21.0105021110320.342-10@presario">news:Pine.LNX.4.21.0105021110320.342-10@presario... If you are not careful, anyone will be able to run the script! Anuradha On Thu, 19 Apr 2001, Bertjan Schrader wrote: I need tot start a PHP script at night with the crontab. I tried to do it with lynx (lynx http://www.domain.nl/test.php) as a commandline within the crontab. Lynx is starting but the PHP script is not working. Anyone an idea how to do it? OS: Redhat Linux 5.2 Apache PHP as a apache module 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] -- 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] Easy one
Is there a function to check of the existance of character x in string y which returns true or false only? 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] Easy one
Is there a function to check of the existance of character x in string y which returns true or false only? Yes, strstr(). Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] progession bar
Yes, true... it's a Client side problem, and i only can think of scripting solution like JavaScript or VbScript... you can via javascript get the time when the page is opened and on the OnLoad event of the body take the time again and make the difference... Also you can install a progress-bar too before the form is loaded, and even in a seperat window controlled by your javascript! -elias http://www.eassoft.cjb.net Jacky [EMAIL PROTECTED] wrote in message 005301c0d89b$efb63480$[EMAIL PROTECTED]">news:005301c0d89b$efb63480$[EMAIL PROTECTED]... Hi all does anyone know how to make the progression bar according to the time out that has been set up to start after the page is load? Jack [EMAIL PROTECTED] There is nothing more rewarding than reaching the goal you set for yourself -- 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: Classes and arrays
when you reference a property of a class you don't need to say it's a variable, so use $this-item[] instead of $this-$items[$id] and it works okay. I haven't quite worked out why it went wrong in the way it did ... and that'll worry me until I do. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -Original Message- From: Stefan Kostopoulos [mailto:[EMAIL PROTECTED]] Sent: 08 May 2001 20:31 To: [EMAIL PROTECTED] Subject: Classes and arrays Hi! Can anybody explain to me why this script outputs: oneone instead of: zeroone ??? Thanks, stefan ? class Cart { var $items; // Items in our shopping cart function add_item ($id,$text) { $this-$items[$id] = $text; } function output($id){ echo $this-$items[$id]; } } $c = new Cart; $c-add_item(0,zero); $c-add_item(1,one); $c-output(0); $c-output(1); ? -- 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] Little question
Hi, Folks... I have this little snippet of code: ?$myOra=MY STRING ?if (!(empty($myOra) || $myOra=)):{? br table width=550 border=0 align=center tr bgcolor=ff td colspan=3font size=2bOrario:/b?print($myOra)?/font/td /tr /table ?} endif? It should print a little table with the string MY STRING... ... unfortunately, it doesn't. Any suggestion BTW: I run this code on the following configuration: PHP Version: 4.0.4pl1 MySQL API version: 3.23.22-beta Server API: httpd on a RHLinux 7.1 Thanks in advance Gabriele Biondo -- 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] carriage return (writing files)
hello, I'm writing to files with php. How do I include a carriage return, i.e. write strings to different lines in a text file? 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] carriage return (writing files)
Magnus Lawrie wrote: hello, I'm writing to files with php. How do I include a carriage return, i.e. write strings to different lines in a text file? 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] echo foo\n; #-- the \n is a newline echo foo\r; #-- the \r is a carriage return what you use will depend on what system you're working on...if *nix, \n will do... -jack -- 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] R: [PHP] Little question
Already added, nothing changed at all... -Messaggio originale- Da: Jason Murray [mailto:[EMAIL PROTECTED]] Inviato: mercoledì 9 maggio 2001 9.56 A: 'Gabriele Biondo' Oggetto: RE: [PHP] Little question ?$myOra=MY STRING This needs to have a ? after it... Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Detecting error in OCIExecute calls
On Tue, May 08, 2001 at 03:01:58PM -0700, Robert Mena wrote: Hi, I am accessing an oracle database from PHP using stored procedures available. I'd like to detect when a problem occurs in order to stop trying to fetch results. In mysql I check for rc=0 as an error. The php doc does not tell if this applies to oracle as well. The code is something like this $res = OCINewCursor($oraCon); $stm = OCIParse ( $oraCon, BEGIN MY_PROCEDURE(:LOGIN, :PASS, :KEY, :INITIAL, :FINAL, :RES); END; ); OCIBindByName ( $stm, :LOGIN, $login, -1); OCIBindByName ( $stm, :PASS, $pass, -1); OCIBindByName ( $stm, :KEY, $key, -1); OCIBindByName ( $stm, :INITIAL, $initial, -1); OCIBindByName ( $stm, :FINAL, $final, -1); OCIBindByName ( $stm, :RES, $res, -1, OCI_B_CURSOR ); $rc = @OCIExecute ( $stm ); if($rc) { OCIExecute ($res); ... } else { // Error do something! $err = OCIError($stm); var_dump($err); } Thanks. re, tc -- 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] Little question
This snippet should be used as an example of badly written and presented code. It tries too hard to do a simple job and in the result fails dismally. I suggest Gabrielle, that you try to be a little more careful in your coding and not so smart. I can find no less than four errors that I put down to poorly constructed code rather than poor syntax. As a hint, why are you trying to nest cals to PHP - your ? are not properly nested. Had you put them on separate lines and properly indented them, you would have seen that. Why do you have a colon after your if call etc ... On Tue, 08 May 2001 19:56, you wrote: Hi, Folks... I have this little snippet of code: ? $myOra=MY STRING ? if (!(empty($myOra) || $myOra=)){ ? br table width=550 border=0 align=center tr bgcolor=ff td colspan=3font size=2bOrario:/b?print($myOra)?/font/td /tr /table ? } endif ? It should print a little table with the string MY STRING... ... unfortunately, it doesn't. Any suggestion BTW: I run this code on the following configuration: PHP Version: 4.0.4pl1 MySQL API version: 3.23.22-beta Server API: httpd on a RHLinux 7.1 Thanks in advance Gabriele Biondo -- 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] MAX_FILE_SIZE : warning
When I set INPUT TYPE=hidden NAME=MAX_FILE_SIZE VALUE=50 and a user uploads a file bigger than 50 my script prints a warning. How can I use MAX_FILE_SIZE and avoid that warning so that I can print my own error message to the user ? :) Jacob -- [ www.eksperten.dk ] Scandinavias biggest IT forum. -- 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] myODBC from Access to mySQL (Failing)
I know it's off topic, but I've struggled to find a more responsive stream of help than this list - and note that several other ODBC questions have been answered. Why is myODBC so hard to get working on different computers? I just had to reinstall Win 95 Office 97 on one of our test computers AND Win 98 with Office 2000 on another (due to virus hits on our network)... Now, since then, we cannot update our mySQL database from either of them. Fortunately, on my Laptop I can update the mySQL tables via ODBC from Access 2000... So I'm puzzled, trying to remember the various updates that I must have done to get Access 97 on Win 95 to work and also to do the same from Access 2K on Win 98. On both I have installed myODBC and MDAC2.5 but I'm still pulling my hair out. Any help will save my hair. Thanks. Martin E. Koss M: 07946-706459 E: [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] Little question
this : if ... $myOra= ... should be more like : if ... $myOra == ... essentially you're setting $myOra as blank everytime which evaluates to true, then it ends up printing the blank, which is not good. regarding typos, this is a common one and since it reveals no error ... it can be frustrating! :) you have others but this is the big one. and for informational purposes : http://php.net/manual/en/control-structures.php http://php.net/manual/en/language.operators.comparison.php regards, philip I have this little snippet of code: ? $myOra=MY STRING ? if (!(empty($myOra) || $myOra=)){ ? br table width=550 border=0 align=center tr bgcolor=ff td colspan=3font size=2bOrario:/b?print($myOra)?/font/td /tr /table ? } endif ? It should print a little table with the string MY STRING... ... unfortunately, it doesn't. Any suggestion BTW: I run this code on the following configuration: PHP Version: 4.0.4pl1 MySQL API version: 3.23.22-beta Server API: httpd on a RHLinux 7.1 Thanks in advance Gabriele Biondo -- 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] Little question
A good approach to prevent this is to always put your constants on the lefthand side of the condition. This causes a parser error if you accidently try and assign instead of compare. It takes a bit of getting used to, but once you get into the swing of it you'll find it a useful tool in your arsenal of weapons against accidental bugs. So, the previous example would read: if ... == $myOra ... --- This is correct whereas: if ... = $myOra ... --- This would cause a parser error, you'd see the mistake immediately -Original Message- From: Philip Olson [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 10:23 To: Gabriele Biondo Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Little question this : if ... $myOra= ... should be more like : if ... $myOra == ... essentially you're setting $myOra as blank everytime which evaluates to true, then it ends up printing the blank, which is not good. regarding typos, this is a common one and since it reveals no error ... it can be frustrating! :) you have others but this is the big one. and for informational purposes : http://php.net/manual/en/control-structures.php http://php.net/manual/en/language.operators.comparison.php regards, philip I have this little snippet of code: ? $myOra=MY STRING ? if (!(empty($myOra) || $myOra=)){ ? br table width=550 border=0 align=center tr bgcolor=ff td colspan=3font size=2bOrario:/b?print($myOra)?/font/td /tr /table ? } endif ? It should print a little table with the string MY STRING... ... unfortunately, it doesn't. Any suggestion BTW: I run this code on the following configuration: PHP Version: 4.0.4pl1 MySQL API version: 3.23.22-beta Server API: httpd on a RHLinux 7.1 Thanks in advance Gabriele Biondo -- 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] R: [PHP] Little question
this : if ... $myOra= ... should be more like : if ... $myOra == ... essentially you're setting $myOra as blank everytime which evaluates to true, then it ends up printing the blank, which is not good. regarding typos, this is a common one and since it reveals no error ... it can be frustrating! :) you have others but this is the big one. Thanks!!! I was really naive!!! The other errors were all fixed (lots of them were caused by a Copy-paste operation from UE to OE...) Anyway you were really helpful Thanks a lot -- 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] Print array items only once
Hi all, I am querying the categories field in my database to rurn the various categories that can be clicked on. Problem is, if I have 5 items in a category, my categories query lists the category 5 times.. I am trying to work out how to say: while($qry = mysql_fetch_array($res)){ print $res[category]; but only once for this results array. } Can you help with this? Many thanks. Sean. -- 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] Print array items only once
You can try to modify your SQL query and add the DISTINCT statement !! It will return each distinct row only once. example SELECT DISTINCT cat_id, cat_name FROM categories Regards, Nicolas -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 9 mai 2001 12:02 À : [EMAIL PROTECTED] Objet : [PHP] Print array items only once Hi all, I am querying the categories field in my database to rurn the various categories that can be clicked on. Problem is, if I have 5 items in a category, my categories query lists the category 5 times.. I am trying to work out how to say: while($qry = mysql_fetch_array($res)){ print $res[category]; but only once for this results array. } Can you help with this? Many thanks. Sean. -- 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] MAX_FILE_SIZE : warning
Jacob, When you upload a file, it appends a few of its own variables. One of them is size - assuming the file is a variable called $file: if ($file_size $max_size) { echo $file_name . was too big!; } Also, you could check for Mime types. if ($file_type != image/jpeg || $file_type != image/pjpeg) { echo We only like jpegs!; } As a footnote, 500Kb is 512000 bytes (1024 bytes in a Kb). James. When I set INPUT TYPE=hidden NAME=MAX_FILE_SIZE VALUE=50 and a user uploads a file bigger than 50 my script prints a warning. How can I use MAX_FILE_SIZE and avoid that warning so that I can print my own error message to the user ? :) Jacob -- 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] Print array items only once
Thanks very much Nicholas, Sean. Nicolas Guilhot [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You can try to modify your SQL query and add the DISTINCT statement !! It will return each distinct row only once. example SELECT DISTINCT cat_id, cat_name FROM categories Regards, Nicolas -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 9 mai 2001 12:02 À : [EMAIL PROTECTED] Objet : [PHP] Print array items only once Hi all, I am querying the categories field in my database to rurn the various categories that can be clicked on. Problem is, if I have 5 items in a category, my categories query lists the category 5 times.. I am trying to work out how to say: while($qry = mysql_fetch_array($res)){ print $res[category]; but only once for this results array. } Can you help with this? Many thanks. Sean. -- 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 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] Textarea returns causing havoc
Hi all, I have a web form in which users can type their comments into a text area field. This is ok apart from when the users hit a return. As this creates a new line... Is there anyway in which I can get rid of this:- Hi My name is Sam Rose into this: Hi my name is Sam Rose I have tried nl2br() str_replace() but these do not seem to get rid of the returns. What can I do? Thanks in advance. Also could you please reply to me and the list as I am only on the digest list, Sam Rose -- 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] Textarea returns causing havoc
Here is how i do it, and it works: $tmp_desc = str_replace(\t, , str_replace(\n, , str_replace(\r, , $desc))); $desc = $tmp_desc; \t for stipping TABs also - Original Message - From: Sam [EMAIL PROTECTED] Subject: [PHP] Textarea returns causing havoc Hi all, into this: Hi my name is Sam Rose I have tried nl2br() str_replace() -- 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] HTTP Auth
Try using this : ?php $auth = false; // Assume user is not authenticated if (isset( $PHP_AUTH_USER ) isset($PHP_AUTH_PW)) { mysql_connect('localhost','root') or die ( 'Unable to connect to server.' ); mysql_select_db( 'myDB' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = SELECT * FROM myTable WHERE username = '$PHP_AUTH_USER' AND password = '$PHP_AUTH_PW'; // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { // A matching row was found - the user is authenticated. $auth = true; } } if ( ! $auth ) { header( 'WWW-Authenticate: Basic realm=Private' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else { ***your stuff goes here when authenticated } ? works excellent on any browser, apache server with PHP module. T. Edison jr. --- gary [EMAIL PROTECTED] wrote: Im having a problem with Authentication uisng $PHP_AUTH_USER and $PHP_AUTH_PASSWORD works fine connecting via netscape but automatically set to false when using IE 5. Apache server , PHP installed as a module on a freebie server. Code below: ?php // Assume user is not authenticated if (isset($PHP_AUTH_USER) isset($PHP_AUTH_PW)) { // Connect to database $conn = pg_pconnect (dbname=.$db.$login); // Select database on MySQL server // Formulate the query $sql = SELECT * FROM .$table2. WHERE username = '$PHP_AUTH_USER' AND password = '$PHP_AUTH_PW' and valid ='y'; // Execute the query and put results in $result $result = pg_Exec ( $sql ); // Get number of rows in $result. $num = pg_numrows( $result ); if ( $num != 0 ) { // A matching row was found - the user is authenticated. $auth = true; } } if ( ! $auth ) { header(WWW-Authentucate: Basic realm=\Private\\\n); Header (Status: 401 Unauthorized\n); header(HTTP/1.0 401 Unauthorized\n); echo 'Authorization Required.br'; echo 'Please go to a href=./index,php?pg=REGISTERRegistration/a page to Get a logon, It is Free.'; echo brb???.$PHP_AUTH_USER.br???.$PHP_AUTH_PW./b; exit; } else { } pg_close($conn); ? -- 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] = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variables in variable names
Hello, I need some help (newbie). I have some variable names with the form: $name_1 $name_2 $name_3 $name_4... I want to access them by doing something like this: $i=0 $name_$i This doesn't work, how do I include another variable in the name of a variable?. Cheers John -- 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] Variables in variable names
Maybe an array would be more appropriate. e.g. $name[$i] = . . -Stewart -Original Message- From: seriousj [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 12:09 To: [EMAIL PROTECTED] Subject: [PHP] Variables in variable names Hello, I need some help (newbie). I have some variable names with the form: $name_1 $name_2 $name_3 $name_4... I want to access them by doing something like this: $i=0 $name_$i This doesn't work, how do I include another variable in the name of a variable?. Cheers John -- 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] MAX_FILE_SIZE : warning
Thanks :) -- [ www.eksperten.dk ] Scandinavias biggest IT forum. James Holloway [EMAIL PROTECTED] wrote in message 9db61u$7d9$[EMAIL PROTECTED]">news:9db61u$7d9$[EMAIL PROTECTED]... Jacob, When you upload a file, it appends a few of its own variables. One of them is size - assuming the file is a variable called $file: if ($file_size $max_size) { echo $file_name . was too big!; } Also, you could check for Mime types. if ($file_type != image/jpeg || $file_type != image/pjpeg) { echo We only like jpegs!; } As a footnote, 500Kb is 512000 bytes (1024 bytes in a Kb). James. When I set INPUT TYPE=hidden NAME=MAX_FILE_SIZE VALUE=50 and a user uploads a file bigger than 50 my script prints a warning. How can I use MAX_FILE_SIZE and avoid that warning so that I can print my own error message to the user ? :) Jacob -- 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] Variables in variable names
The info is stored in the variables intitally by information entered by a user on a webpage, can you have the browser store the info in an array and have it passed by a form post command? Taylor, Stewart [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Maybe an array would be more appropriate. e.g. $name[$i] = . . -Stewart -Original Message- From: seriousj [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 12:09 To: [EMAIL PROTECTED] Subject: [PHP] Variables in variable names Hello, I need some help (newbie). I have some variable names with the form: $name_1 $name_2 $name_3 $name_4... I want to access them by doing something like this: $i=0 $name_$i This doesn't work, how do I include another variable in the name of a variable?. Cheers John -- 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 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] Variables in variable names
As an alternative you can use associative arrays $i = 0; $i = 1; $i = 2; $i = 3; $name[$i]; -Original Message- From: seriousj [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 4:09 AM To: [EMAIL PROTECTED] Subject: [PHP] Variables in variable names Hello, I need some help (newbie). I have some variable names with the form: $name_1 $name_2 $name_3 $name_4... I want to access them by doing something like this: $i=0 $name_$i This doesn't work, how do I include another variable in the name of a variable?. Cheers John -- 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] remotely include file
hi, my tips for include remote PHP files. first : allow_url_fopen in php.ini, at last: note that neither include nor require for remote file does not work inder Windows. best, Papp Gyozo - [EMAIL PROTECTED] - Original Message - From: Robert Covell [EMAIL PROTECTED] To: Wico de Leeuw [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 2001. május 8. 16:18 Subject: RE: [PHP] remotely include file I tried the exact same thing. I have a whole slew of the classes that have been developed and wanted to centrally locate them on one server. But every time I included the class, it said cannot instantiate non-existent class Blah Blah Blah. But when I copied over the file, it worked like a charm. Any ideas why this would occur? Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: Wico de Leeuw [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 9:30 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] remotly include file At 15:40 8-5-2001 +0200, Dominic Brander wrote: Hi I'm trying to include some php3 files via http. one part of the php files is on a regular server and the other part is on an secure server. Instead of duplicating all the files for both servers I would like to include them via http. How does it work? Like : include(http://www.somehost.ext/path/to/include/include.php;); :) Greetz, Wico thanx domnic -- 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 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] class inheritance question
hi, note that this is also workin in PHP: class A { function aa(){} function bb($x){} } class B extends A { function bb($x) { A::bb(); // inherited method called!!! $this-aa(); } } Nice and perfect. - Original Message - From: py [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 8. 15:02 Subject: [PHP] class inheritance question Hello, Class A{ function aa(){} } Class B extends A{ function bb(){ $this-aa();// I know this is ok } } Class C extends B{ function cc(){ $this-bb();// Will this work ? } } py -- 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 question, yet another
put the array indices in single quote like : echo [a href=\myscript.php?username={$userdata['username']}\]Goto MyScript.php[/a]; - Original Message - From: Jason Stechschulte [EMAIL PROTECTED] To: King, Justin [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 2001. május 8. 21:22 Subject: Re: [PHP] Variable question, yet another On Tue, May 08, 2001 at 01:20:49PM -0500, King, Justin wrote: So when the line hits type 1, it evals like this echo [a href=myscript.php?username={$userdata[username]}]Goto MyScript.php[/a]; Of course this yields an error because of the 's in the anchor tag. But if I add slashes the evaluated code will be echo [a href=\myscript.php?username={$userdata[\username\]}\]Goto MyScript.php[/a]; Why not just break out of the string to print the username? echo [a href=\myscript.php?username=.$userdata[username].\]Goto Myscript.php[/a]; -- Jason Stechschulte [EMAIL PROTECTED] -- The whole history of computers is rampant with cheerleading at best and bigotry at worst. -- 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] -- 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] Recursive SQL Queries: Web Directory Categories
Hello, Joe Celko's 'SQL for Smarties'. Is it a book ( to buy :( ) or is it available on the web (download :) )? If the latter stands please can you give me a link to it? - Original Message - From: Philip Hallstrom [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 8. 21:33 Subject: Re: [PHP] Recursive SQL Queries: Web Directory Categories Also take a look at Joe Celko's 'SQL for Smarties'. There's a whole chapter on this. It gets kind if burly, but it's pretty cool. It's all done by converting your schema below into a tree structure... (no, i don't have any code since I've just read about it never done it :) -philip In article [EMAIL PROTECTED], Krznaric Michael [EMAIL PROTECTED] wrote: James, Take a look at hierarchical queries in MS SQl. If I'm not mistaken, this is part of the SQL 99 standard and is implemented by many SQL 92 compliant database vendors. I know ORACLE and DB2 support it. I'm not sure if you already have but I would investigate this topic with MS SQL. Mike -Original Message- From: James Crowley [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 1:45 PM To: [EMAIL PROTECTED] Subject: [PHP] Recursive SQL Queries: Web Directory Categories Hi, I have a web directory which allows sub-categories to an unlimited level. This is done with a categories table, and assigning a parentid to each... For example ID ParentIDName 10 Products 21 Sub-Category of Products (Level 1) 31 Another Sub-Category (Level 1) 42 A sub-sub-category (Level 2) What I need to do is return a list of an items parent categories. For example, if we are in category 4, I want text outputted saying Products \ Sub-Category\sub-sub Category However, it does not seem possible to do this with a single SQL query. I have succeeded in creating a recursive one below (in MS SQL): CREATE PROCEDURE dbo.dir_recurse(@parentid INT) AS --// List its parent categories DECLARE @childid INT DECLARE hC CURSOR LOCAL FOR SELECT parent FROM categories c WHERE id = @parentid ORDER BY c.name FOR READ ONLY OPEN hC FETCH NEXT FROM hC INTO @childid WHILE @@FETCH_STATUS = 0 AND @childid != 0 BEGIN EXECUTE dir_recurse @childid FETCH NEXT FROM hC INTO @childid END CLOSE hC DEALLOCATE hC RETURN 0 GO However, this returns more than one result set, which neither ASP or PHP (so therefore it's probably the ODBC driver...) seem to support. Help! Regards, - James Editor, VB Web == Web - http://www.vbweb.co.uk Email - [EMAIL PROTECTED] ICQ# - 60612011 == -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 06 May 2001 20:11 To: [EMAIL PROTECTED] Subject: php-general Digest 6 May 2001 19:11:22 - Issue 670 php-general Digest 6 May 2001 19:11:22 - Issue 670 Topics (messages 51587 through 51649): IIS instead of PWS!!! what else can i do.. 51587 by: Thomas Edison Jr. 51588 by: Zak Greant 51591 by: Thomas Edison Jr. 51592 by: Thomas Edison Jr. 51593 by: Zak Greant 51594 by: Alexander Skwar Re: PHP on PWS not working! 51589 by: Thomas Edison Jr. 51590 by: Thomas Edison Jr. 51600 by: Phil Driscoll 51640 by: Thomas Edison Jr. 51644 by: Phil Driscoll Re: Sorry, what is PWS 51595 by: Alexander Skwar Re: Free Database Design Program 51596 by: Andrzej Swedrzynski Novedades en Gordos.com 51597 by: Gordos.com PHP as apache module and security. 51598 by: Andrzej Swedrzynski 51607 by: Estelle Martin 51609 by: Andrzej Swedrzynski Re: nslookup function ? 51599 by: Tom Carter Complete Newbie 51601 by: biscut What is msvcr70.dll?? 51602 by: Ermanno Iannacci Re: PEAR where should I start? 51603 by: Gyozo Papp Image displaying problem 51604 by: Estelle Martin Re: class (not class instance) variables 51605 by: Gyozo Papp Re: quicker query? 51606 by: Gyozo Papp searching a MySQL database 51608 by: Jamie Saunders 51620 by: bill 51623 by: John Vanderbeck Insert data into mysql table 51610 by: Mohamedou Re: wordwrap 51611 by: Yasuo Ohgaki php4apachi.dll 51612 by: Darren best ide for windows 51613 by: Alexander Bierbrauer 51615 by: Gyozo Papp 51617 by: Geir Eivind Mork 51618 by: John Vanderbeck 51626 by: Henrik Hansen 51628 by: Andrzej Swedrzynski 51629 by: Gyozo Papp 51630 by: Alex Piaz 51633 by: Alexander Skwar 51634 by: Bjorn Sodergren 51635 by: Andrzej Swedrzynski 51637 by: John Vanderbeck 51639 by: Andrzej Swedrzynski php.exe [filename .php] vs. run [filename.php] via webserver 51614 by: Art Install problems with PHP and GD 51616 by: John Vanderbeck if string contains... 51619 by: Jamie Saunders 51621 by: Alvin Tan 51622 by: Gyozo Papp Slightly OT - Backing up mySQL... 51624 by:
Re: [PHP] Converting mySQL to PostgreSQL
There are some scripts in the postgres contrib directory which make such thing. Some users are currently developping this scripts and put it in big one which do the whole job. check the postgres mailing lists and the archives. - Original Message - From: Jason Beebe [EMAIL PROTECTED] To: 'Php-General (E-mail)' [EMAIL PROTECTED] Sent: 2001. május 8. 23:45 Subject: [PHP] Converting mySQL to PostgreSQL Hi, I am in need a transfering an existing mySQL database to PostgreSQL. I have seen info on the converter. Before I get started I wanted to see info anyone has any insight or tips on converting these DBs (ie- is it problematic, inconsistent, etc). 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] -- 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] Weirdest error I've ever had....
Hello Chris, br to br / this seems to me an XML-stylish tag. are you sure there is nothing else in the background? - Original Message - From: Chris Anderson [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: 2001. május 6. 18:00 Subject: [PHP] Weirdest error I've ever had Alright I have a simple file writing script. Nothing special. in one part I use this code: $data[$x] = str_replace(br,\n, $data[$x]); to replace break tags with page breaks. Problem is that for some reason it is adding wierd br / tags to the file. It only does this on that server. What is that? Chris Anderson aka Null PHP Developer / Nulltech PHP-GTK Documentation Writer / gtk.php.net STA-DoD, TO and D-Day Administrator / dod.stronger.org, to.stronger.org, dday.stronger.org Zeroping Staff Member / www.zeroping.com Volition Programmer / www.Volition-net.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Variables in variable names
Yes! Add '[]' to the end of the name. This will inform php that all fields with that name should be put into an array after submission. e.g. FORM... INPUT TYPE=TEXT NAME=name[] INPUT TYPE=TEXT NAME=name[] INPUT TYPE=TEXT NAME=name[] ... After submit php will have created an array called $name with 3 entries. -Stewart -Original Message- From: seriousj [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 12:20 To: [EMAIL PROTECTED] Subject: Re: [PHP] Variables in variable names The info is stored in the variables intitally by information entered by a user on a webpage, can you have the browser store the info in an array and have it passed by a form post command? Taylor, Stewart [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Maybe an array would be more appropriate. e.g. $name[$i] = . . -Stewart -Original Message- From: seriousj [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 12:09 To: [EMAIL PROTECTED] Subject: [PHP] Variables in variable names Hello, I need some help (newbie). I have some variable names with the form: $name_1 $name_2 $name_3 $name_4... I want to access them by doing something like this: $i=0 $name_$i This doesn't work, how do I include another variable in the name of a variable?. Cheers John -- 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 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] Variables in variable names
Thanks, that worked great! John -- 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] remotely include file
When PHP does a require or an include on a remote file via http, it sends a GET request to the http server that the file is on, Therefore, if this server has PHP installed on it, then the web server will parse the file before it spits it out. Thus, all of the PHP tags are stripped fom the file for output. Therefore, you cannot remotely include (via http) a php file. If you could, this would be a massive security loophole. -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: [EMAIL PROTECTED] Web: http://www.intasept.com MAKING sense of the INFORMATION TECHNOLOGY age @ WORK.. -- 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] why does this happen
Hi, I am trying to write a php and javascript that will pick up data from a table and display and scroll it. I seem to have run out of ideas how to make the script work. I don't get any display on the screen. I use rand() limit 1 so only one row is selected. Can some one tell me where I went wrong? Adrian =cscroll.php === ? define(CS_FORM, 0); define(A-city, 0); define(A-curr1, 1); define(A-catalogo, 2); define(A-hf, 3); define(A-curr2, 4); define(A-vitofferta, 5); define(A-fh, 6); class cscroll { var $data; var $tcity; var $tcurr1; var $tcatalogo; var $thf; var $tcurr2; var $tvitofferta; var $tfh; function cscroll($data) { /* **copy parameters into properties */ $this-data = $data; foreach($data as $row) { //create list of unique choices for first selector $this-tcity[($row[A-City])] = $row[A-City]; $this-tcurr1[($row[A-curr1])] = $row[A-curr1]; $this-tcatalogo[($row[A-catalogo])] = $row[A-catalogo]; $this-thf[($row[A-hf])] = $row[A-hf]; $this-tcurr2[($row[A-curr2])] = $row[A-curr2]; $this-tvitofferta[($row[A-vitofferta])] = $row[A-vitofferta]; $this-tfh[($row[A-fh])] = $row[A-fh]; } } } function initialize() { echo (form); echo(input name=message size=57 value=\$this-data[A-city]\); echo(/form); } scroll.php while($row = mysql_fetch_object($result)) { $tarray[] = array( A-city=$row-city, A-curr1=$row-curr1, A-catalogo=$row-catalogo, A-hf=$row-hf, A-curr2=$row-curr2, A-vitofferta=$row-vitofferta, A-fh=$row-fh, ); } //instantiate class $tscroll = new cscroll( $tarray); ? html head script language=JavaScript !-- // Text box marquee Modified by Prasad Mapatuna // CHANGE THESE TO ALTER THE SCROLL SPEED var timerID=null var run=false count = 10 // counter of cycles ScrollSpeed = 300; // milliseconds between scrolls ScrollChars = 1;// chars scrolled per time period function Stop() { if(run) clearRimeout(timerID) run=false } function Start() { Stop(); Marquee() } function Marquee() { var msg = document.forms[0].message.value; var tmp = msg.substring(0,ScrollChars); msg = msg.substring(ScrollChars) + tmp; document.forms[0].message.value = msg; if(count200) { timerID = setTimeout('Marquee()',ScrollSpeed); run= true; count++; } } !-- end -- /script title/title META HTTP-EQUIV=Pragma CONTENT=no-cache META HTTP-EQUIV=Cache-Control CONTENT=no-cache /head body bgcolor=white script type=text/javascript language=JavaScript ?php initialize(); ? ?php include(footer.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] Variables in variable names
At 09.05.01 23:08, you wrote: Hello, I need some help (newbie). I have some variable names with the form: $name_1 $name_2 $name_3 $name_4... I want to access them by doing something like this: $i=0 $name_$i This doesn't work, how do I include another variable in the name of a variable?. What you´re looking for is variable variables, Try this: for ($i=0; $i $max_var_count;$i++) { $tmp=name_.$i; $show_var_name_content=$$tmp; } THT Oliver -- 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] quick question: frames OT
Hi Romulo Roberto Pereira, Wednesday, May 09, 2001, 7:11:38 AM, you wrote: Romulo Hello! Romulo Just a quick ot question: Romulo From a php script I open a frameset this divides the browser window in two Romulo rows. How do I do to get rid of the frameset without closing the window? try a link like this: a href=nonframepage.html target=_topExit Frames/a --- EnjoY, Adaran ([EMAIL PROTECTED]) check http://www.adaran.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] Search a string between foo/foo
Hi... I have a text and, some words of the text have the tags url/url between them. What i'm trying to do is to replace the word between that tags for a url, wich I'll search them in a database and convert to a url. It's working fine when I have only one url/url, but when there are more than one, the script converts all the text between the first foo/foo and the last foo/foo. I'm using this code: if (eregi(foo(.*)/foo, $string, $result)) { $string = str_replace($result[1], 'a href='.$result[1].''.$result[1].'/a', $string); } Someone knows what I have to do to put it to work??? Thanks in advance. Luiz Vitor Brazil
Re: [PHP] multiple domain handling with php
Hi Scott Mebberson, Wednesday, May 09, 2001, 7:43:16 AM, you wrote: Scott Does anybody have any scripts or tips on hosting multiple domains on the one Scott account ie. if the domain being requested is this, go here in my account if Scott not go here in my account? Well, I hope I understood you right ;-) Try some enviroment variables, maybe $HTTP_SERVER_VARS[HTTP_HOST] or $HTTP_SERVER_VARS[SERVER_ADDR] Hope it helped, --- EnjoY, Adaran ([EMAIL PROTECTED]) check http://www.adaran.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]
RE: [PHP] Weirdest error I've ever had....
Well, br / is the XHTML-compliant version of br. In XHTML (the current W3C recommendation for web pages), you *have* to explicitly close all tags (i.e. you have to use things like /p). Single tags - br, hr, img, etc - have to be closed as well, and that's how you do it. br / hr width=80% / img src=foo.gif alt=foo / This doesn't help to explain why you're asking for one and getting the other though (sorry). Cheers Jon -Original Message- From: Gyozo Papp [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 12:20 To: Chris Anderson; PHP Subject: Re: [PHP] Weirdest error I've ever had Hello Chris, br to br / this seems to me an XML-stylish tag. are you sure there is nothing else in the background? - Original Message - From: Chris Anderson [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: 2001. május 6. 18:00 Subject: [PHP] Weirdest error I've ever had Alright I have a simple file writing script. Nothing special. in one part I use this code: $data[$x] = str_replace(br,\n, $data[$x]); to replace break tags with page breaks. Problem is that for some reason it is adding wierd br / tags to the file. It only does this on that server. What is that? Chris Anderson aka Null PHP Developer / Nulltech PHP-GTK Documentation Writer / gtk.php.net STA-DoD, TO and D-Day Administrator / dod.stronger.org, to.stronger.org, dday.stronger.org Zeroping Staff Member / www.zeroping.com Volition Programmer / www.Volition-net.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ** 'The information included in this Email is of a confidential nature and isi ntended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- 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] Search a string between foo/foo
The problem is that it matches the first foo with the first /foo and the second foo witht eh /foo ( andmatches those properly) but it also matches the first foo with the second /foo (thisnk of the logic of the regex). What you need to do is rather than specify any character (.*) specify any character which is not foo ie something like ^[foo]* On Wed, 9 May 2001, Luiz Vitor wrote: Hi... I have a text and, some words of the text have the tags url/url between them. What i'm trying to do is to replace the word between that tags for a url, wich I'll search them in a database and convert to a url. It's working fine when I have only one url/url, but when there are more than one, the script converts all the text between the first foo/foo and the last foo/foo. I'm using this code: if (eregi(foo(.*)/foo, $string, $result)) { $string = str_replace($result[1], 'a href='.$result[1].''.$result[1].'/a', $string); } Someone knows what I have to do to put it to work??? Thanks in advance. Luiz Vitor Brazil -- 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] thanks Hrishi AND ANOTHER QUESTION ?
Hi Jorge Amaya, Wednesday, May 09, 2001, 11:39:36 AM, you wrote: Jorge THANK YOU FOR YOUR CONCEPTS, HELPED ME ENOUGH, YOU ARE VERY KIND, I HAVE Jorge A QUESTION MORE, APACHE IT| ALREADY WORKS ME, IT LOADS ME PHP4, BUT THE Jorge NAVIGATOR DOESN'T BEGIN.. Jorge IT DOESN'T LOAD THE NAVIGATOR UP WITH APACHE. Jorge APOLOGIZE TO HAVE WRITTEN YOU TO YOUR OTHER MAIL, A THOUSAND EXCUSES. well, *please* turn off your capslock, it's really annoying, and some people (like me) understand CAPITALS as shouting. Well, what OS/Navigator/Apache version are u using ? --- EnjoY, Adaran ([EMAIL PROTECTED]) check http://www.adaran.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]
Re[2]: [PHP] Variables in variable names
Hi seriousj, Wednesday, May 09, 2001, 1:19:55 PM, you wrote: seriousj The info is stored in the variables intitally by information entered by a seriousj user on a webpage, can you have the browser store the info in an array and seriousj have it passed by a form post command? Try input type=text name=name[0] input type=text name=name[1] ... or even try input type=text name=name[] input type=text name=name[] This should AFAIK result in an Array, but I'm not sure if empty fields are put in. --- EnjoY, Adaran ([EMAIL PROTECTED]) check http://www.adaran.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] passing parameters in the url using forward slashes
Good morning/afternoon/evening.. whatever timezone you live in :) Small question: we all know how to pass parameter using question marks in an URL ofcourse.. but I was wondering whether it was also possible to pass parameters in the URL using forward slashes instead of those question marks, so like: http://blabla/file.php/value and use value as a parameter, obviously. I just tried it, but all I got was an internal server error :(. Anyone who knows *anything* about this? Take care, /franklin -- Franklin van Velthuizen [EMAIL PROTECTED]+46-(0)19-10 99 17 Ebiris AB www.ebiris.se +46-(0)19-10 99 10
Re: [PHP] passing parameters in the url using forward slashes
The Wise Man Said: WISE MAN's EMAIL Subject: RE: [PHP3] URL without a classic php filename like php, php3, phtml? Date: Tue, 11 Apr 2000 12:54:35 MST From: [EMAIL PROTECTED] To: "Michael Simcich" [EMAIL PROTECTED], [EMAIL PROTECTED] Addressed to: "Michael Simcich" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "Michael Simcich" [EMAIL PROTECTED] Tue, 11 Apr 2000 11:23:16 -0700 Is there any way to pass parameters with php without using the classic http://www.whatever.com/somepage.php?param=3 type format? So that the url would look more like In httpd.conf, in the VirtualHost block for the site: Location /ThisIsAProgram ForceType appllication/x-http-php /Location In a php program file, named ThisIsAProgram in the DocumentRoot of the site: == ? $Params = explode( '/', $PATH_INFO ); while( list( $Index, $Value ) = each( $Params )) { echo "Params[ $Index ] = $ValueBR\n" ); } ? == Hit this URL: http://whatever.site.com/ThisIsAProgram/these/directories/are/not/real You should get: Params[ 0 ] = Params[ 1 ] = these Params[ 2 ] = directories Params[ 3 ] = are Params[ 4 ] = not Params[ 5 ] = real If you can't or don't want to do the Location thing, you can name the file ThisIsAProgram.php (or .php3) and call it: http://whatever.site.com/ThisIsAProgram.php/these/directories/are/not/re al But I think it is pretty cool to make the program name look like just another directory in the tree, so I usually use Location. Rick Widmer Internet Marketing Specialists www.developersdesk.com /WISE MAN's EMAIL -Stathis. Franklin van Velthuizen wrote: Good morning/afternoon/evening.. whatever timezone you live in :) Small question: we all know how to pass parameter using question marks in an URL ofcourse.. but I was wondering whether it was also possible to pass parameters in the URL using forward slashes instead of those question marks, so like: http://blabla/file.php/value and use "value" as a parameter, obviously. I just tried it, but all I got was an internal server error :(. Anyone who knows *anything* about this? Take care, /franklin -- Franklin van Velthuizen [EMAIL PROTECTED]+46-(0)19-10 99 17 Ebiris AB www.ebiris.se +46-(0)19-10 99 10 -- 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] Sorry, what is PWS
i have tried both PWS and Apache on a windows98 machine, and franckly Apache is much much better just grab a binary distribution install it and go through the httpd.conf to configure it (that's the trikiest part but the file is very well commented ) voila! best combination: php, apache, Mysql regards 06/05/01 17:28:40, Anuradha Ratnaweera [EMAIL PROTECTED] wrote: On Sat, 5 May 2001, Thomas Edison Jr. wrote: Latest version of PWS is 4.0! If u're looking for something esy fast to get running, PWS is it. It is not something as easy as apache to install. If you install any Linux or BSD distribution, you get can apache to run out of the box without any effort! No reason to go to network neighbourhood properties and whatsoever... Anuradha -- 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] Search a string between foo/foo
.* in your patten will match everything It's greedy like perl (unless you compiled php not to be) add a ? and it will make it none greedy ^[foo]* will not work ^ needs to be in [] to mean not else it means start of string Luiz Vitor [EMAIL PROTECTED] wrote in message 011201c0d87d$57f8ab00$[EMAIL PROTECTED]">news:011201c0d87d$57f8ab00$[EMAIL PROTECTED]... Hi... I have a text and, some words of the text have the tags url/url between them. What i'm trying to do is to replace the word between that tags for a url, wich I'll search them in a database and convert to a url. It's working fine when I have only one url/url, but when there are more than one, the script converts all the text between the first foo/foo and the last foo/foo. I'm using this code: if (eregi(foo(.*)/foo, $string, $result)) { $string = str_replace($result[1], 'a href='.$result[1].''.$result[1].'/a', $string); } Someone knows what I have to do to put it to work??? Thanks in advance. Luiz Vitor Brazil -- 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] MAX_FILE_SIZE : warning
the problem with doing it on your server (you do it just to be sure though) is that the user has to wait for the form + file to be sent to your server before you can respond - this can be very slow JFL [EMAIL PROTECTED] wrote in message 9davlf$s63$[EMAIL PROTECTED]">news:9davlf$s63$[EMAIL PROTECTED]... When I set INPUT TYPE=hidden NAME=MAX_FILE_SIZE VALUE=50 and a user uploads a file bigger than 50 my script prints a warning. How can I use MAX_FILE_SIZE and avoid that warning so that I can print my own error message to the user ? :) Jacob -- [ www.eksperten.dk ] Scandinavias biggest IT forum. -- 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] passing parameters in the url using forward slashes
[cut away some explanation] But I think it is pretty cool to make the program name look like just another directory in the tree, so I usually use Location. I suppose it *is* possible then. Anyway, I've already putten ForceType application/x-httpd-php in an .htaccess in the appropriate directory, and I have a php file called download .. Whenever I go to http://servername/download the file gets parsed and prints some output.. just as you would expect, but as soon as I put slashes after that url, I get an Internal Server Error. I have absolutely *no* idea what causes it though... :( Any ideas, anyone? /Franklin -- Franklin van Velthuizen [EMAIL PROTECTED]+46-(0)19-10 99 17 Ebiris AB www.ebiris.se +46-(0)19-10 99 10
[PHP] File upload using form
Hi! %-) The code below makes a form. This form creates a temporary file that contains the data of the original source file. This temp file is sent to the server using FTP. On my first config (Win NT4, Apache 1.3.19, PHP 4.0.4pl1), the temp file is exactly the same as the original file and so the uploaded file is the same as the original one. On my second config (RedHat 7, Apache 1.3.14, PHP 4.0.4pl1), the temp file has not the same size as the original file because a MIME header is added at the top of file and so the uploaded file is not the same as the original one. The client is IE5 under Win NT4. Where is the problem? Is it an Apache or a PHP fault? How to fix it? Thx. form enctype=multipart/form-data action=upload.php method=post br Fichier : input type=file name=filename size=80 input type=submit value=Upload /form -- 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] remotely include file
there is a way to prevent the remote server from parsing the file before sending it: use an extension that is not associated to php on that server (ie something like .incphp or whatever extension that is not parsed on that server) and add that extension in the receiving server's config for instance if y're using apache, y'd add: Action application/x-httpd-php4 /php4/php.exe AddType application/x-httpd-php4 .php .incphp this way the sending server would send the file as plain text and your server would include it and parse it i never tried this but it should work the downside with this is that your includes could be easaly downloaded and read by anyone on the host server, but you could restrict access to those files to some hosts. regards hassan el forkani 09/05/01 13:37:55, Ben Cairns [EMAIL PROTECTED] wrote: When PHP does a require or an include on a remote file via http, it sends a GET request to the http server that the file is on, Therefore, if this server has PHP installed on it, then the web server will parse the file before it spits it out. Thus, all of the PHP tags are stripped fom the file for output. Therefore, you cannot remotely include (via http) a php file. If you could, this would be a massive security loophole. -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: [EMAIL PROTECTED] Web: http://www.intasept.com MAKING sense of the INFORMATION TECHNOLOGY age @ WORK.. -- 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] string varable...
On Wednesday 09 May 2001 07:46, Vegard wrote: Does anybody know how much text can be stored in a variable og type string? Typically about 2^(sizeof(int) * 8 - 1) chars. On a normal 32 Bit machine that's 2 Gig, on a 64Bitter, one moment, 9223372036854775808 chars -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Nothing is more dangerous than an idea if it's the only one you have. - Emil-Auguste Chartier, Propos sur la religion, 1938 -- 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] Classes and arrays
Hi, write $this-items[$id] instead of $this-$items[$id] bye Wieger Stefan Kostopoulos wrote: Hi! Can anybody explain to me why this script outputs: oneone instead of: zeroone ??? Thanks, stefan ? class Cart { var $items; // Items in our shopping cart function add_item ($id,$text) { $this-$items[$id] = $text; } function output($id){ echo $this-$items[$id]; } } $c = new Cart; $c-add_item(0,zero); $c-add_item(1,one); $c-output(0); $c-output(1); ? -- 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] -- Wieger Uffink tel: +31 20 428 6868 fax: +31 20 470 6905 web: http://www.usmedia.nl -- 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] File upload using form
Hi! %-) The code below makes a form. This form creates a temporary file that contains the data of the original source file. This temp file is sent to the server using FTP. On my first config (Win NT4, Apache 1.3.19, PHP 4.0.4pl1), the temp file is exactly the same as the original file and so the uploaded file is the same as the original one. On my second config (RedHat 7, Apache 1.3.14, PHP 4.0.4pl1), the temp file has not the same size as the original file because a MIME header is added at the top of file and so the uploaded file is not the same as the original one. The client is IE5 under Win NT4. Where is the problem? Is it an Apache or a PHP fault? How to fix it? Thx. form enctype=multipart/form-data action=upload.php method=post br Fichier : input type=file name=filename size=80 input type=submit value=Upload /form -- 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] download successfull... but in binary... why?
I got my script to successfully force the otuput to be redirected to a download of a new file. using: if(stristr($HTTP_USER_AGENT,MSIE)) $att=; else $att= attachment;; header(Content-type: application/download); header(Content-disposition:.$att. filename=.$filename); but the problem is, the output is comming as binary... so the '\n' is not working, instead it'comming as a one giant line with lots of weird chars instead of '\n'... how do I force it to be in ASCII mode? and where can I find reference on these header stuff? . [ Christian Dechery ] . Webdeveloper @ Tá Na Mesa! . Listmaster @ Gaita-L . http://www.tanamesa.com.br -- 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] download successfull... but in binary... why?
header(Content-type: application/download); I think you'd need to change this to: header(Content-type: text/plain); but I could be wrong... and where can I find reference on these header stuff? Not sure. I find bits and pieces in this list... Chris
Re: [PHP] passing parameters in the url using forward slashes
hmm.. good question i don' t know exactly how it's done but i actually know a site that uses this extensively www.emp3finder.com, they concat strings i think it involves massive server configuration regards 09/05/01 14:08:25, Franklin van Velthuizen [EMAIL PROTECTED] wrote: -- 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] download successfull... but in binary... why?
the man page for header() says look here: http://www.w3.org/Protocols/rfc2616/rfc2616 From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 9:33 AM where can I find reference on these header stuff? -- 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] Identifying input type=file
I need to identify the particular name of a file upload type field: input type='file' name='image1' The elements are generated dynamically and I don't know the specific name of the field beforehand and of course need to read it before processing the form. Using $HTTP_POST_VARS does not seem to recognize this type of input field. Is there another method? I do have the form as: form action=file.html method=post enctype=multipart/form-data and I can catch all the other form elements without a problem. thanks, ron -- 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] PHP priviledges
Hello: In my host, the php is installed in a way that I have access from a php script to all the webs on that server, (there are almost 60) and I can delete/copy any file of other servers. I don't like this because other user of that server can do the same as I. I have contacted with my host and they doesn't know how to prevent php/IIS to have access to other directories on the server, Is this possible? Best Regards Visual PHP Studio, RAD development with PHP http://www.visualphpstudio.f2s.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] download successfull... but in binary... why?
At 08:39 9/5/2001 -0500, Boget, Chris wrote: header(Content-type: application/download); I think you'd need to change this to: header(Content-type: text/plain); but I could be wrong... and where can I find reference on these header stuff? Not sure. I find bits and pieces in this list... tried it... doesn't work. if I change to 'text/plain' the download doesn't occur... it shows the output on screen... -- 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: Re[2]: [PHP] Variables in variable names
or even try input type=text name=name[] input type=text name=name[] This should AFAIK result in an Array, but I'm not sure if empty fields are put in. You will get the empty fields except for checkboxes. For checkboxes only the checked elements come through so you need values that determine which box was checked. So say you have: input type=checkbox name=box[] value=box_1 input type=checkbox name=box[] value=box_2 checked input type=checkbox name=box[] value=box_3 checked $box[0] == box_2 $box[1] == box_3 -- 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] Search a string between foo/foo
It's still not working. I'm using the pattern ([^foo]*) and I'm getting the first match correct, but it's not getting all the other matches. Thanks, Luiz Vitor - Original Message - From: Toby Dacre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 9:06 AM Subject: Re: [PHP] Search a string between foo/foo .* in your patten will match everything It's greedy like perl (unless you compiled php not to be) add a ? and it will make it none greedy ^[foo]* will not work ^ needs to be in [] to mean not else it means start of string Luiz Vitor [EMAIL PROTECTED] wrote in message 011201c0d87d$57f8ab00$[EMAIL PROTECTED]">news:011201c0d87d$57f8ab00$[EMAIL PROTECTED]... Hi... I have a text and, some words of the text have the tags url/url between them. What i'm trying to do is to replace the word between that tags for a url, wich I'll search them in a database and convert to a url. It's working fine when I have only one url/url, but when there are more than one, the script converts all the text between the first foo/foo and the last foo/foo. I'm using this code: if (eregi(foo(.*)/foo, $string, $result)) { $string = str_replace($result[1], 'a href='.$result[1].''.$result[1].'/a', $string); } Someone knows what I have to do to put it to work??? Thanks in advance. Luiz Vitor Brazil -- 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] download successfull... but in binary... why?
At 07:45 9/5/2001 -0700, you wrote: You decided it was using binary because \n was not being converted to \r\n? Aren't you just struggling with the difference between unix and windows files? Perhaps if you filtered the files replacing \n to \r\n when destination is windows platform. thanks man... that actually worked out... now the file is in perfect ascii mode just the way I wanted it. Thanks a lot! -- 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] Recursive SQL Queries: Web Directory Categories
It's a book to buy... On Wed, 9 May 2001, Gyozo Papp wrote: Hello, Joe Celko's 'SQL for Smarties'. Is it a book ( to buy :( ) or is it available on the web (download :) )? If the latter stands please can you give me a link to it? - Original Message - From: Philip Hallstrom [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 8. 21:33 Subject: Re: [PHP] Recursive SQL Queries: Web Directory Categories Also take a look at Joe Celko's 'SQL for Smarties'. There's a whole chapter on this. It gets kind if burly, but it's pretty cool. It's all done by converting your schema below into a tree structure... (no, i don't have any code since I've just read about it never done it :) -philip In article [EMAIL PROTECTED], Krznaric Michael [EMAIL PROTECTED] wrote: James, Take a look at hierarchical queries in MS SQl. If I'm not mistaken, this is part of the SQL 99 standard and is implemented by many SQL 92 compliant database vendors. I know ORACLE and DB2 support it. I'm not sure if you already have but I would investigate this topic with MS SQL. Mike -Original Message- From: James Crowley [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 1:45 PM To: [EMAIL PROTECTED] Subject: [PHP] Recursive SQL Queries: Web Directory Categories Hi, I have a web directory which allows sub-categories to an unlimited level. This is done with a categories table, and assigning a parentid to each... For example ID ParentIDName 10 Products 21 Sub-Category of Products (Level 1) 31 Another Sub-Category (Level 1) 42 A sub-sub-category (Level 2) What I need to do is return a list of an items parent categories. For example, if we are in category 4, I want text outputted saying Products \ Sub-Category\sub-sub Category However, it does not seem possible to do this with a single SQL query. I have succeeded in creating a recursive one below (in MS SQL): CREATE PROCEDURE dbo.dir_recurse(@parentid INT) AS --// List its parent categories DECLARE @childid INT DECLARE hC CURSOR LOCAL FOR SELECT parent FROM categories c WHERE id = @parentid ORDER BY c.name FOR READ ONLY OPEN hC FETCH NEXT FROM hC INTO @childid WHILE @@FETCH_STATUS = 0 AND @childid != 0 BEGIN EXECUTE dir_recurse @childid FETCH NEXT FROM hC INTO @childid END CLOSE hC DEALLOCATE hC RETURN 0 GO However, this returns more than one result set, which neither ASP or PHP (so therefore it's probably the ODBC driver...) seem to support. Help! Regards, - James Editor, VB Web == Web - http://www.vbweb.co.uk Email - [EMAIL PROTECTED] ICQ# - 60612011 == -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 06 May 2001 20:11 To: [EMAIL PROTECTED] Subject: php-general Digest 6 May 2001 19:11:22 - Issue 670 php-general Digest 6 May 2001 19:11:22 - Issue 670 Topics (messages 51587 through 51649): IIS instead of PWS!!! what else can i do.. 51587 by: Thomas Edison Jr. 51588 by: Zak Greant 51591 by: Thomas Edison Jr. 51592 by: Thomas Edison Jr. 51593 by: Zak Greant 51594 by: Alexander Skwar Re: PHP on PWS not working! 51589 by: Thomas Edison Jr. 51590 by: Thomas Edison Jr. 51600 by: Phil Driscoll 51640 by: Thomas Edison Jr. 51644 by: Phil Driscoll Re: Sorry, what is PWS 51595 by: Alexander Skwar Re: Free Database Design Program 51596 by: Andrzej Swedrzynski Novedades en Gordos.com 51597 by: Gordos.com PHP as apache module and security. 51598 by: Andrzej Swedrzynski 51607 by: Estelle Martin 51609 by: Andrzej Swedrzynski Re: nslookup function ? 51599 by: Tom Carter Complete Newbie 51601 by: biscut What is msvcr70.dll?? 51602 by: Ermanno Iannacci Re: PEAR where should I start? 51603 by: Gyozo Papp Image displaying problem 51604 by: Estelle Martin Re: class (not class instance) variables 51605 by: Gyozo Papp Re: quicker query? 51606 by: Gyozo Papp searching a MySQL database 51608 by: Jamie Saunders 51620 by: bill 51623 by: John Vanderbeck Insert data into mysql table 51610 by: Mohamedou Re: wordwrap 51611 by: Yasuo Ohgaki php4apachi.dll 51612 by: Darren best ide for windows 51613 by: Alexander Bierbrauer 51615 by: Gyozo Papp 51617 by: Geir Eivind Mork 51618 by: John Vanderbeck 51626 by: Henrik Hansen 51628 by: Andrzej Swedrzynski 51629 by: Gyozo Papp 51630 by: Alex Piaz 51633 by: Alexander Skwar 51634 by: Bjorn Sodergren 51635 by: Andrzej Swedrzynski 51637 by: John Vanderbeck 51639 by: Andrzej Swedrzynski php.exe [filename .php] vs. run [filename.php] via
RE: [PHP] Search a string between foo/foo
Try using the perl regular expressions and setting the quantifier to ungreedy e.g. This should work. $pat = /url(.*)\/url/U; $rep = A HREF='\\1'\\1/A; $string = preg_replace($pat, $rep, $string); -Stewart -Original Message- From: Luiz Vitor [mailto:[EMAIL PROTECTED]] Sent: 09 May 2001 15:14 To: [EMAIL PROTECTED] Subject: Re: [PHP] Search a string between foo/foo It's still not working. I'm using the pattern ([^foo]*) and I'm getting the first match correct, but it's not getting all the other matches. Thanks, Luiz Vitor - Original Message - From: Toby Dacre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 9:06 AM Subject: Re: [PHP] Search a string between foo/foo .* in your patten will match everything It's greedy like perl (unless you compiled php not to be) add a ? and it will make it none greedy ^[foo]* will not work ^ needs to be in [] to mean not else it means start of string Luiz Vitor [EMAIL PROTECTED] wrote in message 011201c0d87d$57f8ab00$[EMAIL PROTECTED]">news:011201c0d87d$57f8ab00$[EMAIL PROTECTED]... Hi... I have a text and, some words of the text have the tags url/url between them. What i'm trying to do is to replace the word between that tags for a url, wich I'll search them in a database and convert to a url. It's working fine when I have only one url/url, but when there are more than one, the script converts all the text between the first foo/foo and the last foo/foo. I'm using this code: if (eregi(foo(.*)/foo, $string, $result)) { $string = str_replace($result[1], 'a href='.$result[1].''.$result[1].'/a', $string); } Someone knows what I have to do to put it to work??? Thanks in advance. Luiz Vitor Brazil -- 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 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] download successfull... but in binary... why?
Hi, header(Content-type: application/download); try this: Header(Content-Type: application/x-octet-stream); It always worked for me... good luck, Sebastian -- 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] passing parameters in the url using forward slashes
On 9 May 2001 05:05:30 -0700, [EMAIL PROTECTED] (Franklin van Velthuizen) wrote: Good morning/afternoon/evening.. whatever timezone you live in :) Small question: we all know how to pass parameter using question marks in an URL ofcourse.. but I was wondering whether it was also possible to pass parameters in the URL using forward slashes instead of those question marks, so like: http://blabla/file.php/value and use value as a parameter, obviously. This has been known to work on some setups out of the box (like mine :), but the best way to do it is probably to use mod_rewrite. This takes an url and, er, rewrites it to point at your script. However, you have to parse the URL yourself, it'll be in $HTTP_SERVER_VARS[REQUEST_URI]; -- Thomas 'Freaky' Hurst - [EMAIL PROTECTED] - http://www.aagh.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] PHP ans snmp commands
Hi, In installed PHP 4.0.5 with apache 1.3.19 but now a have problems with the SNMP commands. My browser tell me this: Fatal error: Call to undefined function: snmpget() in /disks//www/linux/snmptest.php on line 2 I installed UCD-SNMP on my system but it dosen't work. Can sombody help me Thonix -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.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] Working with numbers
Could you suggest a function for displaying decimal zeros. For example I have this: $num = 2.00; $num2 = 3.00; $result = $num + $num2; echo $result; I get 5 but not 5.00 Anyone outhere? Thanks in advance! Gerry Figueroa -- 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] Detecting error in OCIExecute calls
OCIError($stm) Will tell you if an error has been raised. The error returned is whatever you asked the Oracle procedure to raise, or the error is a positive integer if Oracle raised the error internally ORA-0 (OCIError() = 0) means the operation completed succesfully. This may or maynot be correct if a technically successful operation gives you bad information, which is why I mentioned raising an error in the procedure. -Mike -Original Message- From: Robert Mena [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 6:02 PM To: php mailing list Subject: [PHP] Detecting error in OCIExecute calls -- 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] Working with numbers
Use number_format() function. See http://www.php.net/manual/en/function.number-format.php for detail. Reuben D. B At 11:22 AM 5/9/01 -0700, Gerry wrote: Could you suggest a function for displaying decimal zeros. For example I have this: $num = 2.00; $num2 = 3.00; $result = $num + $num2; echo $result; I get 5 but not 5.00 Anyone outhere? Thanks in advance! Gerry Figueroa -- 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] progession bar
I remember that a somewhat similar issues was discussed here sometime ago. Check the list archives ( I think the subject was Progress Bar). Hope that will give you some ideas also. Reuben D. B At 12:32 PM 5/9/01 -0500, Jacky wrote: Hi all Does any one know how to do the progession bar to mesure the time out? Like give it 1 minute for the bar to progress, I got some logic here but something still unclear to me. The procedures I see are 1. get curren time when the page is loaded 2. add 60 seconds on that current time value to tell when to stop the bar 3. make a table , 6 rows so each row repersent every 10 seconds 4. This is the bit where I got stuck, how do I change the color of table cell every 10 secs for 6 times. any help will be thankful Jack [EMAIL PROTECTED] There is nothing more rewarding than reaching the goal you set for yourself -- 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, problems with sessions.....
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Subject: [PHP] HELP, problems with sessions. so what aren'T i understanding here? shouldn't all the vars and values be in the encoded string??? and what could cause the loss of the session vars on my server, what can i do to debug this? You should not have to call session_encode() to get sessions to work. Make session_start(); the first line on each page where you want to use session variables. Use session_register() on each variable you want to be a session variable. If you still have problems, please post your code so we can look for bugs. Good luck! Kirk -- 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] GetImageSize
For some reason, I can get the image image size for an image on the local machine, but remotely give me an error My code ?php $size = GetImageSize (images/title.gif); echo size: $size[0]p; echo size: $size[1]p; echo size: $size[2]p; echo size: $size[3]p; $size = GetImageSize (http://www.picpage.com/users/ka/kaurisma1331/images/image0.jpg;); echo size: $size[0]p; echo size: $size[1]p; echo size: $size[2]p; echo size: $size[3]p; ? Output size: 310 size: 80 size: 1 size: width=310 height=80 Warning: Unable to open http://www.picpage.com/users/ka/kaurisma1331/images/image0.jpg in web/imagetest.php on line 13 size: size: size: size: -- 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, problems with sessions.....
On Wed, May 09, 2001 at 09:30:27AM -0600, Johnson, Kirk wrote: You should not have to call session_encode() to get sessions to work. Make uhm, i used session_encode to print out the things for debugging session_start(); the first line on each page where you want to use session variables. Use session_register() on each variable you want to be a session that's what i do variable. If you still have problems, please post your code so we can look for bugs. Good luck! uhm, the problem is that the code works on one machine but not on another one, so i suppose its a setup problem and not a coding problem but here that's whats not going: ? session_start(); if(!isset($HTTP_SESSION_VARS[toto])) { echo hell no toto defined; session_register(toto); $HTTP_SESSION_VARS[toto] = hello; }//if(!isset($HTTP_SESSION_VARS[toto])) else echo toto was set to:'.$HTTP_SESSION_VARS[toto].'BR; ... rest of the page that has nothing to do with this session ... echo HR\nsession:; echo session_encode(); echo Pdebug, after the run: num of sess vars:.count($HTTP_SESSION_VARS).BR\n; reset ($HTTP_SESSION_VARS); while (list ($key, $val) = each ($HTTP_SESSION_VARS )) { echo Sesvar '$key' = '$val'BR\n; }//while (list ($key, $val) = each ($HTTP_SESSION_VARS ) ? this is basicly what i have, and that is working on one machine and not on another -- ciao bboett == [EMAIL PROTECTED] http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett === the total amount of intelligence on earth is constant. human population is growing -- 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, problems with sessions.....
My guess is one server has register_globals on, the other has register_globals off. Try this change in your code: instead of assigning a value to $HTTP_SESSION_VARS[toto], instead assign a value to $toto. You will then see a value for $toto in the echo session_encode(). $HTTP_SESSION_VARS[toto] and $toto are *not* the same variables while on the current page. The other way to approach it is to use an .htaccess file to turn register_globals off but leave your code as it is below. Again, you will then see a value for $toto in the echo session_encode(). Kirk -Original Message- but here that's whats not going: ? session_start(); if(!isset($HTTP_SESSION_VARS[toto])) { echo hell no toto defined; session_register(toto); $HTTP_SESSION_VARS[toto] = hello; }//if(!isset($HTTP_SESSION_VARS[toto])) else echo toto was set to:'.$HTTP_SESSION_VARS[toto].'BR; ... rest of the page that has nothing to do with this session ... echo HR\nsession:; echo session_encode(); echo Pdebug, after the run: num of sess vars:.count($HTTP_SESSION_VARS).BR\n; reset ($HTTP_SESSION_VARS); while (list ($key, $val) = each ($HTTP_SESSION_VARS )) { echo Sesvar '$key' = '$val'BR\n; }//while (list ($key, $val) = each ($HTTP_SESSION_VARS ) ? this is basicly what i have, and that is working on one machine and not on another -- 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] resetting the pointer in a MySQL database table
Hi, I have a table set-up so that every time you enter an item, a unique primary key is assigned to it (using auto-increment). However, I've deleted all data from the table but when I go to add an item the pointer is still set at the number of the last item I entered. Is there any way of resetting it? Thanks. Jamie Saunders Mail: [EMAIL PROTECTED] Web: http://jamie-s.co.uk -- 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] attach file to email
How do I attach a file to an email? I'd have a mailbody also, with some text... ad I wanna attach a text file to it, but I don't want it to be appended in the body... I want it as an attachment. _ . Christian Dechery - CTO .. WebDeveloper @ Webstyle! .. http://www.webstyle.com.br .. http://www.tanamesa.com.br -- 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] Working with numbers
At 11:22 9/5/2001 -0700, Gerry wrote: Could you suggest a function for displaying decimal zeros. For example I have this: $num = 2.00; $num2 = 3.00; $result = $num + $num2; echo $result; I get 5 but not 5.00 try $result = (float)$num + (float)$num2; -- 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] Novedades en Gordos.com
[PHP] PHP Mysql query data conversion newbie
Hello, I pull some data from mysql with the php code below. On the date field if there is no date on mysql it displays : -00-00 00:00:00 I would like to change this -00-00 00:00:00 to no date for example.. Or if the cel is empty to (because otherwise the tableborders are messed up) I tried to put an if statement inside the while {} but i cannot figured out... Thank You, Andras {$aresult=mysql_query(select * from media where d like '$city' order by i ,$db);} while($amyrow = mysql_fetch_array($aresult)) { echo /tdtdfont face=verdana size=1; echo $amyrow[i]; echo /tdtdfont face=verdana size=1; echo $amyrow[j]; echo /tdtdfont face=verdana size=1; echo $amyrow[f]; echo /td; } -- 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] Environment Variables
BlankHello, I need to look up in the PHP online reference other variables similar to $DOCUMENT_ROOT. I can't find them. Anyone know where to find them at? Thank you, Karl J. Stubsjoen www.excelir.com/worldshop -- 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] Environment Variables
http://www.php.net/manual/en/language.variables.predefined.php#language.vari ables.predefined.php Kirk -Original Message- From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 10:08 AM To: PHP Mailing List Subject: [PHP] Environment Variables BlankHello, I need to look up in the PHP online reference other variables similar to $DOCUMENT_ROOT. I can't find them. Anyone know where to find them at? Thank you, Karl J. Stubsjoen www.excelir.com/worldshop -- 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] forcing error documents
I'm trying to force arbitrary errors in the HTTP header like so: header('HTTP/1.1 404 Not found.'); It's not working like I expected. I found a few discussions of this on this list that said that this did not work with PHP 3, but I've found nothing about PHP 4. The manual says that you should do this on PHP scripts that are meant to serve as 404 (or other error) pages, and as I'm not an expert in HTTP, I gather that this means that such an error header doesn't redirect the user or throw an error on the client -- it's just a hint telling the browser that this is an error page. So, I'm guessing that you'd have to do web server-specific stuff to get this to work -- that is, to get it to behave exactly the way Apache would on its own with a 404 (whether that's redirecting or otherwise). Anyone get this to work? Or anyone know what will work? Or why specifically it won't work? Thanks. Dean. -- 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] progession bar
This is a very simple progress bar, you need to decorate it. As you can see the step() function deals with the ellapsed time. For more see your favourite javascript manual or for example http://www.webreference.com/dhtml/ Feel free to use it: !doctype html public -//W3C//DTD HTML 4.0 Transitional//EN html style #container { WIDTH: 60px; POSITION: absolute; TOP: 80px; BACKGROUND-COLOR: red } #progress { WIDTH: 1px; BACKGROUND-COLOR: blue } /style SCRIPT language='Javascript1.2' !-- function start() { if(document.layers) { ellapsed = document.progress; } else if (document.all) { ellapsed = progress.style }; ellapsed.width = 0; step(); } function step() { if (parseInt(ellapsed.width) 60) { setTimeout('step()', 100)}; ellapsed.width = parseInt(ellapsed.width) + 1; } // -- /SCRIPT /head body a href=javascript:start();click to start/a pthis progress bar is in hurry :), you should adjust the 2nd argument of setTimeout() in function step() from 100 to what you prefer./p !-- here comes the progress bar -- div id='container'span id='progress'/span/div /body /html - Original Message - From: Jacky [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 9. 19:32 Subject: [PHP] progession bar Hi all Does any one know how to do the progession bar to mesure the time out? Like give it 1 minute for the bar to progress, I got some logic here but something still unclear to me. The procedures I see are 1. get curren time when the page is loaded 2. add 60 seconds on that current time value to tell when to stop the bar 3. make a table , 6 rows so each row repersent every 10 seconds 4. This is the bit where I got stuck, how do I change the color of table cell every 10 secs for 6 times. any help will be thankful Jack [EMAIL PROTECTED] There is nothing more rewarding than reaching the goal you set for yourself -- 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 Mysql query data conversion newbie
Well, it's not immediately obvious whether your date is in i, j, or f, so let's pretend it's in date :-) Try this: while($amyrow = mysql_fetch_array($aresult)) { echo /tdtdfont face=verdana size=1; echo $amyrow[i]; echo /tdtdfont face=verdana size=1; echo $amyrow[j]; echo /tdtdfont face=verdana size=1; echo $amyrow[f]; echo /tdtdfont face=verdana size=1; if ($amyrow[date] == -00-00 00:00:00) { echo no date; } else { echo $amyrow[date]; } echo /td; } } HTH Jon -Original Message- From: Andras Kende [mailto:[EMAIL PROTECTED]] Sent: 28 April 2001 17:01 To: [EMAIL PROTECTED] Subject: [PHP] PHP Mysql query data conversion newbie Hello, I pull some data from mysql with the php code below. On the date field if there is no date on mysql it displays : -00-00 00:00:00 I would like to change this -00-00 00:00:00 to no date for example.. Or if the cel is empty to (because otherwise the tableborders are messed up) I tried to put an if statement inside the while {} but i cannot figured out... Thank You, Andras {$aresult=mysql_query(select * from media where d like '$city' order by i ,$db);} while($amyrow = mysql_fetch_array($aresult)) { echo /tdtdfont face=verdana size=1; echo $amyrow[i]; echo /tdtdfont face=verdana size=1; echo $amyrow[j]; echo /tdtdfont face=verdana size=1; echo $amyrow[f]; echo /td; } -- 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] ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- 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] Maintaining authentication credentials for session
I've read many docs on how to accept an ID and password throughout a session but it's just over my head I guess!? What I want to do is have someone login, verify that against LDAP directory. If the authentication is accepted, hold the credentials until the user either closes the browser or clicks on a logout link. I'm relatively new to PHP so talk gently! :) I am able to browse and modify user entries using LDAP. That part isn't a problem. Integrating what I have with a session is just hurting my head! Thanks in advance for your help and time. Please advise if I posted to wrong forum! Troy Moreland -- 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] passing parameters in the url using forward slashes
On Wednesday 09 May 2001 14:41, hassan el forkani wrote: hmm.. good question i don' t know exactly how it's done but i actually know a site that uses this extensively www.emp3finder.com, they concat strings i think it involves massive server configuration It's quite simple. Read the tutorial Building dynamic websites with search engines in mind on phpbuilder.com. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) REALITY.SYS corrupted ... reboot Universe [Y,n]? -- 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] Identifying input type=file
On Wednesday 09 May 2001 15:59, Ron Dyck wrote: I need to identify the particular name of a file upload type field: input type='file' name='image1' The elements are generated dynamically and I don't know the specific name of the field beforehand and of course need to read it before processing the form. Using $HTTP_POST_VARS does not seem to recognize this type of input field. Is there another method? I do have the form as: form action=file.html method=post enctype=multipart/form-data and I can catch all the other form elements without a problem. Re-Read the chapter on file uploads in the manual. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) REALITY.SYS corrupted ... reboot Universe [Y,n]? -- 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] Unix file vs. Mac file formats
Help! Does anyone have any tips on how to deal with this problem I'm having: PHP 4.0.5 (on Redhat Linux as an Apache module) won't properly execute included files that are saved in the Mac file format instead of a Unix file format. (they use different characters to signify an end of line) The problem seems to arise with all code after a comment line declared with //. The code actually seems to display on the screen as HTML text. Changing the file to a Unix file format solves it. I'm trying to avoid changing all the files as we're moving dozens of sites from a previous Linux server with PHP v4.0.3pl1 to this new server. This problem doesn't happen on the old server. Is it an issue with the new version? Is there some sort of configuration switch I should be looking at? Any suggestions? Thanks! ..jon -- ..::.:..::.::.:.:..::..:::...:.:.::.::.::.:.. jon mclaughlin digitalnoise.com a division of PLATFORM.NET .:.:.:..::.:.:::..:::...:.:.::.::.:.::.:. p:646.613.3510 c:917.612.8261 f:646.613.3599 e:[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]