[PHP] Re: PHP Meetup, how many of you have signed up?

2002-07-26 Thread Richard Lynch
>Top 10 Locales -- >Washington DC (9 members) >Amsterdam (7 members) >Leeds, UK (7 members) >London, England (7 members) >Atlanta (5 members) >Manhattan (below 42nd St) (5 members) >Melbourne (5 members) >Oakland-Alameda, CA (4 members) >Nashville, TN (4 members) >St. Louis, MO (4 members) > >I am

[PHP] Re: Sessions, how they exist and die

2002-07-26 Thread Richard Lynch
>My question is, if I have a user on my web site, and they leave and come >back does their session still exist? the file in the /tmp folder exists >until it is deleted by the OS? If the user comes back will they get >assigned the same session they had before? I know the questions are >pretty newbi

[PHP] Re: The page before for newman.

2002-07-26 Thread Richard Lynch
>I'm looking for the global veriable that lists the page before the page that >i just came from. Anyone know what i'm talking about? will tell you what you want to know. -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any ma

[PHP] Re: pulling records from mysql

2002-07-26 Thread Richard Lynch
>I have a column in my table named firstname with twenty records in it. How >can i use php to pull out individual records (say for ex. record 16)? Also, select firstname from blah where id = 16 >how could i pull out all records upto number 15? Thanks in advance. select firstname from blah whe

[PHP] Re: 'Previous' 1, 2, 3, 4, etc. 'Next'

2002-07-26 Thread Richard Lynch
>// Set the limit per page >$sql_text = $sql_text . " LIMIT $start, $maxresult"; echo $sql_text; >$result2 = mysql_query($sql_text); if (!$result2){ echo mysql_error(); } > >// The navigation between pages -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-i

[PHP] Re: New way to make select boxes auto select

2002-07-26 Thread Richard Lynch
>You may already be doing it like this, but I think I found a new way to >make select boxes auto-select (what data they put in) a lot easier. All you >have to do is put a variable in each select tag that is equal to the value >of the select option i.e.: -- then all you >have to do is base the var

[PHP] Re: mySQL Queries using PHP's SESSION variables

2002-07-26 Thread Richard Lynch
>Hello, I am stuck here. In the name of efficiency I want to lower the number >of callls to the database. So I am trying to give the most stringent query >possible. This is the problem: I have stored the surfers shopping cart, >where each item is stored as a session variable.Now on the database I

[PHP] Re: Implement PHP within a string

2002-07-26 Thread Richard Lynch
>Is it possible to run PHP that is embedded within a string? I have a file >that is read into a string and returned to the browser, how can I run that >PHP? http://php.net/eval -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (a

[PHP] Re: Help! mysql problem

2002-07-26 Thread Richard Lynch
>Hi there, I've got a quick question concerning PHP and mySQL. I've got a >fresh server with recent versions of Red Hat Linux, mySQL, PHP and apache. >My problem is that when I call mysql_pconnect, my PHP code hangs and >doesn't proceed. I can't check mysql_error because it doesn't go beyond

[PHP] Re: unset array here?

2002-07-26 Thread Richard Lynch
>Hello, > >I have this example code: >function doprint($a){foreach($a as $value)echo $value;} >doprint(array('1','test','hello','and')); > >Question, is the array in memory after the function call? >So, should it be better to use this: > >function doprint($a){foreach($a as $value)echo $value;} >d

[PHP] Re: Help with msql_fetch_array()

2002-07-26 Thread Richard Lynch
>I have a couple of scripts that fail with the error of: >Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result >resource in... > >I'm new to both SQL and PHP and I'm wondering if I have some setting >turned off or what. > >Here's the piece of code that is failing (the seco

RE: [PHP] call to undefined function: mysql_connect

2002-07-27 Thread Richard Pijnenburg
It seems then that your mysql support isn't installed correctly with your php. Richard Pijnenburg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 28, 2002 12:25 AM To: [EMAIL PROTECTED] Subject: [PHP] call to undefined function: mysql_co

[PHP] Re: pdflib, NEED HELP with function problem (newby)

2002-07-29 Thread Richard Lynch
>PDF_set_text_pos($p, 80, 670); >PDF_show($p, "Requirements:"); > >works just fine outside of a function but if I put the same thing inside a >function like so > >function help() > { > PDF_set_text_pos($p, 80, 670); > PDF_show($p, "Test:"); > } > >I get this error

[PHP] Re: slow reading from socket

2002-07-29 Thread Richard Lynch
>Hi > >I am building (or attemting to build) an msn messenger class. I am having >problems reading from the socket. > >I open a connection with fsockopen(), i then write commands to the socket >with fputs(). I am reading wth fgets(). > >It is all fine if I am reading one line returned by the ser

[PHP] Re: what is the .Xauthority file

2002-07-29 Thread Richard Lynch
>I just connected to my web server and found that there was a new file named >".Xauthority", which I didn't created. Does anyone know what this file is? >Can I delete it? If you tried to run X (X-Windows) at some point, that file would be created, I think... man X might, eventually, if you dig

[PHP] Re: Possible to have optional values in function?

2002-07-29 Thread Richard Lynch
>is it possible to have optional values in a PHP function? > >some of the built in ones have optional parameters. Yes. And it's documented in the manual: http://php.net/functions And it's just like C anyway, mostly, so you could have tried it and had an answer faster than asking thousands of pe

[PHP] Re: phpinfo()

2002-07-29 Thread Richard Lynch
>hi all!! >below is the display of one of my configuration of php on the first server.. >my question is that possible for me to hide out all the environment >variables such as user, hossttype.. editor... term etc and how? Try this: Also, there *might* be arguments to phpinfo() that would d

[PHP] Ming Sprite confusion

2002-07-29 Thread Richard Lynch
Please cc me on answers, as I'm way behind in this list... I have a perfectly good Ming (Flash) movie coming out of PHP, but it's a bit large... I'd like to put this thing on a diet. I figured I could do it with a Sprite for the tiny portion that's animated, but I'm not getting quite what I exp

[PHP] Re: PHP 4.2.2 and Apache LoadModule issue

2002-07-29 Thread Richard Lynch
>Hi All. > >I am having a weird problem... my PHP is outputting a "libphp4.a" and >"libphp4.la" modules and I can't get Apache to recognize this type of >file. Is there a way to tell PHP to generate a ".so" module? Or how can >I get Apache to use the .a and .la modules? I *think* PHP outputs .so

[PHP] Re: my application is not able to communicate with qmail sever !

2002-07-29 Thread Richard Lynch
>I am running my PHP application running on apache webserver.I am using >Qmail(installed on Linux operating system) as an SMTP server..The problem >is..I am not able to send any mails from my application using Qmail.Whereas >I am able to send mails from my application using SendMail..My PHP >a

[PHP] Re: Using cookies with PHP

2002-07-29 Thread Richard Lynch
>Does anyone have examples on how to use cookies with PHP? Yes. The manual has examples. Lots. And there are a ton of them on every PHP code archive I've ever seen. >I'm just getting >into this and would like to know the difference between >stored cookies and non-stored per session cookies.

[PHP] Re: including just created file

2002-07-29 Thread Richard Lynch
>$cache_file_name = "cache/$id/$tid". ($showall ? '_all.php' : '.php'); >$cache_dir_name= "cache/$id"; > >if(!file_exists($cache_file_name) || @filectime($cache_file_name) + 30 < time() ) { If you may have loaded/altered the file system between calls to this directo

[PHP] Re: Changing a variable's value when a link is clicked

2002-07-29 Thread Richard Lynch
>Is there a way to change the value of a global variable when someon clicks a > URL link on a web page? Not really... Or, more properly, "Yes, but it wouldn't be the same global from PHP script you're thinking of" Let's look at HTTP in slow-motion: 1. Browser requests URL. 2. Server gets URL r

[PHP] Re: How reliable is pcntl support?

2002-07-29 Thread Richard Lynch
>I've recently had a need to write a standalone script that needs to fork off >a number of children during its operation, and I'd like to use PHP since >I've already written most of the functions in a web application I did in >PHP. But, I'm now not so sure if that's feasible. It can certainly be

[PHP] Re: php 4.2.2 on redhat 7.3

2002-07-29 Thread Richard Lynch
>I am trying to figure out how to upgrade php from 4.1.2 (which is the >default that comes with redhat 7.3), to version 4.2.2. From the small amount >of documentation I have been able to find on the subject, it looks like I >need to download a rpm. Is this the best way to do it or would it be bett

[PHP] Re: PostgreSQL

2002-07-29 Thread Richard Lynch
>How can i enable PostgreSQL module? >I have installed PHP 4 on IIS5, Windows 2000 I don't *think* PostgreSQL runs under Windows, really... You can maybe install the CygWin stuff (a Linux emulator under Windows) and get that to "work", but: 1. Don't expect good performance. CygWin ain't a Ferr

[PHP] Re: Closing file pointer

2002-07-29 Thread Richard Lynch
> Suppose I'm opening a socket connection to a server on some >port, and I do some transactions, and generate html. But I 'm not >closing the file pointer(socket). Only after the user clicks 'logout' >or something should I close the file pointer. How do I do this?? >I'm not understanding how to ke

[PHP] Re: PHP Integration...

2002-07-29 Thread Richard Lynch
>1) Integration with Outlook (yes the application will only ever be run on >windows). Define "Integration"... :-) Does it need to read the user's Outlook mailbox files or something? Or does it just need to send/receive email? Or what? I'll give as many answers as I can, but this is not really

[PHP] Re: filling an array(2)

2002-07-29 Thread Richard Lynch
>h. Ok. Can somebody explain this one? Why won't it work correctly? > >for($m=1;$m<=5;$m++){ > $div_idd[$m]=${'row->sub' . $m . 'd'}; >} > >Can it not be done with a 3 parter? The columns in the table that $row >gets, are sub1d, sub2d, sub3d, sub4d and sub5d. Or is it the "->" that is >

[PHP] Re: PHP UPGRADE on LINUX

2002-07-29 Thread Richard Lynch
> We have to upgrade our PHP to the latest stable version on Redhat Linux >7.3. We have lots of user using our PHP so what are all the precautions >and steps involved while doing this operations without disturbing their >existing program. At a minimum, we gotta know what version you are *ON*

[PHP] Re: Red Hat 7.2 enabling MySQL on preinstalled PHP

2002-07-29 Thread Richard Lynch
>I installed PHP when I installed Red Hat 7.2 without MySQL. I have now >added MySQL but I can't figure out how to enable it in PHP. Can anyone help? There are three possibilities: 1. PHP already has MySQL support, and you're done. 2. You need to install a different PHP RPM or tarball to get MyS

[PHP] Re: calling user-defined php functions from tag

2002-07-29 Thread Richard Lynch
>There MUST be some creative way to call a user-defined PHP function from >an tag. No, there mustn't :-) >Does anyone have any suggestions? > >For example: > >== > > Click here to start "function joe()". > >function joe() { >

[PHP] Re: portal / content management

2002-07-29 Thread Richard Lynch
>Hi > >Can anyone recommend a good portal system / content management system >(polls, forums, etc.) I have tried phpnuke but am bound to the standard >layout of it i.e content in the centre and blocks on the left or right. phpnuke has all kinds of skins and templates and whatnot with different l

[PHP] Re: File Browser like Win Explorer in php

2002-07-29 Thread Richard Lynch
>I am wondering if anyone has created or know where I can get a code for >browsing files and directory in using php in linux. The one I am looking >for is file browsing capability that is similar to Window Explorer, >meaning you can expand and collapse directory. >I just don't want to re-invent th

[PHP] Re: Pulling a data from array of checkboxes

2002-07-29 Thread Richard Lynch
>I am passing a value of checkboxes in a form to a new page like this (see >example here: http://www.gibsonusa.com/test/check/) >In a new page how can I pull the data from a MySQL database according to >each value I passed from a previous page? In other words: Assume that the >value of a checkb

[PHP] Re: Sending a File to User's Browser

2002-07-29 Thread Richard Lynch
>Hello, > >I need a user to save an image file to their disk. Normally when someone >clicks on an link to a .jpg file, the fil will display on the same browser >window, since it is capable of displaying such files. Now, I don't want >this to happen, I need to be able to show the user the "Save

[PHP] Re: Extra spacing with in HTML

2002-07-29 Thread Richard Lynch
> I am using a textarea to pass information to PHP. I want to be able to >include HTML tags inside the text area. I am using ln2br() to properly >convert line breaks to HTML. This is where my issue comes up. > >Lets say I have > > > Blar > > >ln2br() will crunch that and put out: > > Blar > >

[PHP] Re: php 'mail()' security

2002-07-29 Thread Richard Lynch
>How can I make my form which entered by a user, then sent to a company >employee, secure, not vulnerable attack? What kind of attack?... Rule #1. NEVER trust data coming in from the user. Things to maybe check: The email should be within a certain reasonable length. Their subject should not c

[PHP] Re: PHP/MySQL Search Engine Query Question

2002-07-29 Thread Richard Lynch
>I am currently working on a website that is implemented using PHP and MySQL. > >The site currently has a simple search engine that allows a shopper to type >in a search string that is stored in $search. For example, if a shopper >types in 1972 Ford Mustang >$string ="1972 Ford Mustang" > >Using t

[PHP] Re: file_name

2002-07-29 Thread Richard Lynch
>I 'm trying to work with file upload, I already read several sites who >refer that php will set the variable file_name automaticly,. > >I made 2 tries one on line 6 and other on line 7 of the atached code, but >both does not work. > >Why I receive the folowing errors, and how can I correct > >N

[PHP] Re: cant send data from a website to another

2002-07-29 Thread Richard Lynch
> >Hi newsgroup friends, >my name is mike and im qite new to php. >i have one problem: i cant send date via a method="post">. >so in the the php file called example, i write echo $nameofthefield, but the >data isnt send, so nothing is written in the browser! >what can i do? Read about the recent

[PHP] Re: Help reg. create user and allocate space

2002-07-29 Thread Richard Lynch
>I am using PHP-4.1.1, postgresql on Linux. > >I want the following functionality, I dont know how to implement it. > >Each time a new user registeres, I want to create mail account by the name >he specifies and allocate him some space of the server, say 2mb. > >How this is incorporated ? Woof. D

[PHP] Re: Oracle 8i SQL Problem..

2002-07-29 Thread Richard Lynch
>Hi, >This really isn't a PHP issue..sorry. > >I'm having a nightmare with Oracle 8i (pos!). I'm writing common SQL >which works for MSSQL 2K and seems correct for Oracle... but keeps >giving me a Error.. ORA-00933 SQL command not properly ended on the >following query... > >SELECT grp.grpdescrip

[PHP] Re: Site Search

2002-07-29 Thread Richard Lynch
> >I'm wondering what is a good general approach to enabling site-wide >searches on any topic on a 100% PHP-powered portal-type site for a >tertiary institution (yet to be built). Most if not all content will be >contained in a database, spread across potentially many different >tables. > >How ca

[PHP] Re: REGEX for phone #

2002-07-29 Thread Richard Lynch
>I'm using a regular expression (below) to check phone numbers. I'm getting >an error that I can't make sense of. > >$regex = "^((\(\d{3}(\) -))?*\d{3}(- )\d{4},?*)+$"; > >Output I'm getting = >Warning: REG_BADRPT in /home/basemen/public_html/verify_order.php on line 28 > >Anyone know what this m

[PHP] Re: REGEX for credit card number

2002-07-29 Thread Richard Lynch
>Does anyone have a regular expression that works to validate credit card >numbers? http://php.net/links.php has links to code archives that will give you tons of them. Ditto for the phone numbers post I'm about to read. NOTE: Making users not be able to use phone numbers like 1-800-MY-STUFF

[PHP] Re: need help with uploading images

2002-07-29 Thread Richard Lynch
>I'm trying to get an uploader to work, where you check to make sure it's a >jpeg file that's being uploaded, and no other files allowed. the server is >unix linux using php4.1 http://php.net/getimagesize -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound

[PHP] Re: Adding slashes when magic quotes is off?

2002-07-29 Thread Richard Lynch
>I'm making a website for a friend, and trying to do everything the right >way. I want to add slashes to EGPCS values. I know how to use this, >but one of the comments on the get_magic_quotes_gpc entry in the manual >points out that it wouldn't work with arrays in these values - and they >ha

[PHP] Re: sessions and https

2002-07-29 Thread Richard Lynch
>Do sessions not work when using an https connection? It seems I'm losing my >data between pages. You will need to pass the Session ID from page to page any time the user "crosses" the HTTP/HTTPS boundary. Actually, once you pass it, it will stick around on both, but you may want to be "sure" a

[PHP] Re: Nope it didn't work :(

2002-07-29 Thread Richard Lynch
>I've been trying a few things that should actually work and for some strange >reason they aren't. It's a strange one indeed. jpg is not a MIME type though >(just thought I'd let you know that) but nevertheless it should work, but >for some weird reason it isn't. >I'll keep plugging away at it til

[PHP] Re: PHP-MySQL connection problem

2002-07-29 Thread Richard Lynch
>My server is running on shared server which has support for PHP 4.1.2. I >installed mySQL for our shared server. I also installed phpMyAdmin. Both >are running properly. But I am facing following problems > >1) If there is any error in the script - It is not getting displayed - >screen is beco

[PHP] Re: libphp4.so

2002-07-29 Thread Richard Lynch
>howdy, > >i've got it all configured correctly .. well it doesn't spit any errors out >on make >but when i got to view a web page it opens a down load box ..so i added this > >LoadModule php4_modulelibexec/libphp4.so > >to httpd.conf as per the manual and restarted apache but it didn't st

[PHP] Re: ENCRYPT() in MySQL

2002-07-29 Thread Richard Lynch
>Sorry to be slightly OT, but I've prolly answered 1000 OT posts in the last >year, and this IS related for all those without mycrypt, so... > >I'm on a shared server which does not have mcrypt... not good, since i want >to temporarily store credit card numbers in an encrypted manner, either in a

[PHP] Re: Brain Fart- table formatting help

2002-07-29 Thread Richard Lynch
>The one constant is that if ($row->show_title) is true the table row will >have a background color then I need to make the rows after that alternate >until if ($row->show_title) is true again. > >Roughly I have the whole thing laid out like this right now: > >echo "\n"; $colors[0] = 'FF'; $c

[PHP] Re: major problem using mv command to a directory

2002-07-29 Thread Richard Lynch
>hi guys i have a big problem i need to fix , i was moving a tar ball to >another dir , using >mv ImageMagick-i686-pc-linux-gnu.tar.gz /home/usr, i now cannot move into >the usr directory, it has somehow appended the tar ball into the driectory >strucuture and cant undo this ? please help Like, y

[PHP] Re: How would I do this?

2002-07-29 Thread Richard Lynch
>Blink 182 >- > >Whats my age again?GuitarBassDrumLyricsBuy >at Amazon. >DammitGuitarBassDrumLyrics >Buy at Amazon. >MnMs GuitarBassDrumLyrics >Buy at Amazon. > >

[PHP] Re: Preg replace & Query Problem

2002-07-29 Thread Richard Lynch
> $style_1 = preg_replace('/\[url\]/', "index.php?catID=$category_id", >$style_1); > $style_1 = preg_replace('/\[title\]/', "$category_name", $style_1); Why use preg at all? http://php.net/str_replace will do it faster/easier... -- Like Music? http://l-i-e.com/artists.htm I'm looking for a

[PHP] Re: OT - javascript question..

2002-07-29 Thread Richard Lynch
>Sorry for the off topic post, but this is by far the most experienced list >I've found. > >I've got a php page that show all the .gif and .jpeg files in an directory >via a form based drop down menu. > >On the same page, I've also got a link that opens a new window, and allows >the user to upl

[PHP] Re: Public Scripts in a commercial product

2002-07-29 Thread Richard Lynch
>If someone is going to be using scripts that they grabbed >from a public forum (PHP Builder, PHPClasses, etc) in a >commercial product (that is going to be compiled with the >Zend encoder and released), what is the protocol, if any? >Do you have to get permission from the author or anything? >I

[PHP] Re: Passing PHP variables into javascript

2002-07-29 Thread Richard Lynch
>echo "$chon_pet[7]"; JavaScript won't let you use [] in a name, so you'll have to refer to the elements by number. -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already)

Re: [PHP] String Question

2002-07-31 Thread Richard Baskett
"; ?> Rick A sense of humor can help you over look the unattractive, tolerate the unpleasant, cope with the unexpected, and smile through the unbearable. - Moshe Waldoks > From: "Randy Johnson" <[EMAIL PROTECTED]> > Date: Wed, 31 Jul 2002 15:26:15 -0400 > To: <[EMAIL PROTECTED]> > Subject: [PHP

[PHP] Bug reporting site

2002-08-01 Thread Richard Black
Anyone else having trouble getting to http://bugs.php.net ??? == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: Linux PHP editor

2002-08-09 Thread richard . mail
JJ Harrison\ writes: > I just switched over to Red Hat Linux from Win2k... > > Only to find my fav editor only works on windows systems... > > could someone suggest a good replacement? > > > -- > JJ Harrison > [EMAIL PROTECTED] > www.tececo.com > > > > -- > PHP General Mailing List

RE: [PHP] fruity arrays

2002-08-13 Thread Richard Black
keys (and obviously array_values too) be $fruit_array_of_choice, and not just $fruit_array??? That might stop the warnings... HTH, Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] relocation

2002-08-13 Thread Richard Black
Or even header("Location: index.php?var=value&var2=value2"); And you would probably want to follow that with exit; Rather than break; HTH, Richy ====== Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com

RE: Re[2]: [PHP] Credit Card suggestions

2002-08-13 Thread Richard Black
Doesn't md5 generate a 128 bit binary number??? That means there are 3.4028236692093846346337460743177e+38 possible combinations which can be generated. So surely the odds of 2 strings producing the same md5 code are 1 in 3.4028236692093846346337460743177e+38??? Having said that, I guess diction

RE: [PHP] [Class] Behaviour global variables

2002-08-14 Thread Richard Black
TH, Richy ====== Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -Original Message- From: Tim Stoop [mailto:[EMAIL PROTECTED]] Sent: 14 August 2002 14:27 To: [EMAIL PROTECTED] Sub

[PHP] OO code and private functions

2002-08-16 Thread Richard Black
Can I make a function private in PHP, so that it can only be called from within an object of that class??? Just discovering the wonders of OO PHP... :-) == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435

[PHP] Multidimensional arrays

2002-08-19 Thread Richard Fox
Hi, Given the array $array initialized by: $query = "SELECT id,name FROM MYTABLE"; $result = mysql_query($query); $nrows = mysql_num_rows($result); for ($i=0; $i<$nrows; $i++) { $arr = mysql_fetch_array($result); $array[$i]['id'] = $arr['id'];

[PHP] Re: moving content from one database to another, help

2002-08-24 Thread Richard Lynch
>I'm sorry, I thought that what I was asking was very simple. but everyone >wants to make it more >difficult then it actually is. No, you just hadn't quite explained what you needed properly. There were simply too many undefined points in your email for a reasonable answer to be given. If yo

[PHP] Re: Seeding for php functions

2002-08-26 Thread Richard Lynch
>Im using array_rand() and shuffle() in my scripts. >Im seeding using mt_srand(). >I noticed the manual didn't suggest that mt_srand() can be used to seed >array_rand() and shuffle() but the older srand(). >The mt_srand man page states that its a drop in replacement for srand(). >I just would lik

[PHP] Re: comparing string data with database data

2002-08-26 Thread Richard Lynch
>Can somebody help me with this or point me in the right direction. >an example of what i need >I have a string that has 4 items in it separated by a space >$string="item1 item2 item3 item4"; >I also have a database with a lot of other items in it. > >I what to compare the items in the string with

[PHP] Re: uploading problems...please help

2002-08-26 Thread Richard Lynch
>I'm trying to upload files from my PC to my website. The code is a little >nuts, but it's all I got to work locally, butonce I take the code to the web >I get this message. Can anyone tell me what I'm doing wrong? > >I'm trying to upload a file, strip all the information so as to just use the >

[PHP] Re: Trouble Downloading Files

2002-08-26 Thread Richard Lynch
>I'm not certain this is the right place to ask, but here goes. For security >reasons I have placed certain document files in a directory outside my web >root. There are many types of files included (e.g. jpg, gif, txt, pdf, xls, >doc, mdb, ppt, and dwg). Clicking links on my web page will downl

[PHP] Re: Dynamically Downloading Data

2002-08-26 Thread Richard Lynch
>Is it possible to select data from a database and have it be available for >download without actually creating a file on the server? Yes, of course :-) Here is a tab-delimited file of upcoming events from 'whatever' table: = now()"; $upcoming = mysql_query($query, $connection) or error_log(m

[PHP] Re: Session woes

2002-08-26 Thread Richard Lynch
>the problem I have, however, is that on the third page of my wizard, if the >user submits only some of the required fields, it submits back onto itself >and displays an error as required, but the problem is that when you fill in >the missing fields and move on to the next page (in effect back ont

[PHP] Re: register_globals off or on, why on

2002-08-26 Thread Richard Lynch
>> "Geeklog needs the register_globals variable turned on in order to work. >> Since PHP 4.2.0, the default for register_globals is "off". To fix it, >> simply add the following line to your php.ini file > >Is this not *wrong*. It sounds to me like fake laziness. Nothing drives >me bonkers more t

[PHP] Re: MySQL PASSWORD() Question

2002-08-26 Thread Richard Lynch
>If I insert a row's field's value using the PASSWORD() function, will I need >to use it or another function to find that row using the same field? You'll need to do this when somebody tries to log in later: In other words, you can *NEVER* "go backwards" from the password() function output to

[PHP] Re: What's the trick ?

2002-08-26 Thread Richard Lynch
>Hi guys, > >Am writing a web based mailclient (obviously with PHP+IMAP), >In the 'ReplyMail' script, inorder to add the "> " string >at the beginning of everyline, I used the following code, >$replymessage = $replymessage.str_replace("\n", "\n> ", >htmlspecialchars(trim(imap_body($mbox, $msg

[PHP] Re: Help with matchng strings

2002-08-26 Thread Richard Lynch
> >I have two list one is listA and the other is listB I would >like to take the values in listB and compare them with listA if any of >them match then I what to create a new list listC and put the values >that match in it. If they do not match I want the values to go into listD. >I have been mess

[PHP] Re: Numbers to Roman Numerals - Native PHP Function?

2002-08-26 Thread Richard Lynch
>Does anyone know if there is a native function within PHP to convert numbers >to roman numerals? > >I could easily write a little convertor, but I was hoping there was an >simple function - although I couldn't seem to find anything like that in the >manual. If http://php.net/printf doesn't do it

[PHP] Re: Call to undefined function mysql_connect()

2002-08-26 Thread Richard Lynch
>Help! > >I am getting the following error message for : > $link=mysql_connect("localhost","$user","$pass"); // line 34 >?> > >Fatal error: Call to undefined function: mysql_connect() in >/home/www/test.somename.org/aux/db-mod.php on line 34 > >I have used this call successfully on php v4.0.6, an

[PHP] Re: Object member variable names

2002-08-26 Thread Richard Lynch
>Hi, > >I've got a little problem with variable naming of object members. Here is my >situation: I've got a website form, whoms contents will be saved in a MySQL >table with two fields: name and value. The name could be anything like >"bla->test", "array[3]->test[4]->name"... > >Now I have a php s

[PHP] Re: check unread messages in a forum

2002-08-26 Thread Richard Lynch
>I have made a forum in PHP, and the users are logged in using cookies. I >want all new threads (and if there are new replies in an old thread) to be >highlight or something like that. > >How do I check if a user has read a message or not? Every user has a unique ID when they log in, right? And e

[PHP] Re: New to PHP/mySQL - Help on script

2002-08-26 Thread Richard Lynch
>Thanks for everyones help yesterday but nI have come up against a problem >(as I am new). I have created my document as detailed below with notes. I >can see from the form that I have connected to the server, accessed the >correct database, created the statment and executed it. The problem is how

[PHP] Re: Date conversion problems

2002-08-26 Thread Richard Lynch
>Having a little trouble with converting dates. > >I have, in my database, a bunch of dates stored like this: -M. Month is >obviously the number of the month (5), not the name (May). > >I want to convert the format to MMM, (ex: May, 2002), so I used the >mktime function. Basically I extra

[PHP] Re: Posting variable without form

2002-08-26 Thread Richard Lynch
>I tried it but it is not successful. I think it is because I tried to >post to a https(SSL link). You are correct. If you want to use SSL, you're better off using cURL. The above code would be about 100 X as large if it was trying to do all the encryption and SSL interchanges to get an SSL con

[PHP] Re: strange error message when trying to start apache

2002-08-26 Thread Richard Lynch
>Hello again, so earlier I was trying to install >PHP-4.2.2 with Apache-2.0.40 and was having some sapi >problems. I then read that I might be better off >going with Apache-1.3.26. Well, I installed 1.3.26, >and then configured and installed php into apache as a >DSO. Everything appeared to go

[PHP] Re: Reading URL in address bar

2002-08-26 Thread Richard Lynch
>I want to pass the current url (appearing on the browser address bar), say >http://www.mydomain.com?cat.php=234 to appear in a form field >in the a new page, say category.php. >I am sure it's something to do with HTTP_variables or CGI.referrer but can't >seem to get the one needed. Either use th

[PHP] Re: setcookie() failure

2002-08-26 Thread Richard Lynch
>Can anyone tell me why the following setcookie()s fail? >$expDate = mktime(12, 50, 30, 6, 20, 2010); >setcookie("tzusercookie", $uid, $expDate); >setcookie("tzpasscookie", $password, $expDate); Among other stupidities, some versions of IE require that you provide *both* date and directory, or *

[PHP] Re: Forcing browsers to use cached pages

2002-08-26 Thread Richard Lynch
>Is there any way to force a browser to use a cached version of a page if the >user hits the back button? "Force" might be a bit too strong, but there are a bunch of headers about Cache-control and Expiration and such-like that you can convince a lot more to cache a document than do without the h

[PHP] Re: array_push

2002-08-27 Thread Richard Lynch
>why this array_push($x ? $a : $b, 'value'); produce error(Fatal error: >Only variables can be passed by reference) > > >$x = 1; >#$x = 0; > >$a = array(); >$b = array(); > >array_push($x ? $a : $b, 'value'); > >i must rewrote this in > >if ($x) > array_push($a, 'value'); >else > array_push($b

[PHP] Re: problem with using include files

2002-08-27 Thread Richard Lynch
>The problem I have when using include files is the path to different parts >of the web site. > >To Explain: > >I have a header.inc file in an inc directory: > >root > |___inc > | |___header.inc You may want to move your include files outside the web tree so that malicious users can't surf

[PHP] Re: getting directory info

2002-08-27 Thread Richard Lynch
>Can I use php to get a list of all the jpgs in a folder? I want to make a >photo album type thing for a website, and I want it to be real simple (i.e. >you put photos (jpgs) in a folder called photos and upload them. Then the >album is built dynamically using php. Thoughts? http://php.net/ope

[PHP] Re: PHPSESSID appended to URL on initial page load

2002-08-27 Thread Richard Lynch
>disable URL rewriting altogether and rely soley on cookies. How do I >disable PHP session URL rewriting? I don't see a setting in php.ini for it. > >; use transient sid support if enabled by compiling with --enable-trans-sid. >session.use_trans_sid = 1 This one. -- Like Music? http://l-i-e.c

[PHP] Re: pattern matching urls

2002-08-27 Thread Richard Lynch
>Just wanting some advice on something im doing, basically im storing >news into mysql and what i want to do is, when the news is displayed, if >a url is in there ie(http://www.blahblah.com OR >mailto:[EMAIL PROTECTED]) it will automatically be displayed as a link, >im considering using preg_match

[PHP] Re: Newbie,module or CGI and server question

2002-08-27 Thread Richard Lynch
>Hi, >I just installed PHP via PHPTriad...I have a couple of simple questions I >hope you can answer > >1)How do i know if this is running a module or cgi version? Look at the output in the top part. You'll see CGI or ISAPI or ASAPI or whatever. There's also a built-in function to detec

[PHP] Re: exif_thumbnail() problems

2002-08-27 Thread Richard Lynch
Can't help with the exif stuff. >I tried using imagecreatefromjpeg() but that tells me theres no such >function. That means you forgot the --with-jpeg-dir when you did the --with-gd or the --with-gd never kicked in properly or... Basically, you didn't configure right, so go back to that stage.

[PHP] Re: Are sessions affected by Unix user changes?

2002-08-27 Thread Richard Lynch
>Are sessions in PHP somehow affected by changes in Unix users? I know that >the only recent changes to the server have been the addition of a few Unix >users and the changing of some older passwords, but now sessions do not work >within PHP. > >Is a session related to a web (default?) user? Sess

[PHP] Re: '#' character breaking the URL string

2002-08-27 Thread Richard Lynch
>I have a 5-step (5 page) process in which users must answer various >questions. Each page passes along the data to the next page, at the same >time capturing the data from the previous page and passing that along too. > >To capture all the data submitted previously, I have the following code: >

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