Re: [PHP] Best Delete Confirmation Script

2002-06-27 Thread Erik Price
On Thursday, June 27, 2002, at 12:48 PM, Shane wrote: > I would like your opinions on the best way to implement an "Are You > Sure You Want To Do This?" dialog for an Admin user when they go to > delete a record in a DB. > > Do you find that a whole page is usually required for this, or does

Re: [PHP] HTTP1.1

2002-06-27 Thread Erik Price
n't say that > links/urls shouldn't be formatted like the first example above... I think it is okay as long as you are staying within the same virtual host. Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] ok what kind of crack is my computer smoking?

2002-06-27 Thread Erik Price
s you have, re-extract the tarballs, totally. Not just for the modules but for Apache too. It's just easier unless you have customized code in your Apache source tree. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http

Re: [PHP] securing an 'includes' dir

2002-06-28 Thread Erik Price
rs can provide a script (SUID) that allows a user to change the group association of the file to that of the web server? Yet without making the user a part of the group itself, otherwise all users would be able to see all of these files... Erik Erik Price Web Developer Temp Media Lab, H

Re: [PHP] checking

2002-06-28 Thread Erik Price
insert; > } > my probleme is in some case $lastname="" is true and other case is > false. > I tried with $lastname=" " but no change. how can I check if a varible > is > empty or not? http://www.php.net/empty Erik Price Web Developer Temp Media L

Re: [PHP] Keeping "Secrets" in PHP Files

2002-06-28 Thread Erik Price
7;s group association to "websecret", you probably need to be either root or a member of "websecret", unless the system admins have provided some kind of script that does this on your behalf. Which means that anyone else who has this ability can read the file too (since

Re: [PHP] Populate Popup Menu from Database

2002-07-01 Thread Erik Price
l=php-general&m=102503848224300&w=2 Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Keeping "Secrets" in PHP Files

2002-07-01 Thread Erik Price
web server user and the web server user can read all those files. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Javascript to PHP?

2002-07-01 Thread Erik Price
o use JavaScript to set a cookie, and/or make a new request with GET or POST data attached. If not, let me know. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] strip_tags

2002-07-01 Thread Erik Price
On Monday, July 1, 2002, at 11:09 AM, BB wrote: > OK, this is a 3x3 table pasted in from word! It is against the rules to post HTML code generated by Microsoft Word. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (h

Re: [PHP] Register globals off

2002-07-01 Thread Erik Price
which one and how do I use it? I'm assuming you mean sending some querystring data, like header("Location: http://domain.com/page.php?data=contents";); if so, then yes, you will end up with the string 'contents' in a variable called $_GET['data'] . Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] help with regex in preg_match();

2002-07-01 Thread Erik Price
mp;" sign AND a "number with more than 1 digit" If you only want it to match if there is BOTH an "&" sign AND a "number with more than 1 digit", it should be like this: preg_match('/siteUserList.cgi\?group=site177(&\d\d+)?/', $QUERY_STRING) Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Populate Popup Menu from Database

2002-07-01 Thread Erik Price
e enters the same "name" value twice, too. But it's not really a big deal unless you're doing a lot of work with a lot of data. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] extracting data from text file

2002-07-01 Thread Erik Price
te line breaks for your server? In some cases, a file may have DOS/Windows or Macintosh line breaks which are not \n but rather \r\n and \r respectively IIRC. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Unable to restart httpd after upgrading PHP

2002-07-02 Thread Erik Price
an upgrade you can use as a guide if you want. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Beginner Sessions Question

2002-07-02 Thread Erik Price
body of a script, but if you can wrap everything into smaller scopes, it's not such a big deal. IMHO. This applies to a lot of variable names, in fact. But I agree, in the main body of the script (global scope) it is best to be descriptive. Erik Erik Price Web Developer Temp

Re: [PHP] Help: Constants

2002-07-02 Thread Erik Price
tup... even filenames are valuable to maleficants. I recommend setting your php.ini to E_NONE and then putting error_reporting(E_ALL) at the top of each of your scripts, and then when the file is migrated to production, comment or remove the line. Erik Erik Price Web Developer

Re: [PHP] DOCUMENT_ROOT disappeared on me!

2002-07-02 Thread Erik Price
globals? I had to retool all of my > scripts. =/ IMHO you're better off, but yes, if you set register_globals = on then you shouldn't need to have retooled your scripts. Did you restart your webserver after you adjusted php.ini? Erik Erik Price Web Developer Temp Media Lab

Re: [PHP] Help: Constants

2002-07-02 Thread Erik Price
quot;intranet", as they call it, so is not really public, so I feel okay about doing dev work on it. I'm also kind of an amateur.) Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Executing a php script periodically using crond

2002-07-02 Thread Erik Price
commands. But all is not lost. You can have the cron job execute a shell script that executes lynx or links or wget, or even just executes the command directly from the cron job, and have that lynx/links/wget request a PHP script that does what you want done. Erik ---- Erik Price Web

Re: [PHP] Re: Executing a php script periodically using crond

2002-07-02 Thread Erik Price
ly write a Perl script (most hosts have Perl) to do whatever it is that needs to be done and have cron execute that, this saves you from a whole window of exploit (the web server). But if you don't have Perl or don't know Perl, that's a problem. Good luck, Erik E

Re: [PHP] Regular Expression Problem

2002-07-02 Thread Erik Price
e PCRE regex syntax, this should do it: $output = preg_replace('!^\${1,2}\w+$!', "$1", $var); because "\w" is the same as "[A-Za-z0-9_]" (though perhaps it is in POSIX regexes too). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown

Re: [PHP] find and replace in php

2002-07-02 Thread Erik Price
parameters, and // set the variables from the file to // their corresponding values foreach ($this->parameters as $key => $value) { $template_name = '[' . $key . ']'; $this->finalOut

Re: [PHP] Have you seen this host?

2002-07-02 Thread Erik Price
case why not pay an ISP to host your own server?). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Beginner Sessions Question

2002-07-02 Thread Erik Price
ne giant script. But one thing I have learned is that everyone has a different approach to writing code, and objects may not be your thing -- that's okay. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] does a form submit from a http page to a https ensure secure data?

2002-07-03 Thread Erik Price
rgon File so maybe it's OT but I'm curious. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Setting a cookie and redirecting

2002-07-03 Thread Erik Price
It's not -secure-, since anyone can remove this flag (even if you used POST), but it will work for Joe User to stop him from accidentally resubmitting. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: synchronizing php functions

2002-07-03 Thread Erik Price
mplement this yourself with database-managed persistence (but beware the overhead). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_POST into a formatted string, help!

2002-07-03 Thread Erik Price
g a tiny bit extra memory to deal with the array: $arr = array(); foreach ($_POST as $key => $val) { $arr[] = $key . '=' . $val; } $str = implode('&', $arr); Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] --

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Erik Price
ed or slashed? Turn off magic_quotes and do addslashes() explicitly every time you do a database insert. Then make sure you always stripslash() data returned from a database query. magic_quotes is convenient for newbies, but after a while you'll find it only trips you up, as you've discover

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Erik Price
d/strip a requirement, not a security precaution. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] V basic newbie problem

2002-07-03 Thread Erik Price
data on each iteration while ($row = mysql_fetch_assoc($result)) { echo $row_RsSingStanDailybb['DailyBB']; } Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php and apache path...

2002-07-03 Thread Erik Price
.htaccess file can be used. (This is assuming you are using Apache.) Go to www.apache.org and read the httpd documentation there for more information about setting up the document root in httpd.conf. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP

Re: [PHP] Another Regex Question (General)

2002-07-03 Thread Erik Price
ter class. It represents any *one* of the contained characters. But not more than one. So there is no following at all, since for all intents and purposes the character class matches a single character (unless you use a qualifier like +, ?, or *). Erik ---- Erik Price Web Developer T

Re: [PHP] Other than substr

2002-07-03 Thread Erik Price
$rest_of_number = $matches[2][0]; Try that, but it's untested. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] question regarding cookies

2001-12-26 Thread Erik Price
Hello, I am having a problem testing out the use of cookies. I'm using a tutorial from Wrox's "Beginning PHP4". It seems that I'm doing everything correctly, but when I try to access the page in my browser, I am not prompted as to whether or not I'd like to accept a cookie (which is somethi

Re: [PHP] question regarding cookies

2001-12-26 Thread Erik Price
Good advice -- I hadn't thought of that (echoing right beneath the setcookie() function). But then i thought of something else... how can I echo text before the "" tag? So I put a third setcookie() function above the tag setcookie("foo", "echobar") hoping that this would be very simple --

Re: [PHP] question regarding cookies

2001-12-26 Thread Erik Price
any errors when you try to set the cookie? > > Miles > > On Wednesday 26 December 2001 05:07 pm, Erik Price wrote: >> I used >> >> >> > // cookie_test.php >> >> if ($type_sel) setcookie("font[type]", $type_sel, time()+3600) ; >

[PHP] quick question

2002-01-09 Thread Erik Price
Just a quick question -- I'm temporarily unsubbed so if anyone could CC me directly that would be great. I'm trying to write my code in accordance with the PHP 4.1.0 security advisory -- that is, I want to use the $_GET and $_POST arrays when grabbing variables passed with GET and POST forms.

Re: [PHP] quick question

2002-01-10 Thread Erik Price
M, Ford, Mike [LSS] wrote: >> -Original Message- >> From: Erik Price [mailto:[EMAIL PROTECTED]] >> Sent: 09 January 2002 19:22 >> >> I'm trying to write my code in accordance with the PHP 4.1.0 security >> advisory -- that is, I want to use the $_GET and $_POS

Re: [PHP] quick question

2002-01-10 Thread Erik Price
tance? Erik On Thursday, January 10, 2002, at 08:18 AM, Ford, Mike [LSS] wrote: >> -Original Message- >> From: Erik Price [mailto:[EMAIL PROTECTED]] >> Sent: 09 January 2002 19:22 >> >> I'm trying to write my code in accordance with the PHP 4.

[PHP] does this work?

2002-01-10 Thread Erik Price
It seems that I have a "parse error" somewhere in the following code (since that's the only code in my script, it's a test script): // arraytest.php $tempsql = "SELECT COUNT(*) AS count FROM divisions"; $tempresult = mysql_query($tempsql, $db); $temprow = mysql_fetch_arra

Re: [PHP] does this work?

2002-01-10 Thread Erik Price
I tried that... I get the same error (same line and everything). As a side note, I haven't ever had to quote the first argument in mysql_query() before... This is quite a conundrum, eh? Erik On Friday, January 11, 2002, at 04:25 AM, Kevin Stone wrote: > Hmm I believe that the mysql_query()

Re: [PHP] does this work?

2002-01-10 Thread Erik Price
On Thursday, January 10, 2002, at 04:39 PM, Rick Emery wrote: > Show all your code. Did you open a connection to the MYSQL server? If > so, > show the code. > Okay, but I changed some personal info (that I know is definitely correct): Array Test $tempsql = "SELECT COUNT(*)

Re: [PHP] does this work?

2002-01-10 Thread Erik Price
Wait, my bad. Typo... all my fault. I feel like an ass. Erik -- 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] does this work?

2002-01-10 Thread Erik Price
nd echo each record's contents (divisions.div_name and divisions.div_id) on each step. This is to populate a box (listbox). Any advice, anybody? Thank you, Erik On Thursday, January 10, 2002, at 05:00 PM, Erik Price wrote: > Wait, my bad. Typo... all my fault. > I feel like an as

Re: [PHP] Passing Variables

2002-01-10 Thread Erik Price
One way to pass a variable by clicking on a hyperlink is to make the HREF attribute of the anchor tag into a querystring with the variable that you want to pass. If you want to pass the variable "$user_id" to the next page, with a value of "289", here is how you could do it: Click here for th

Re: [PHP] does this work?

2002-01-10 Thread Erik Price
On Thursday, January 10, 2002, at 05:16 PM, Martin Towell wrote: > is this valid in PHP?? (haven't tried it myself yet...) > > $tempsql = "SELECT COUNT(*) AS count > FROM divisions"; > > maybe it needs to be on one line??? It turns out that my problem was a typo. I apolo

[PHP] removing an array element

2002-01-11 Thread Erik Price
A quick question: what function is used to remove an array element from an array? Like array_pop(), except one by which I can refer to the element by its associative index rather than just the last element of the array. For more detail with what I'm doing, I have two versions of a listbox

[PHP] both work? (was Re: [PHP] quick question)

2002-01-11 Thread Erik Price
On Friday, January 11, 2002, at 06:05 AM, Ford, Mike [LSS] wrote: > Incidentally, I've occasionally had problems including a variable name > containing an underscore in a double-quoted string (e.g. "$num_recs > records retrieved"), where PHP tries to insert the value of $num > followed by th

[PHP] using mysql_query() twice?

2002-01-11 Thread Erik Price
I am curious if using the same mysql_query() function twice causes some kind of problem. It seems that if I use $result = mysql_query($sql, $db); if (mysql_fetch_array($result)) { while ($row = mysql_fetch_array($result) or die("You lose. No data fetched.")) { // print some dat

Re: [PHP] quick question

2002-01-11 Thread Erik Price
It seems that you are saying that not using quotes is bad (first), but then later you show that omitting the quotes does not result in an error. Or are you saying that the quotes can be omitted if the array element is being used in a string (between quotes), but generally the quotes around the

Re: [PHP] using mysql_query() twice?

2002-01-11 Thread Erik Price
EXCELLENT! It worked perfect. So $result can't be used twice -- I wonder if it somehow is altered by the mysql_fetch_array() that is performed upon it. Thanks Nick. On Friday, January 11, 2002, at 05:23 PM, Nick Wilson wrote: > I'll most likely be corrected (I just joined the list to brush u

Re: [PHP] removing an array element

2002-01-11 Thread Erik Price
Because, as a dope, I forget that you can invert IF statements like that -- you're right, I'd rather do that than mess with the array. Although the feedback on unset($arrayname['index']) was extremely useful knowledge! Thank you everyone. Erik On Friday, January 11, 2002, at 12:31 PM, Rasm

Re: [PHP] using mysql_query() twice?

2002-01-11 Thread Erik Price
On Friday, January 11, 2002, at 05:42 PM, Nick Wilson wrote: > That's not it. Your first $result is a resource indicator (container for > results) so if you re-assign it (put another value into it) it becomes > useless as your while statement depends on it. (This may be redundant, but I'm hopi

[PHP] help using ereg_replace()

2002-01-14 Thread Erik Price
Hello everyone, I am trying to learn how to use ereg_replace(), but I don't seem to be doing it correctly. "$phone" is a 10-digit string. I want to perform the following: $phone = ereg_replace(".{10}", "[part where I am confused]", $phone); I would like the output to be $phone = "(555) 555-

Re: [PHP] CSS Editors

2002-01-14 Thread Erik Price
That looks cool -- is there anything like it that uses Tk or GTK? On Monday, January 14, 2002, at 09:52 AM, Geoff Caplan wrote: > Hi > > >> TopStyle - http://www.bradsoft.com >> > > I endorse that - it is an excellent product. And for casual use, they > have a > free version with nags. > > Geo

Re: [PHP] Re: help using ereg_replace()

2002-01-14 Thread Erik Price
liljim, Thanks for the advice (and especially the explanation!) -- I note that you chose the Perl regexp engine rather than the "e" regexp engine (POSIX?). Quite a few people recommended O'Reilly's "Mastering Regular Expressions" over the weekend. Does anyone know if it covers the Perl synt

Re: [PHP] querying results already queryed once before

2002-01-15 Thread Erik Price
On Tuesday, January 15, 2002, at 02:18 PM, Phil Schwarzmann wrote: > Dumb question: How do I query results from a MySQL that I've already > queried once before in the same page? Look, buddy, *I* ask the dumb questions around here! > Here is my code: > > // querying the database for the first

[PHP] security benefits of predefined variables

2002-01-15 Thread Erik Price
Hi, I was hoping that someone could point me to a page or resource where I can find more information about using the predefined variables introduced in PHP 4.1.0. I read the "release announcement" (http://www.php.net/release_4_1_0.php), which is what called my attention to the potential secu

[PHP] Re: Another question - not exactly what i was looking for

2002-01-15 Thread Erik Price
I'm not sure if I understand... first of all, I could be wrong, but I thought that you had to use the LIKE operator rather than "=" (equals sign) when trying to match text strings. But like I said, I could be wrong. if you did $query = "SELECT * FROM tabe WHERE lastname LIKE '$lastname' OR

Re: [PHP] security benefits of predefined variables

2002-01-16 Thread Erik Price
ny additional security? If so, how? Thank you all, Erik On Tuesday, January 15, 2002, at 03:55 PM, Johnson, Kirk wrote: > Give this a read first, then come back if you still have questions ;) > > http://www.securereality.com.au/studyinscarlet.txt > > Kirk > >> --

Re: [PHP] NEWBIE IN DISTRESS: Install Instructions are not work for PHP 4.1.1!!!

2002-01-16 Thread Erik Price
Take notes. On Tuesday, January 15, 2002, at 10:22 PM, Floyd Baker wrote: > > > > I'm stuck here too. Don't know that much in the first place except > that I did get it together once. Apache/php4/mysql on win32... Now > to upgrade it's all new again. > > I'm sure php config files are ok to

Re: [PHP] dynamic module or static?

2002-01-16 Thread Erik Price
I'm no guru on the topic, but I found that when configuring the DSO with MySQL (--with-mysql=/usr/local/mysql), it would always garble the PHP module. Eventually I got it all set up by not specifying a directory (in other words, just using "--with-mysql") in that configure argument. But this

Re: [PHP] security benefits of predefined variables

2002-01-16 Thread Erik Price
Kirk, Okay, I now understand why the $_GET and $HTTP_GET_VARS variables are useful. I had made the mistaken assumption that if I leave "register_globals" on, but write code that works with "register_globals" off, my code would somehow be safer simply for having been written this way. But th

Re: [PHP] security benefits of predefined variables

2002-01-16 Thread Erik Price
Okay, all of that discussion of predefined variables was well and good. I'm going through my code and changing everything over to use $_*['variablename']. The problem is that a good deal of my code consists of MySQL query statements with variables inside those statements. An example: $sql =

Re: [PHP] PHP Security - "view source code"

2002-01-16 Thread Erik Price
The entire page, PHP with HTML, is sent to the PHP engine. It follows the instructions of the PHP code, outputting only HTML and error messages, and then hands the data to the web server which sends it to your browser. Unless something damages the PHP engine, causing the webserver to serve t

Re: [PHP] PHP & HTML: newbie question

2002-01-16 Thread Erik Price
You mispelled the closing "" tag. On Wednesday, January 16, 2002, at 04:33 PM, Nick Wilson wrote: > > * On 16-01-02 at 22:29 > * Richard said > >> >> Hi there >> >> I just signed up for an account at Spaceports so I can play with PHP ­ > I >> placed some PHP code in an HTML page and upl

[PHP] Re: security benefits of predefined variables

2002-01-16 Thread Erik Price
n you might as well just do this: > > $sql = "SELECT table.column FROM table WHERE criteria LIKE $variable"; > > > Using the $_* arrays is only part of the solution. You still have to > validate/check that data before you rely on it. > > > > On Wed, 16 J

Re: [PHP] Remove value from array

2002-01-16 Thread Erik Price
This is a good one I just learned last week -- unset the variable. That is, unset($Arr[2]); or unset($Arr['cyanide']); from what I understand, the discovery of this easy way to do this was accidental. See the second annotation of "array_splice()" in the PHP manual here for the details:

Re: [PHP] PHP Security - "view source code"

2002-01-17 Thread Erik Price
On Wednesday, January 16, 2002, at 07:22 PM, Christopher William Wesley wrote: > If you are the server's admin, or know the person well, you can tighten > the file permissions down more with a little administrative work ... > adding a new group of which your user and the web server are a membe

Re: [PHP] PHP Security - "view source code"

2002-01-17 Thread Erik Price
On Wednesday, January 16, 2002, at 08:04 PM, Rasmus Lerdorf wrote: > No, it is safer to block access to .inc files with an httpd.conf rule. > Allowing people to execute files that were meant to be included out of > context could end up being much more dangerous than simply having people > see t

Re: [PHP] Changing form look without reloading

2002-01-17 Thread Erik Price
On Thursday, January 17, 2002, at 03:33 AM, Nick Wilson wrote: > >> Hello... >> >> I am wondering: Would it be possible to: >> 1) Select an option in a selectbox >> 2) Have a list of checkboxes pop up underneath the selectbox, based on >> what >> you selected >> 3) Without reloading the page...

Re: [PHP] string to array??

2002-01-17 Thread Erik Price
$TF_string = "Starscream, Megatron, Jetfire, Optimus Prime"; $TF_array = explode(", ", $TF_string); print_r($TF_array); (note the space after the comma in the first argument to "explode()", this necessary to avoid the space being include in each element of the array) Hope that helps, Erik

Re: [PHP] string to array??

2002-01-17 Thread Erik Price
I didn't know that either. Does this apply only when accessing strings by character? Or are all conventional uses of brackets deprecated for the purposes of arrays? It doesn't say on that page (http://www.php.net/manual/en/language.types.string.php , a bit more than halfway down). Erik

Re: [PHP] PHP & MySQL problems, updating database..

2002-01-17 Thread Erik Price
The reason you aren't seeing any errors is because you used "or die()" -- to the best of my knowledge, this replaces any standard errors that PHP would normally generate. It appears that you have omitted the second argument to mysql_query(). A common mistake that I've made many times myself.

Re: [PHP] string to array??

2002-01-17 Thread Erik Price
gt; echo $str[0][1]; # produces 'fubar' > echo $str[1][1]; # produces null > echo $str[1]{1}; # produces 'n' > > Again, that's just what I'm assuming from the docs. A quick test would > clear it up, but it doesn't affect me right no

Re: [PHP] Mac OSX !?!?!?

2002-01-17 Thread Erik Price
There is a utility called "daemonic" which is designed to deal with this as well, but works for more than just MySQL -- it's intended to be used for all server daemons. http://daemonic.sourceforge.net/ It is Mac OS X-specific at this time, but according to the web site is designed for future

Re: [PHP] Computer Science and PHP

2002-01-18 Thread Erik Price
Where I went to school (UMass Amherst), they primarily use Java and C/C++. The reason has been cited that the skills learned in programming with these languages are scalable to many other languages, including PHP, and thus form a solid foundation from which other programming skills can evolve

Re: [PHP] Does any have the 'edit_member.php' script ....

2002-01-18 Thread Erik Price
I thought that all of the source code for that book was available at http://mysql.he.net/Downloads/Contrib/Examples according to page 497. Erik On Thursday, January 17, 2002, at 08:48 PM, Mike C wrote: > In electronic format that I can have? It is included in the book > 'MySQL' by Paul DuB

Re: [PHP] strange problem

2002-01-18 Thread Erik Price
On Friday, January 18, 2002, at 09:52 AM, Nick Wilson wrote: >> my PHP (PHP Version 4.1.1) suddenly does not take this anymore: >> $a['color'] = 'red'; >> I get this error: Parse error: parse error, expecting `T_STRING' or >> `T_VARIABLE' or `T_NUM_STRING' >> when I remove the quotes around th

Re: [PHP] Re: Programming a state controller for page transitions

2002-01-21 Thread Erik Price
Check out phorum's source, I find it very well-documented and educational. I can't imagine how a collaborative effort can work with obfuscated source... On Saturday, January 19, 2002, at 05:03 AM, Geoff Caplan wrote: > Some authors compound the problem by using cryptic variable names, > thou

Re: [PHP] 2d array help

2002-01-21 Thread Erik Price
I'm not sure exactly what you need help with, but if you're getting any errors, I'd recommend adding the resource identifier to your mysql_* functions (usually ($db = mysql_connect(), but YMMV). But I wonder if you were trying to do something else? Erik On Monday, January 21, 2002, at 05:51

Re: [PHP] what vars should go in session vars?

2002-01-23 Thread Erik Price
Nick, thanks for taking a moment to respond -- >> What I'm wondering is, what should I store in session variables? > > Whatever you need to. Thanks. >> for the user, to influence the way the site behaves. But I was >> thinking >> of adding ten pre-set style sheets (diff't colors, fonts, etc),

Re: [PHP] Re: [Kopia] [PHP] Re: Sessions problem with FreeBSD 4.3

2002-01-24 Thread Erik Price
From my understanding, as long as you have a "session_start()" function above the tag, you can work with variables in the form $_SESSION['variableName'] rather than having to use session_register(). In fact, using session_register() is no longer needed at all. Use $_SESSION['variableName']

Re: [PHP] Increment help..please

2002-01-24 Thread Erik Price
I just learned about a cool function -- "mysql_insert_id()". You can read about it in the manual, but it sounds like it could be used to get the AUTO_INCREMENT number from the database and you can then append that number to your uploaded image file name. Erik On Thursday, January 24, 2002, a

Re: [PHP] Re: [PHP-DEV] Re: [PHP] RFE: $HTTP_POST_VARS =& $_POST;

2002-01-24 Thread Erik Price
On Thursday, January 24, 2002, at 05:01 PM, Lars Torben Wilson wrote: > Robert, the $HTTP_*_VARS have, indeed, been deprecated, and this is > noted in the manual. Then it is safe to say that using $_* variables and -never- using $HTTP_*_VARS variables is safe practice for forward-compatibili

Re: [PHP] directory structure list

2002-01-24 Thread Erik Price
Hmm... I'm not familiar with the directory functions yet. But perhaps you can use `ls -F` somehow -- this prints the name of each file in the directory with a special character to denote its type. For directories, this is a forwardslash. I.e: localhost:~/Documents/Media Lab$ ls -F (admin)ind

Re: [PHP] getting a LAMP job in this economy

2002-01-24 Thread Erik Price
In the face of tough economics, it's difficult to hold onto one's ethics... Not to start a flame war, but I really hope that the day doesn't come that I'm forced to use a non-Unix platform for my development. For now I have this luxury. Erik On Thursday, January 24, 2002, at 04:51 PM, Vin

Re: [PHP] Arrays as pointers?

2002-01-24 Thread Erik Price
I could be wrong about this, but here goes: Strings are in fact arrays. An array of characters. The code your friend gave you manipulates this array in the same way that it would any "normal" array. The only problem (not really a problem even) is that when dealing with character-based arra

Re: [PHP] MySQL query question

2002-01-24 Thread Erik Price
If you are using a table with AUTO_INCREMENT set for one of the fields, the default is for MySQL to assign any new row an AUTO_INCREMENT value that is one higher than the currently highest value in that column. In other words, MySQL by default does exactly what you say you are trying to do.

Re: [PHP] Re: getting a LAMP job in this economy

2002-01-25 Thread Erik Price
On Thursday, January 24, 2002, at 09:32 PM, Michael Kimsal wrote: > Being able to positively improve an employer's bottom line is always a > plus you can bring to any 'job' - you're there to do work and make them > money too. If you can help by furthering the use of Linux/PHP/etc due > to th

Re: [PHP] A link

2002-01-25 Thread Erik Price
Stupid. Animates a window that says "You should not have come here!" to dance around the screen, then locks up the browser by having two new windows call each other in a loop... gotta love 'Force Quit' on Mac OS X. Or 'kill' in any other Unix. Or 'turn JS off' in your browser. Erik On

[PHP] break statement usage

2002-01-25 Thread Erik Price
Hello, all I have a quick question about using the "break" statement from within a switch() statement. After accepting user input from a form, I want to run this input through some error checking via PHP code (not Javascript error checking). So the first thing is the code puts the input thro

Re: [PHP] break statement usage

2002-01-25 Thread Erik Price
On Friday, January 25, 2002, at 04:24 PM, Nick Wilson wrote: > > Try to keep your posts a little shorter > if only for the sake of the dialup users ;) > > Thanks for the tip, but I find that a more verbose message makes explicit what I am asking. How many times have you seen "I bre

Re: [PHP] Classes for PUP & MySQL in Southern California

2002-01-25 Thread Erik Price
There's a whole section on training in MySQL at their web site. MySQL AB, a company which provides a great deal of support to the MySQL community, offers training and other support for MySQL (it is their only form of revenue, except for commercial Microsoft-based MySQL licensing). The trainin

Re: [PHP] PHP and XHTML

2002-01-28 Thread Erik Price
On Saturday, January 26, 2002, at 05:49 PM, ,,, wrote: > When I have an inside my php script it wont work > since > php parses it as php code. > > Will short_open_tag = Off solve it? I would really like to use > for the > rest of my php code...there must be a better solution than > Short_o

Re: [PHP] Session updates ok first time only.

2002-01-28 Thread Erik Price
On Sunday, January 27, 2002, at 10:39 PM, Jason Wong wrote: > On Monday 28 January 2002 04:37, Floyd Baker wrote: >> I have 4.1, register globals off, on Windows 98. >> //pull value from session file: >> $page_views = $_SESSION['page_views']; > No need for this, in fact this is what is prevent

[PHP] session data vs cookie data

2002-01-30 Thread Erik Price
I have read elsewhere that depending on Cookie data for site authentication is false economy, because Cookie data can be spoofed. I'm designing a login that auto-fills a person's name into a field for authentication (based on their $user_id, which is stored in the cookie), then they enter a pa

Re: [PHP] Book database (slightly OT)

2002-01-30 Thread Erik Price
On Tuesday, January 29, 2002, at 11:38 PM, Boaz Yahav wrote: > Why not simply look the ISBN up in one of the big online shops and take > the data from there? > Amazon? B&N? > > It all depends on what you will do with the data I guess... > A good idea, but if you're running a commercial site of

<    1   2   3   4   5   6   7   >