Re: [PHP] CheckBoxes....

2002-03-02 Thread Jeff Sheltren
As far as I know, you can't name different checkboxes with the same name (seems odd to me to do this anyway) When you submit a form to a php page, the php page will have a variable for each input item in your form So if you have checkbox items named, a, b, c, and d, and submit a form with a

Re: [PHP] hmm.. more trouble with telnet.

2002-03-01 Thread Jeff Sheltren
How about just typing 'mysql' (without the quotes) if it is on the system and in a directory which is in your path (it should be if your host knows what they're doing), then that will connect to mysql for you If that doesn't work, then you can either try using 'find' (type 'man find') for

Re: [PHP] elseif without else

2002-02-28 Thread Jeff Sheltren
If you are setting a variable inside of the if statements, and then checking that variable later, then I would say you should either use an else statement to give that variable a default value, or you should set the variable to a default value before the if statements Your code is

Re: [PHP] How to decompress .bz2 file

2002-02-28 Thread Jeff Sheltren
Search on google! Here's the bzip2 homepage with links to download a windows executable: http://wwwdigistarcom/bzip2/ Jeff At 10:55 AM 3/1/2002 +0530, dharmavatar wrote: Hi, Can any one tell me how to decompress bz2 file,I am using WINDOWS-2000 so what are the steps? Thanks in advance

Re: [PHP] bbcode

2002-02-22 Thread Jeff Sheltren
Why not download a forum, such as phpbb (www.phpbb.com) and check out their code? =) Jeff At 03:41 PM 2/22/2002 -0500, Leif K-Brooks wrote: I'm planning to make a forum built into my site. I know all of the forums have bbcode, and I doubt they all programmed it themselves. Is there somewhere

Re: [PHP] fdisk?

2002-02-20 Thread Jeff Sheltren
I would say it stands for fixed disk - it really doesn't format anything anyway, it is for partitions. A paste from the man page: NAME fdisk - create or modify fixed disk partition table Jeff At 11:11 AM 2/20/2002 -0500, Brian V Bonini wrote: Anyone know what fdisk stands for? I've

Re: [PHP] Class question

2002-02-20 Thread Jeff Sheltren
Well, I guess many things are accepted now, but here's my two cents: I wouldn't access global variables, instead you should pass everything you need as parameters. Using global variables can come back to bite you occasionally because you may think you are changing a local variable at one

Re: [PHP] timestamp confusion

2002-02-20 Thread Jeff Sheltren
Well, what you are missing is that those are the number of seconds *on that machine* since 1970... so actually, if both of your clocks were set correctly, you should be getting the *same* number returned by time(). Hope that clears it up a little. Jeff At 03:18 PM 2/21/2002 +1100, Justin

Re: [PHP] PHP binary file

2002-02-19 Thread Jeff Sheltren
Hi, mine is located here: /usr/bin/php I don't recall telling it where to put the binary (if such an option exists) so I assume that is the default location. Jeff At 09:28 AM 2/19/2002 -0500, Hunter, Ray wrote: Has anyone compiled php on linux and found the binary executable file? Ray Hunter

Re: [PHP] Weather Scripts

2002-02-19 Thread Jeff Sheltren
Hi, it sounds like it shouldn't be too bad, but you didn't say where you plan on getting the information from... At 11:43 AM 2/20/2002 +1030, Shannon Doyle wrote: Hi People, I have been looking around the web lately and have noted a number of sites are running what appears to be php scripts

RE: [PHP] What Do You Think?

2002-02-15 Thread Jeff Sheltren
Sign me up, too! I'd love to help with any site that promotes good beer! =) Perhaps we start a database of pubs/bars and they can be browsed from a map, or a user can search for bars by name/location/rating(maybe), and they can also search by beers on tap. Sounds like quite a fun project to

Re: [PHP] Novice: Problems getting data from forms to PHP scripts.

2002-02-14 Thread Jeff Sheltren
Hi, for starters, I think you need to change your html... it should read something like this: Name: input type=text name=dateidbr Jeff At 03:50 PM 2/14/2002 +, Sean Connelly wrote: Hi, I've just started to learn php. I can't seem to get any data from an HTML form to a php script. I've

RE: [PHP] Anyway to open a PHP file and view its code in the browser?

2002-02-14 Thread Jeff Sheltren
A symbolic link is like a pointer to a file. It is like a shortcut on windows OS's... Jeff At 03:44 PM 2/14/2002 -0700, Kevin Stone wrote: I did a net wide search on Symbolic links to learn what they are and how to use them. Wouldn't you know everyone's talking about them but no one explains

Re: [PHP] mysql_select_db() problem

2002-02-09 Thread Jeff Sheltren
It may be having a problem because you are not specifying which connection to use. perhaps try something like this: if(!$db = @mysql_connect($dbhost, $dbuser, $dbpasswd)) die(An Error Occured. Unable to connect to the database.); if(!@mysql_select_db($dbname,$db)) die(An Error

Re: [PHP] escaping ?

2002-02-08 Thread Jeff Sheltren
Hi, try this: str_replace(?xml version=\1.0\? Jeff At 03:45 PM 2/8/2002 -0600, Steven Jarvis wrote: I'm trying to do some string replaces on XML files to import them into a prprietary db that doesn't understand XML. I need to strip the XML tags out of the file. However, when I use this

Re: [PHP] Preventing Identical Form Fields

2002-02-07 Thread Jeff Sheltren
Hi, I think that you could still use Chris' method, you will just have to do it in a loop. Create an array of all the form fields, and then have a nested for loop which just checks that none of the elements are equal. $numelements = count($fieldarray); for($i = 0; $i $numelements; $i++) {

Re: [PHP] Checking for plus signs?

2002-02-07 Thread Jeff Sheltren
The plus is a special character for regular expressions. You need to escape it in order to search for a literal + Try this: eregi(\\+, $variable) Jeff At 08:40 PM 2/7/2002 -0500, you wrote: I'm trying if(eregi(+,$variable)){, but it gives me an error. What do I do? -- PHP General

Re: [PHP] keyword search help

2002-02-07 Thread Jeff Sheltren
Not really a php question, is it? But what I would do is have two tables, a cdrom table and a keyword table. Each cd in the cd table would have a cd_id, and then the keyword table could have two attributes, cd_id (foriegn key from cdrom table) and keyword. Make the primary key for the

Re: [PHP] Re: Newbie: Question about filesize()

2002-02-06 Thread Jeff Sheltren
At 10:27 AM 2/6/2002 -0500, Ben Crawford wrote: You also seem to have an extra equals. Your loop should read: while (false != ($file=readdir($handle))){ I think you could eliminate the false != in the while condition... It should be just the same if you write while (($file = readdir($handle)))

Re: [PHP] File Uploads

2002-02-06 Thread Jeff Sheltren
The username will be the same username that apache is running as, which you can specify in your httpd.conf file. -Jeff At 10:32 AM 2/6/2002 -0500, Ben Crawford wrote: I apoligize if this question has already been asked but I am looking to upload files to my server. I use a form and can

Re: [PHP] Check if var is a domain name

2002-02-05 Thread Jeff Sheltren
Hi, I would use a regular expression to check it. This is a pretty general one, but I think it should do the trick. It searches for 1 or more upper or lowercase letters, followed by a literal dot, followed by 2 or 3 lowercase letters. Of course there are valid domains that would not match

Re: [PHP] Dynamic Dropdown menu question.

2002-02-05 Thread Jeff Sheltren
Hi, looking at your sql statement, it seems like you are always setting my_job_id and job_id to the same value for each row in the table. select job_id AS my_job_id is just putting the value of job_id in a variable called my_job_id. Could you tell us the structure of your mysql table please?

Re: [PHP] Reading log files.

2002-02-04 Thread Jeff Sheltren
Well, the first thing that comes to mind would be using the UNIX tail command. Of course, this does you no good if you're on windows, but I'm not sure if that is the case. if $n is the number of lines specified by the user, then the code would be like: System(tail -$n logfile); Jeff At

Re: [PHP] Problem...header already sent by

2002-02-04 Thread Jeff Sheltren
You can't send anything before you send headers... the html tag is messing you up I believe. Jeff At 08:24 PM 2/4/2002 -0800, Peter Run wrote: Hi, I get the warning message (see below), whenever I try anything with authentication/session with PHP. This is tried under Windows (PHPTriad).

Re: [PHP] crypt/Password

2002-02-03 Thread Jeff Sheltren
What you could do is send a newly generated password to them, and then allow them to change the password on your site to something easier to remember... Jeff At 11:56 PM 2/3/2002 +0800, Phil wrote: Hi there, I'm creating a user/password table that will use either Mysql Password or PHP Crypt

Re: [PHP] Displaying a please wait while doing a file upload?

2002-02-03 Thread Jeff Sheltren
Well, although this won't wait until exactly when the image creation is done, you could use a meta refresh tag to refresh to your new page after a certain number of seconds... Create a php page with whatever code you need, and then have something like this: html head meta http-equiv= refresh

Re: [PHP] Adding 6 digits to a str?

2002-02-02 Thread Jeff Sheltren
Why is it that you want to represent an int with leading 0's? Is it just to print it out that way? If that is the case, then you can use the printf function for formatted printing. Jeff At 10:53 AM 2/2/2002 +0100, Andy wrote: Hi guys, I am trying to force a int to be 8 digits. If it is

Re: [PHP] Securite problem

2002-02-02 Thread Jeff Sheltren
I believe that require() and require_once() have a problem with relative paths. See here for more info: http://www.php.net/manual/en/function.require-once.php Jeff At 01:24 AM 2/3/2002 +0100, Roebie wrote: Dear all, I have a index.php3 file in a password protected directory (on Windows) which

Re: [PHP] Upload script with user admin

2002-02-01 Thread Jeff Sheltren
You may want to check into some of these: http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/Upload_Systems/ Jeff At 05:34 PM 2/1/2002 +0100, ArtistHotel wrote: Hi, I need an upload script that lets predefined users log in and upload files. Does such a script exist? Regards

Re: [PHP] ereg et all

2002-01-31 Thread Jeff Sheltren
I'm not sure why you wanted the last word tHis to be changed to That (with a capital)... can you explain further? Jeff At 10:52 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: that is not what I meant... I want the cases to remain... - Original Message - From: Rick Emery

Re: [PHP] ereg et all

2002-01-31 Thread Jeff Sheltren
+0100, Edward van Bilderbeek - Bean IT wrote: Oh, that was a typo... sorry... it should be: This equals this equals tHis - That equals that equals tHat Edward - Original Message - From: Jeff Sheltren [EMAIL PROTECTED] To: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED]; [EMAIL PROTECTED

Re: [PHP] Accessing piped data in PHP shell script

2002-01-31 Thread Jeff Sheltren
Have you tried running the program from your php script? Something like: $stuff = System(cat foo.txt); I have done something similar, but I don't recall exactly how I did it. Jeff At 04:30 PM 1/31/2002 -0800, David Yee wrote: How can I access data/parameters piped into a PHP shell script?

Re: [PHP] mysql_pconnect mysql_connect

2002-01-30 Thread Jeff Sheltren
At 11:09 PM 1/2/2002 -0500, jtjohnston wrote: What is the difference between: $myconnection = mysql_connect($server,$user,$pass); and $myconnection = mysql_pconnect($server,$user,$pass); I read the faq. mysql_pconnect creates a persistent connection to the server... check here:

Re: [PHP] mysql_pconnect mysql_connect

2002-01-30 Thread Jeff Sheltren
At 11:40 PM 1/2/2002 -0500, jtjohnston wrote: Jim, Thanks. What I don't really get is what persistent means. A problem I'm having with my mysql server is that it is a whole bunch of messages with in the space of 5 minutes like: 020130 16:11:08 C:\PROGRA~1\EASYPHP\MySql\bin\mysqld.exe: Forcing

Re: [PHP] Help with Logical 'OR'

2002-01-28 Thread Jeff Sheltren
With a logical OR statement, many languages will evaluate the first statement, and if the first condition is true, then it will not evaluate the second condition, because TRUE OR (anything) is TRUE. This saves the program from executing any more code than it has to. If the first condition

Re: [PHP] Ouch that hurts

2002-01-27 Thread Jeff Sheltren
It seems that you are running the script on a windows machine... Yet, I think that your php.ini must be trying to store session files in /tmp (which does not exist on windows). Perhaps if you change the session path in the php.ini file it will fix the problem... Jeff At 01:50 PM 1/28/2002

Re: [PHP] One error after another.

2002-01-27 Thread Jeff Sheltren
Can you paste the code please? You must send the cookie before you send anything else. Jeff At 02:20 PM 1/28/2002 +1300, Philip J. Newman wrote: Warning: Cannot send session cookie - headers already sent by (output started at d:\website\myphp\fitness\index.php:7) in

Re: [PHP] Re: Calculate Directory Size

2002-01-26 Thread Jeff Sheltren
I'm sorry, but I won't be much help on the windows side of things, but for UNIX, the job is already done for you! There is a utility called 'du', which will tell you the disk usage of a file (or a folder and its contents). Specifically, you would want to use the -s flag to specify only to show

Re: [PHP] Changeing Dates.

2002-01-26 Thread Jeff Sheltren
Hi, provided that your initial string will always be in the same format (same # of numbers) I would use the substr function. substr(string, start, [length]) Ex: $mystring = 20020124020555; $year = substr($mystring,0,4); $month = substr($mystring,4,2); $day = substr($mystring,6,2); etc... Hope

Re: [PHP] PHP and XHTML

2002-01-26 Thread Jeff Sheltren
Hi. Have you tried something like: ? echo(? xml version=\1.0\ ?\n); ? I've not tried using xml php, but that may work... Jeff - Original Message - From: Frans Englich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 26, 2002 2:53 PM Subject: [PHP] PHP and XHTML When

Re: [PHP] dynamic variables in sq?l

2002-01-25 Thread Jeff Sheltren
Can you show how your mysql table is set up? Otherwise I am not quite sure what you are trying to do with your SQL statement. Jeff And then I am trying to get the price out of a table in my database with this code: $sql = mysql_query(SELECT '$car' FROM varetabell where carid='$carid' );

Re: [PHP] Problem in mysql connection

2002-01-25 Thread Jeff Sheltren
What was the error message given? Are you sure that mysql is running and working properly? Jeff Hello, I have installed php4 rpm in my machine.while connecting php with mysql it is giving fatal error.I have given like this mysql_connect($servername,$username,$password); Why it is

Re: [PHP] Passing objects

2002-01-25 Thread Jeff Sheltren
Well, PHP has 'sessions' which allow you to do just what you are asking, pass variables between multiple pages. Sessions are somewhat like cookies, but all data is stored on the server instead of the client, so you don't have to rely on the user to accept your cookie. Here's a short

Re: [PHP] Help with regular expressions

2002-01-24 Thread Jeff Sheltren
I think your problem is you are not including whitespace. Also, remember that . (dot) means any character except newline, so why not try this as your reg ex: //.* Hope that helps. -Jeff - Original Message - From: José Daniel Ramos Wey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

Re: [PHP] Help with regular expressions

2002-01-24 Thread Jeff Sheltren
Sorry, I forgot the newline at the end... your reg ex should look like: //.*\n making your command be: ereg_replace(//.*\n,,$string) Try that ;) Jeff I think your problem is you are not including whitespace. Also, remember that . (dot) means any character except newline, so why not try

Re: [PHP] Archive of this is. Is there a URL?

2002-01-24 Thread Jeff Sheltren
Yes there is. http://marc.theaimsgroup.com/?l=php-general - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 6:38 PM Subject: [PHP] Archive of this is. Is there a URL? Please advise. Thanks, Robin -- PHP General Mailing

Re: [PHP] Re: Resalution Dection

2002-01-24 Thread Jeff Sheltren
Yes, you can use javascript to get the user's resolution: screen.width screen.colorDepth are two variables that you can access through javascript, which you might find helpful. Jeff Try Javascript. I dont recall offhand but there are some properties you can use in Javascript to detect this

[PHP] More Fun With Sessions!

2002-01-23 Thread Jeff Sheltren
Well, I was having problems getting sessions working at all on my FreeBSD box, but they are now working... But that leads me to more problems... For any others that might have a problem w/ FreeBSD, try setting the referer_check to 0 'session.referer_check = 0' Once I changed that things seem to

RE: [PHP] More Fun With Sessions!

2002-01-23 Thread Jeff Sheltren
Thanks, everyone for responding... after much headache I seem to have got it working. (not fixed, but working.) I was running php 4.0.6 on linux where the code worked. I just installed php 4.0.4pl1 on the freebsd box and now everything works great. It was probably not the best solution, but