Re: [PHP] preg_match question: locating unmatched HTML tags

2003-02-22 Thread Ernest E Vogelsinger
At 03:35 22.02.2003, Andy Crain said: [snip] >My apologies in advance if this too basic or there's a solution easily >found out there, but after lots of searching, I'm still lost. > >I'm trying to build a regexp that would parse user-supplied text and >identi

Re: [PHP] Problem with Arrays?

2003-02-22 Thread Ernest E Vogelsinger
ication on the array within the function will effect the original array (same is true if declared global). Without reference the original array remains unchanged. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] what's the matter?

2003-02-22 Thread Ernest E Vogelsinger
known index, or something like that). if (array_key_exists('gender', $_POST)) $gender = $_POST['gender']; else $gender = null; Being paranoid you might even check if $_POST is available: if (is_array($_POST)) -- >O Ernest E. Vogelsinger (\)ICQ #1

Re: [PHP] Constant Arrays Possible?

2003-02-23 Thread Ernest E Vogelsinger
is defined, it can never be changed or undefined. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question about replacing \r\n with

2003-02-23 Thread Ernest E Vogelsinger
repl, $text); Should catch all possible variations, and finally substitute your "" with a "" followed by a newline character, to beautify the output. Note the "s" modifier that tells the regex parser to handle $text as a single line. If this is missing it will not find newline characters... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: FW: [PHP] Constant Arrays Possible?

2003-02-23 Thread Ernest E Vogelsinger
you could see this immediately by yourself. HTH, -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Please help!!

2003-02-23 Thread Larry E. Ullman
I have installed a script named ALUMNI in www.alipso.com/alumni but there is an error somewhere, and I can“t find it... Please post the code here if it's not too long (in your email, not as an attachment) so that we can see it. Please enter to http://alipso.com/alumni/addschool.php3 and try to a

Re: [PHP] Is there a way to "include" php source files in a php script ?

2003-02-23 Thread Ernest E Vogelsinger
27;m feeling better now - yes it is possible. See these pages at the online manual: http://www.php.net/manual/en/function.include.php http://www.php.net/manual/en/function.include-once.php http://www.php.net/manual/en/function.require.php http://www.php.net/manual/en/function.requi

Re: [PHP] includes || perl

2003-02-23 Thread Ernest E Vogelsinger
ses one of my other php includes not >to function correctly. > >unfortunately, I do not think O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] simple ereg question

2003-02-23 Thread Ernest E Vogelsinger
At 01:01 24.02.2003, Robert E. Harvey, M.D. said: [snip] > if (is_numeric($_POST["gamt_$i"]) or empty($_POST"gamt_$i")) > >or this: > > if (is_numeric($_POST["gamt_$i"]) || empty($_POST"gamt_$i")) &g

Re: [PHP] Downloading files - Plz hlp

2003-02-23 Thread Ernest E Vogelsinger
cation/octet-stream'); header('Content-Length: ' . strlen($export)); header('Content-Disposition: attachment;filename="sample.exe"'); echo $export; exit(); -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinge

Re: [PHP] PHP_SELF syntax

2003-02-23 Thread Ernest E Vogelsinger
ERVER['PHP_SELF']\">\n"; [snip] When using array elements within a string you must enclose it in curly brackets, like this: print "\n"; HTH, -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at

Re: [PHP] session_start

2003-02-24 Thread Ernest E Vogelsinger
return void - this should be stated correctly in the manual IMHO. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Renaming an uploaded file

2003-02-24 Thread Ernest E Vogelsinger
At 10:20 24.02.2003, you said: [snip] >Sex is like air. It's only a big deal if you can't get any. [snip] :)) This is one I like... -- >O Ernest E. Vogelsinger (\)ICQ #1339403

Re: [PHP] What is wrong with this?

2003-02-24 Thread Ernest E Vogelsinger
ot;WHERE". Your code should better read $query = "SELECT * FROM ssr WHERE "; $query .= $sql; Have an eye on the added blank after WHERE. HTH, -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session_start

2003-02-24 Thread Ernest E Vogelsinger
haned session files (generate a listing and walk it by last access date). -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with readfile on jpegs

2003-02-24 Thread Ernest E Vogelsinger
include() tries to _execute_ the file as PHP code, and chokes at the binary data. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Maximum execution time explanation needed

2003-02-24 Thread Ernest E Vogelsinger
course), then sending echo 'document.location.href="' . $_SERVER['PHP_SELF'] . '?' . SID . '";'; exit; using sessions to store the current import location and status. HTH and clears things up, -- >O Ernest E. Vogelsinger (\) ICQ #13394035

Re: [PHP] Creating my own super global variables

2003-02-24 Thread Ernest E Vogelsinger
ut define() again only works at a global level, not within a function. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Maximum execution time explanation needed

2003-02-24 Thread Ernest E Vogelsinger
and waits until there's data coming to stdin, that's not time consumed "within the script" but rather by external IO. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reading Text file by line

2003-02-24 Thread Ernest E Vogelsinger
quot;\n"), "\n", $data); then simple explode() the data to receive an array of lines: $arlines = explode("\n", $data); You could also use preg_split to combine these operations: $arlines = preg_split("/(\r\n|\n\r|\r|\n)/s", $data); Disclaimer: all unt

Re: [PHP] Creating my own super global variables

2003-02-24 Thread Ernest E Vogelsinger
If you have a look in main/main.c, there's an array called "short_track_vars_names" at the very beginning, which is later on looped and tits contents passed to zend_register_auto_global(), which in turn adds the name to a hash structure for autoglobal identifier lookup. These

Re: [PHP] search script

2003-02-24 Thread Ernest E Vogelsinger
kens as $name) $sql .= ($sql ? 'or ') . "name ilike '%$name%'"; $sql = 'select * from tablename where name ' . $sql; this is for PostgreSQL; for MySQL replace "ilike '%$name%'" with "INSTR(name,'$lname&

Re: [PHP] Creating my own super global variables

2003-02-24 Thread Ernest E Vogelsinger
line 3, it should read "its" (the slashes are here to escape content filters) This caused me a reply from somewhere like this: [snip] Trend SMEX Content Filter has detected sensitive content. Place = [EMAIL PROTECTED]; ; Sender = Ernest E Vogelsinge

RE: [PHP] session_start

2003-02-24 Thread Ernest E Vogelsinger
I didn't ask for this ;-> -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] String searching peformance

2003-02-24 Thread Ernest E Vogelsinger
;fool', 'shit', 'FOAD'); $re = '/(' . implode('|',$buzzwords).')/is'; if (preg_match($re, $posting)) // bad word found else // cleared You only need to make sure that your buzzwords dont contain a '/' - you co

Re: [PHP] PHP_SELF syntax

2003-02-24 Thread Ernest E Vogelsinger
ly outside string-quotes echo "A banana is $fruits[banana]."; // Works echo "A banana is {$fruits['banana']}."; // Works but PHP looks for a constant named banana first // as described below. echo "A banana is {$fruits[banana]}."; // Won't work, use brace

Re: [PHP] general question ?

2003-02-24 Thread Ernest E Vogelsinger
a POST form, like this: --- This will avoid variables travelling along the URL. For more information on forms, refer to http://www.w3.org/TR/REC-html40/interact/forms.html HTH, -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mail

Re: [PHP] Removing URL Variables

2003-02-24 Thread Ernest E Vogelsinger
t(); if (count($_GET)) { foreach ($_GET as $key => $value) $_SESSION['key'] = $value; header('Location: ' . $_SERVER['PHP_SELF']); exit; } // worker code here -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

Re: [PHP] general question ?

2003-02-24 Thread Ernest E Vogelsinger
ins values from both methods. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] general question ?

2003-02-24 Thread Ernest E Vogelsinger
; it will help you avoiding much trouble if you consider reading it. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Switch Question

2003-02-24 Thread Ernest E Vogelsinger
switch($color) { case 1: case "black": return ImageColorAllocate($image,0,0,0); break; case 2: case "white": return ImageColorAllocate($image,255,255,255); break; case 3: case "gray": return ImageColorAllocate($image,200,200,200); brea

Re: [PHP] Splitting a date string

2003-02-25 Thread Ernest E Vogelsinger
d $day as dd . [snip] list($y,$m,$d) = explode('-',$date); -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Trouble Passing Variables On Test Server

2003-02-25 Thread Ernest E Vogelsinger
-- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how___??

2003-02-25 Thread Ernest E Vogelsinger
Check out http://www.php.net/manual/en/ref.mysql.php for what is available for MySQL. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Include files

2003-02-25 Thread Larry E. Ullman
How do I include external library files in PHP??? I would like to put the lines that are repeated in each php files, in a separate file. e.g. $db_host = "localhost"; $db_port = "3306"; $db_name = "test"; ... ?> I find the include() function to be quite useful for including external files. Check

Re: [PHP] to Bryan Lipscy Re: [PHP] how___??

2003-02-26 Thread Ernest E Vogelsinger
At 00:52 26.02.2003, Luis A said: [snip] >MEN I DONT HAVE INTERNET ACCESS > >thanks anyway > >if some one else can help m e please [snip] Interesting case. Sending email without internet access i

Re: [PHP] Include files

2003-02-26 Thread Ernest E Vogelsinger
$db_port = "3306"; >$db_name = "test"; >... >?> [snip] Haven't I heard that before? http://www.php.net/manual/en/function.include.php -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.voge

Re: [PHP] no session id

2003-02-26 Thread Ernest E Vogelsinger
ot;session id: " . session_id(); For more information on session related functions refer to http://www.php.net/manual/en/ref.session.php -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] file upload and a browse for file box

2003-02-26 Thread Ernest E Vogelsinger
the users computer so then >can look for the file rather than type it in.. or is this something with >java/javascript that i have to find out elsewhere [snip] using in your form will give you the results you need. -- >O Ernest E. Vogelsi

Re: [PHP] Session SID curio

2003-02-26 Thread Ernest E Vogelsinger
session_name() . '=' . session_id(); All this can be found at http://www.php.net/manual/en/ref.session.php and the following pages. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] String searching peformance

2003-02-26 Thread Ernest E Vogelsinger
re keep a count of which words hit most >frequently and move them to the top of the list. [snip] If you have a lot of buzzwords I believe this could make quite some performance impact. -- >O Ernest E. Vogelsinger (\)ICQ #13

Re: [PHP] header and writing problem

2003-02-26 Thread Ernest E Vogelsinger
(./cache is an apache-writable directory on my test server) This seamlessly writes the file, then redirects to the requested site... what errors do you get? -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (h

Re: [PHP] simple problem about authentication

2003-02-26 Thread Ernest E Vogelsinger
registered? How do you set the "$user" and "$pw" variables? -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] unlink problem... please help...

2003-02-26 Thread Ernest E Vogelsinger
error 1. 2) You don't define the variable $id (at least in your example), so the SQL statement would read "update product set " . "Photo='nothing', miniPhoto='nothing', picture='0' " . "where ID=" hence error 2 (after

Re: [PHP] unlink problem... please help...

2003-02-26 Thread Ernest E Vogelsinger
27;, " . "picture='0' where ID='$id'"; echo "unlink($file);query($sql);"; $result=unlink($file); $result=mysql_query($sql) or die -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] WebTV vs PHP

2003-02-26 Thread Ernest E Vogelsinger
you have url_rewrite enabled). The rest is a html or possibly css issue. If you need to get this sorted out you should try to work with a WebTV client appliance to see what's actually happening... -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PH

RE: [PHP] session_start

2003-02-26 Thread Ernest E Vogelsinger
ys at your webhost to move /tmp to another partition, or _at_least_ to have session.save_path point to a partition that doesn't get exhausted too quickly. God. What do these webhosts think... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/

Re: [PHP] Emacs?

2003-02-26 Thread Michael E. Barker
Me. Sascha Braun wrote: How many Persons in this List are using Emacs as there default Editor? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] including db content as part of script

2003-02-27 Thread Ernest E Vogelsinger
it were a PHP source file. You can even use such constructs: // do some stuff here ?>Hello from outside PHP O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Emacs?

2003-02-27 Thread Ernest E Vogelsinger
ease Date: 2/25/2003 > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php [snip] -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] virtual() test

2003-02-28 Thread Ernest E Vogelsinger
est.php offers you the choice to either virtual() or readfile() an external file, passing URI parameters. As you can see when using virtual() the callee has the same environment as the caller, however using readfile() via HTTP everything works as expected. -- >O Ernes

Re: [PHP] Read

2003-02-28 Thread Ernest E Vogelsinger
---[snip] Sure you can. The correct interpreter (script engine) is selected by the IIS from the document extension (.asp => ASP engine, .php => PHP interpreter). Check the server settings for IIS on your machine after installing PHP. Good luck with your studies! --

Re: [PHP] Can't run PHP cli script from Cron

2003-02-28 Thread Ernest E Vogelsinger
id you try to run the php file interactively, from the shell prompt? You need at last this statement on top of your PHP files: #!/usr/local/php -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.

Re: [PHP] fsockopen() with SSL?

2003-02-28 Thread Ernest E Vogelsinger
At 14:11 28.02.2003, Michael Temeschinko said: [snip] >Hello, >is it possible to fetch a Website via SSL? [snip] Sure - have a look at cUrl... -- >O Ernest E. Vogelsinger (\)ICQ

Re: [PHP] Sorting a file

2003-02-28 Thread Ernest E Vogelsinger
use >of the way IE has interpreted it and that the entire line did actually get >read, but who knows. Try echoing using htmlentities(), IE (and all other browsers) will need to eat the "" parts - it's a valid html tag (even outside a form) -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strip http headers

2003-02-28 Thread Ernest E Vogelsinger
rrect newline sequence afaik is "\r\n". -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How can I detetct if session cookies are enabled?

2003-02-28 Thread Ernest E Vogelsinger
o ahead else // issue a warning here Of course this only works after the first response of the client to the site where sessions are enabled. The SID will always contain the session key after starting the session for the very first time, thus the above code will always trigger the warning

Re: [PHP] testing for < 0

2003-02-28 Thread Ernest E Vogelsinger
t as blank. I have tried !$timemb and >!is_numeric($timemb). [snip] How about some code? -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] MySQL Query Result Question

2003-02-28 Thread Ernest E Vogelsinger
y($query)) die(mysql_error()); while($data=mysql_fetch_array($result)) { //SSLT } $result = null; // could also use // unset($result); -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Checking for HTTP:// at the start of a string and more ////

2003-03-01 Thread Ernest E Vogelsinger
, followed by a dot, followed by one or more characters that are not whitespace, and terminated with a slash. The terminating 'i' makes the search case insensitive. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mail

Re: [PHP] IS there a way.

2003-03-01 Thread Ernest E Vogelsinger
want to check for the existence of a webserver at the given address you should try to read some data from it. To check the return code you need a tool to return the HTTP headers - check out cUrl (also supports SSL), or go on your own using fsockopen(). -- >O Ernest E. Vogelsinger

Re: [PHP] Constants and "Here Document" Interpolation

2003-03-01 Thread Ernest E Vogelsinger
edocs - both of the examples below work correctly: define('A_CONSTANT', 1); $text1 = <<$text2"; Output: This heredoc text contains the constant A_CONSTANT (1) outside the heredoc construct... This quoted text contains the constant A_CONSTANT (1) outside the string quotes...

Re: FW: [PHP] Constants and "Here Document" Interpolation

2003-03-01 Thread Ernest E Vogelsinger
At 19:28 01.03.2003, Daniel R. Hansen said: [snip] >Actually I did try it and couldn't think of a way to work around the matter. >Thanks for the suggestion. > >-Original Message----- >From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTE

Re: [PHP] Checking Access to a directory Via a PHP/MYSQL Databace.

2003-03-01 Thread Ernest E Vogelsinger
k if the request is for a hidden file: No => serve a general 404 Error message Yes => continue 2) Check authentication: Not authenticated => goto login (or return 401 Authenticate) Yes - readfile(requested_file) Hope this helps, -- >O Ernest E. Vogelsinger

Re: [PHP] A few questions...

2003-03-01 Thread Ernest E Vogelsinger
the >text into variables.. > >For example, i've got a HTML files which all have the same structure > >>> >Title: Magocracy >Author: TheHeadSage >E-Mail: [EMAIL PROTECTED] >Category: Comedy, Action >Keywords: Ilja, Magic, Ilkeria >Rating: PG-13 >Spoi

Re: [PHP] Re: Checking for HTTP:// at the start of a string and more ////

2003-03-01 Thread Ernest E Vogelsinger
/ref.pcre.php Chapter LXXXVIII (read 88), titled "Regular Expression Functions (Perl compatible)", which are my favorites... pay special attention on these chapters: "Pattern Syntax" (http://www.php.net/manual/en/pcre.pattern.syntax.php) "Pattern Modifiers&quo

Re: [PHP] stripslashes()

2003-03-01 Thread Ernest E Vogelsinger
ume you have a textarea where the user enters "Thank's", so PHP converts this to "Thank\'s" (assuming magic_quotes is set to on). Using stripslashes() here will get rid of these slashes. BTW - the sample you've sent will output "Thank's&quo

Re: [PHP] stripslashes()

2003-03-01 Thread Ernest E Vogelsinger
7;', '', $var, '', ''; ?> You will notice the textarea transmits "Thank\'s" which is displayed in the first line, and stripslashes() removes the backslash and displays "Thank's". Note that you

Re: [PHP] stripslashes()

2003-03-01 Thread Ernest E Vogelsinger
t addslash'd all input read via fgets() So the solution here is to either add stripslashes() after your datfile read, or to use set_magic_quotes_runtime(0) (see http://www.php.net/manual/en/function.set-magic-quotes-runtime.php). -- >O Ernest E. Vogelsinger (\)ICQ #13394

Re: [PHP] stripslashes()

2003-03-01 Thread Ernest E Vogelsinger
--- add this line vefore and after stripslashes() and see what you get: echo '', $poem, ''; If I type "I've set it up" it should read I\'ve set it up I've set it up or your stripslashes is not working. -- >O Ernest E. Vogelsin

Re: [PHP] authentication question...

2003-03-02 Thread Ernest E Vogelsinger
ple: ob_start(); echo "some stuff"; // we decide to redirect the client ob_end_clean(); // clear the output buffer header('Location: http://somewhere.com'); HTH, -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] browser uploading

2003-03-02 Thread Ernest E Vogelsinger
actually >possible but so far i haven't been able to figure out how.. [snip] check out move_uploaded_file(): http://www.php.net/manual/en/function.move-uploaded-file.php safe_mode is covered in the docs, too. -- >O Ernest E. Vogel

Re: [PHP] php and html differences

2003-03-02 Thread Ernest E Vogelsinger
t;or more pages built inside a php script? should the pages be called from the >script some way else? Boy - some of my applicatinos server a couple of hundred pages out of a single script (from the database, that is)... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^

Re: [PHP] php and html differences

2003-03-02 Thread Ernest E Vogelsinger
t's the HTML stuff. It's just composed by your application. Have a look at some template engines like Smarty to get an idea. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] heredoc problem

2003-03-02 Thread Ernest E Vogelsinger
> >I looked up T_SL and it is a token representing << so that means it just >doesn't get the <<<. Why not? I've tried all the combinations of spaces and >no space in that line that I can think of. [snip] The

Re: [PHP] fread problem

2003-03-03 Thread Ernest E Vogelsinger
filesize ($filename)); >fclose ($handle); >echo $contents; [snip] You need to eval your code (not "exec"): eval($contents); Note that $contents need to be valid PHP for eval(). It must not start with "Some HTMLBlah you

Re: [PHP] problem using extension.

2003-03-03 Thread Ernest E Vogelsinger
---[snip] Uh yes - we have problems too, sometimes. Care to tell us about _your_ problem? -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Ernest E Vogelsinger
acy links to a site that has been developed in Python (*.py) to access the same URLs as PHP files. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem using extension.

2003-03-03 Thread Ernest E Vogelsinger
--[snip] Sounds as if there was some problem in the extensions initialization code. I'd try to put some debugging in there (write to a file, flush and close it) so you can see how far your extension executes until the segfault. -- >O

Re: [PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Ernest E Vogelsinger
-rewrite for your site to the configuration. They should do this without asking too much ... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] eval help

2003-03-03 Thread Ernest E Vogelsinger
; Array derefs within quoted strings must be enclosed in curly quotes. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL

2003-03-03 Thread Larry E. Ullman
This is OT, I'm considering buying the MySQL, Second Edition Paul DuBois book. I'm using MySQL 3.23. Should I be buying the first edition DuBois book instead or does BuBois cover both 3 and 4 in the second edition? Is there a huge difference between 3 and 4? Here's a URL for the second editio

Re: [PHP] MySQL

2003-03-03 Thread Larry E. Ullman
What are some of the more active MySQL lists? Do you have a URL or two? http://www.mysql.com/documentation/lists.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Populate var with function output string?

2003-03-03 Thread Ernest E Vogelsinger
-[snip] You might use output buffering: ob_start; write_string(5); $my_string = ob_get_buffer(); ob_end_clean(); Output buffering is stackable, i.e. the above code will work even if you have ob turned on already. -- >O Ernest E. Vogelsinger (\)ICQ #1

Re: [PHP] Yarrrrgggghhhhh || Simplest php question in existence........

2003-03-03 Thread Larry E. Ullman
Any performance issues re: using fetch_row vs. fetch_array? No significant performance issues. If you want to be precise and save a little overhead, use $row = mysql_fetch_array ($result, MYSQL_ASSOC); The returned record will ONLY be returned as an associative array. Larry -- PHP General Maili

Re: [PHP] PHP OOP design question

2003-03-04 Thread Ernest E Vogelsinger
al approach I'd create a public function to retrieve the database object: $hDB =& pos_getDB($dbid); where $dbid is a database identifier in case you need it. Just my 2c, -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Doing a Multiple Search

2003-03-04 Thread Ernest E Vogelsinger
name']) ? "firstname = '{$array['firstname']}'" ; null); Note that you need to put curly braces around an array dereference if you have it in a quoted string. This doesn't work: $s = "Some $array[sample]"; But this works: $s = "Some {$a

Re: [PHP] php forgetting variables very easily

2003-03-04 Thread Ernest E Vogelsinger
- in main.php, try to make $colour global: main.php new.php This seems to me like an inconsistency within PHP as to when variables are "automagically" available, and when you have to declare them global. However you should avoid using globals anyway... --

Re: [PHP] file uploads

2003-03-04 Thread Ernest E Vogelsinger
file(), or when your script exits 3) n/a -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Browser Sniffing

2003-03-04 Thread Larry E. Ullman
I know, it can't be done in PHP. That's not exactly what I'm here for. I have a client who would like to redirect people to a polite 'upgrade your browser' page whenever people visit his site (which has been developed in PHP no less). My question here is, how can I make this so that regar

Re: [PHP] Compiling PHP5 In Linux

2003-03-05 Thread Ernest E Vogelsinger
ntation of the tempnam() function where a race condition could occur. There are some interesting answers to this questions on google - search for "tempnam dangerous". -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Ma

[PHP] mortgage calculator

2003-03-05 Thread Karen E. Lubrecht
I'd like to add a mortgage calculator to a client's site. I've been unable to find the formula. In searching php.net, I found a discussion from back in 2000 related to some buggy code. My web search hasn't produced anything other than realtor and mortgage companies and a perl script site. I'm not f

RE: [PHP] mortgage calculator

2003-03-05 Thread Karen E. Lubrecht
Thanks, Mark! I haven't checked it in detail yet, but if nothing else it has the formula for which I was searching. Karen > -Original Message- > From: Mark Heintz PHP Mailing Lists [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 12:04 PM > To: Karen E. Lubr

RE: [PHP] mortgage calculator

2003-03-05 Thread Karen E. Lubrecht
n't get my hands on the formula when I needed it. Frustrating and I won't even go there. Thanks to all! Karen > -Original Message- > From: David T-G [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 12:11 PM > To: PHP General list > Cc: Karen E. Lub

Re: [PHP] print "$array[$i][0]" pukes

2003-03-06 Thread Ernest E Vogelsinger
in expression to clarify operator precedence: with brackets, you don't have to fear any performance impact and gain the clarity of the evaluation sequence; with curly quotes, you gain the correct result :-) -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.

[PHP] Login via PHP: Protecting files and directories

2003-03-06 Thread Ernest E Vogelsinger
ly not found it serves a standard 404 error... Donated to the public domain :) For support just email me ... I'll try to answer questions whenever I have time. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List

Re: [PHP] Dollar signs in values

2003-03-06 Thread Ernest E Vogelsinger
--- Escape them with a backslash: $text = "The amount is \$400.-"; -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Search for keyword in txt file

2003-03-07 Thread Ernest E Vogelsinger
nt that line into a table row. > >I will probably need to do like a "for each" loopbut where do I >insert it ? [snip] In case you're _not_ in safe mode: $result = `grep -n started logs/*`; -- >O Erne

Re: [PHP] attaching php-action to form-button

2003-03-07 Thread Ernest E Vogelsinger
>is there a way to do this? > >so it's not a user-defined but php-defined var, which i need to send through >the form [snip] use a hidden field: // input's etc -- >O Ernest E. Vogelsinger (\)ICQ #13394035

<    1   2   3   4   5   6   7   8   9   10   >