Re: [PHP] change info in database not successful

2001-08-29 Thread daniel james
maybe somebody else will be able to come up with a much more graceful solution to this, but i think you need to forget unset()-- all it does is destroy a var within a script. your db data doesn't become a var until you fetch it, but unset() isn't a mysql function and doesn't interact with the db a

RE: [PHP] is_numeric for php3

2001-08-28 Thread daniel james
ith... perhaps it will be of > some > help to you (even though it doesnt work) > > > function is_num($number) { > > // $x contains number, $y contains any decimal > value > list ($x, $y) = split("\.", $number); > > // if there's no decimal valu

Re: [PHP] is_numeric for php3

2001-08-28 Thread daniel james
eger. As the following > is numeric and not an integer but rather, a string : > > > $num = '123'; > > Anyone have an authoritative answer on this? Like, > something that would > go in the manual as the official php3 is_numeric > check? > > Reg

Re: [PHP] Check if a word is in my string.

2001-08-28 Thread daniel james
if you're just looking for the 1st occurrence of the string, it's-- $check = "good"; $var = "This is a good..."; if (!strstr($var, $check)) { print("$check not found"); } also, i think strstr() is case-insensitive, so it won't be able to differentiate between 'Good' and 'good', and will NOT ret

Re: [PHP] is_numeric for php3

2001-08-28 Thread daniel james
do you mean, as in, if !is_integer($var) { print("$var is not an integer"); } --- Philip Olson <[EMAIL PROTECTED]> wrote: > hi friends, > > Can someone post here "the" most efficient method to > validate a variable > as numeric? I see a ton of hacks/ways in the manual > user comments under > i

Re: [PHP] Pulling webpages - may be a weird question :)

2001-08-28 Thread daniel james
try readfile('http://www.somesite.com/'); it creates a mirror; it might bypass the firewall, depending on how the blocking software is keyed to activate. -dj --- Jeff Lewis <[EMAIL PROTECTED]> wrote: > I was sitting here at work (working of course!) > thinking about how some sites are blocked et

RE: [PHP] unset() in a class

2001-08-28 Thread daniel james
If that's the code you're running, it's got several problems-- 1st, the function is mysql_query() 2nd, the query is built like this: $connection = mysql_connect('host', 'user', 'pass'); $db = mysql_select_db('db', $connection); $query = "SELECT * FROM tablename WHERE primary_key = '$primary_key'

[PHP] include or require or what?

2001-08-23 Thread daniel james
I am working on a form that needs to run INSERTS into a table, but also has other connections and functions going on, so $php_self isn't really an option (I'm a newbie, and switch still scares me)... Can I effectively use an include/require(insert.php) on the main of the form, have the form actio

[PHP] switch with html

2001-08-20 Thread daniel james
Hi, How do I call on a switch from within an html-embedded page? Say I have a large php script that first verifies a login, then allows templates for INSERTING, UPDATING, & DELETING various records-- I need to have separate templates load for each set of steps, but I only have the vaguest of id

Re: [PHP] caching and IE 5

2001-08-09 Thread Daniel James
On Thu, 9 Aug 2001, Karl Phillipson wrote: > Is anyone else having fun and games with IE 5.0 and caching? > > I have the no-cache code (below) before anything else in my index file. > Following that an include file is pulled in that has a form with a text > input field that echos the date and t

Re: [PHP] Resize Picture

2001-08-08 Thread Daniel James
try this... Image width: Image height: hope that's what you meant. Twigman... On Thu, 9 Aug 2001, Mark Lo wrote: > Hi, > > I would like to know ..is it possible to let my client resize the > picture from the browser instead of having a defau

Re: [PHP] htaccess & php

2001-08-08 Thread Daniel James
You are looking for HTTP Authentication... http://www.php.net/manual/en/features.http-auth.php Twigman... On 2001.08.09 09:49 Chris Kay wrote: > > Hi > > My question is that i am about to start a database and i have been asked > to > make the login/password like htaccess, now they also want t

Re: [PHP] regexps

2001-08-08 Thread Daniel James
if (preg_match("/\d/", $data) { print 'The $data contained a number'; } On 2001.08.09 07:05 scott [gts] wrote: > here are two regexps that might do what you want > > "\w" matches alphanum (1-9a-zA-z) > > IMO, the best way to check for non-alphanum chars is > to check for "\W" (upper cas

Re: [PHP] Alternate way of calling php scripts

2001-08-08 Thread Daniel James
I play with this lots, good fun.. Path: the title of the page will contain the path you typed.. Twigman... On 2001.08.08 23:13 Evan Nemerson wrote: > I seem to recall that you can call a PHP script with a slash after it > then > variables. For instance http://localhost/script.ph

[PHP] associative arrays in html forms and javascript

2001-08-08 Thread Daniel James
Hi everyone :) imagine this if you will.. ugly form with a text input field that is focussed when the form loads, erm.. nice. now, I like to put all my form stuff into associative arrays, makes things a lot nicer when I am doing things later... but this... means someth