Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Jason Wong
On Friday 20 December 2002 08:19, Beauford.2002 wrote: > Hi, > > This should be as simple as breathing, but not today. I have two variables > $a and $b which I need to compare in a switch statement in several > different ways, but no matter what I do it's wrong. > > This is what I have tried, can s

Re: [PHP] Problem with sessions.

2002-12-19 Thread Jason Wong
On Friday 20 December 2002 07:43, Mike Hillyer wrote: > Hello All; > > Please forgive me if I am repeating an often asked question, but I am > having a problem with sessions. I simply cannot get them to work. > > The sample code I provide works on another server perfectly, this is the > first page:

[PHP] PopUp Recall

2002-12-19 Thread beno
Hi; I have a PHP script that prints x number of products and related code to the generated HTML page. In that repeated code is a JavaScript that enables a pop-up window with an enlarged photo of a thumbnail image. The code printed to the JavaScript is dynamically generated in the loop and is co

Re: [PHP] Re: offline application

2002-12-19 Thread Philippe Saladin
"Edward Peloke" <[EMAIL PROTECTED]> a écrit dans le message news: [EMAIL PROTECTED] > using php, can I extract data from an access file? you can use odbc or com to connect to an access database. (http://www.php.net/manual/en/faq.databases.php#faq.databases.access) BTW, concerning your first questi

Re: [PHP] Good program to indent large quantity of files?

2002-12-19 Thread Leif K-Brooks
But as far as I can tell, there's no "indent all" option. I'd have to do it by hand, or remove and recreate the line breaks in the text files. Justin French wrote: on 20/12/02 4:04 PM, Leif K-Brooks ([EMAIL PROTECTED]) wrote: Thanks, but that's not what I'm looking for. I already have a go

Re: [PHP] Alternating Links

2002-12-19 Thread conbud
Hey, thanks. I should have thought about it longer, since I made something the exact same to alternate bgcolors. Thanks for refreshing though. Justin French wrote: There was a post on a similar thing the other day, and about once a week for the past few years :P Quick (untested) example: $i

Re: [PHP] Alternating Links

2002-12-19 Thread Justin French
There was a post on a similar thing the other day, and about once a week for the past few years :P Quick (untested) example: '; } echo "{$myrow['link']}"; if($i == 2) { echo ''; $i = 0; } } ?> This is easily adaptable to three (or more) columns by changing the last if() statement..

Re: [PHP] Alternating Links

2002-12-19 Thread Philip Olson
This faqt answers your question: http://www.faqts.com/knowledge_base/view.phtml/aid/8583 Regards, Philip Olson On Fri, 20 Dec 2002, conbud wrote: > Hi. > Lets says I have 8 links stored in a database, extracting those links is > no problem. Now lets says I have 2 columns, how do I get link

[PHP] Alternating Links

2002-12-19 Thread conbud
Hi. Lets says I have 8 links stored in a database, extracting those links is no problem. Now lets says I have 2 columns, how do I get link 1 into column 1 then get link 2 into column 2 then link 3 into column 1 and link 4 into column 2 and so on... This is column 1 This is column 2 -- Con

Re: [PHP] Good program to indent large quantity of files?

2002-12-19 Thread Justin French
on 20/12/02 4:04 PM, Leif K-Brooks ([EMAIL PROTECTED]) wrote: > Thanks, but that's not what I'm looking for. I already have a good php > editor, what I'm looking for is something to indent exsiting files. ... so open them up in the editor, indent them, save them, continue using your old editor.

Re: [PHP] URL path problems

2002-12-19 Thread Wee Keat
> Suppose my web domain is http://abc.com > There is a administration directory in my wwwroot which is used to store the > administrative control pages. > > However, from now on, everyone can access the administrative pages through > the addictive path to the domain such as: > http://abc.com/admini

RE: [PHP] URL path problems

2002-12-19 Thread Peter Houchin
if ur using apache using .htaccess in the directory .. and you can also set it in the httpd.conf > -Original Message- > From: ªüYam [mailto:[EMAIL PROTECTED]] > Sent: Friday, 20 December 2002 4:41 PM > To: [EMAIL PROTECTED] > Subject: [PHP] URL path problems > > > Suppose my web domain is

[PHP] URL path problems

2002-12-19 Thread ªüYam
Suppose my web domain is http://abc.com There is a administration directory in my wwwroot which is used to store the administrative control pages. However, from now on, everyone can access the administrative pages through the addictive path to the domain such as: http://abc.com/administration/xxx.

Re: [PHP] syntax to reference $_POST within function

2002-12-19 Thread Philip Olson
First, read this: http://www.php.net/variables.external Second, assuming you have a PHP version equal to or greater than 4.1.0 and the method of the form is POST, you'd do something like this: $banlist = array('[EMAIL PROTECTED]'); echo check_banlist($banlist, $_POST['email']); Your ques

Re: [PHP] Good program to indent large quantity of files?

2002-12-19 Thread Leif K-Brooks
Thanks, but that's not what I'm looking for. I already have a good php editor, what I'm looking for is something to indent exsiting files. Mike Bowers wrote: I use Ultra-Edit 32 .. It auto-indents when u set highlight mode to PHP .. It also has a syntax higlight feature to show you when it reco

[PHP] Good program to indent large quantity of files?

2002-12-19 Thread Leif K-Brooks
I haven't been indenting any of my code, but I want to start indenting to make the code more readable. It would be near-impossible for me to manually indent what's already there, though. So, I'm looking for a program to indent an entire folder of PHP files at once. Any suggestions? -- The ab

[PHP] syntax to reference $_POST within function

2002-12-19 Thread Jamie
I am attempting to modify an old script to support the superglobal $_POST with register_globals=Off. These register globals are definately challenging when you are new to php and every example shown anywhere uses the old method but I guess what doesn't kill you only makes you stronger. I am t

[PHP] Re: Training Courses in PHP & MySQL

2002-12-19 Thread michael kimsal
Ben C . wrote: Does anyone know where I can get a good training course in both PHP and MySQL that would make me proficient? Or does anyone know of a good tutor? I would prefer it to be in California or on the west coast. Please provide your comments. I'd neglected to mention that with our co

RE: [PHP] Training Courses in PHP & MySQL

2002-12-19 Thread Mike Hillyer
I would reccomend going to the source and looking at the training courses offered by MySQL AB, the developers of MySQL. Here is a link to the info page for MySQL's training on PHP + MySQL: http://www.mysql.com/training/courses/developing_dynamic_webapp.html Looks like a course is coming up in San

[PHP] Re: Training Courses in PHP & MySQL

2002-12-19 Thread michael kimsal
Ben C . wrote: Does anyone know where I can get a good training course in both PHP and MySQL that would make me proficient? Or does anyone know of a good tutor? I would prefer it to be in California or on the west coast. Please provide your comments. Hello Ben: We offer PHP/MySQL training c

RE: [PHP] Fw: Fatal error: Call to undefined function: allerrors() in............

2002-12-19 Thread John W. Holmes
Try defining the function before you call it. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: Beauford.2002 [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 19, 2002 10:07 PM >

[PHP] Code still showing up :(

2002-12-19 Thread Lic. Rodolfo Gonzalez Gonzalez
Hi, I'm still having the same problem, the PHP code is sometimes not interpreted, but passed as text/plain to the browser. The MIME type is configured correctly, and once (in the master httpd.conf). I even recompiled Apache. The system: RedHat 6.2 (ancient, I know) with Apache 1.3.27 and PHP 4.2.3

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Beauford.2002
>From the manual at www.php.net. This is a lot more sophiticated than mine and apparantly works. So as a recent user of PHP, I'm at a loss as to what is and what isn't. Using switch would be more efficiant as it would stop once a match is made (if you use break), but with eleif statements each on

[PHP] Fw: Fatal error: Call to undefined function: allerrors() in............

2002-12-19 Thread Beauford.2002
At the beginning of my page I have some code which calls a function I have created, at the bottom of the page is the function, but I keep getting the error Fatal error: Call to undefined function: gotofunction() in .. no matter what I do. Any info on what's happening is appreciated. examp

RE: [PHP] Another problem with conditional statements

2002-12-19 Thread Sean Malloy
Nowhere in the documentation does it specify switch should be used in the context you are attempting. The docs show a single variable and checking the case of that variable. I'm not going to berate you on syntax. If you can get it working like that then good for you. However, I would strongly adv

RE: [PHP] Problem with sessions.

2002-12-19 Thread Philip Olson
For the record, variables are case sensitive so it's $_SESSION not $_session. And if you're going to use $_SESSION (which you should), do not use session_register(). Regards, Philip On Thu, 19 Dec 2002, Mike Hillyer wrote: > I have recieved a private response, it appears my system had > regis

RE: [PHP] Training Courses in PHP & MySQL

2002-12-19 Thread Andrew Wilson
TTT for the same info for sydney. Thanks -Original Message- From: Ben C. [mailto:[EMAIL PROTECTED]] Sent: Friday, December 20, 2002 12:31 PM To: [EMAIL PROTECTED] Subject: [PHP] Training Courses in PHP & MySQL Does anyone know where I can get a good training course in both PHP and MySQL

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Beauford.2002
I believe you are incorrect. Switch will look for the first case statement that is true and execute that statement. The following works - case one is incorrect so it doesn't get executed but the second case does. Paste this into a test.php file and you will see it works.. Read the manual. $a=2; $b

[PHP] Training Courses in PHP & MySQL

2002-12-19 Thread Ben C .
Does anyone know where I can get a good training course in both PHP and MySQL that would make me proficient? Or does anyone know of a good tutor? I would prefer it to be in California or on the west coast. Please provide your comments. -- PHP General Mailing List (http://www.php.net/) To un

[PHP] Insert Record Behavior (PHP-Dreamweaver MX)

2002-12-19 Thread Edson Waite
Does anoyone use this? I am trying to insert data from a form to a MySQL table. I am new to PHP and Dreamweaver, I am trying to get a tutorial to work. below is the code. Thanks in advance, Ed Waite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

[PHP] Win32 php : MS Access support (odbc support)

2002-12-19 Thread Robert Mena
Hi, I will have to retrieve data stored in a MDB (MS Access) "database". Since this MDB file be hosted in a Windows machine I'd like to have a CGI version of PHP with ODBC support so I can retrieve the data locally and send to a remote mysql database automatically. Since I've never used the CGI

Re: [PHP] Random include???

2002-12-19 Thread Justin French
Hi, untested code adapted from a random image thing I have... this works by checking the files in a directory and picking one at random. The other option is to keep all your include file paths in an array: The difference between the two options is *obviously* a few more lines of cod

RE: [PHP] Problem with sessions.

2002-12-19 Thread Mike Hillyer
I have recieved a private response, it appears my system had register_globals off and the other server would have had it turned on. The proper usage was actually $_session["name"] and I shall be using that. This was my first use of the PHP mailing list and I am very impressed and pleased with all

Re: [PHP] Another problem with conditional statements

2002-12-19 Thread Rick Emery
switch() does not work that way. Switch uses the value in the parentheses and selects a CASE based upon that value. Read the manual. You will have to use a series of if()-elseif()-else() - Original Message - From: "Beauford.2002" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]>

[PHP] php-general-unsubscribe@lists.php.net

2002-12-19 Thread Kris
- Original Message - From: "Quentin Bennett" <[EMAIL PROTECTED]> To: "PHP GENERAL LIST" <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 10:23 AM Subject: RE: [PHP] Problem with sessions. Hi, Is your 'other server' identical (Web Server, PHP Version, register_globals setting)? Quent

RE: [PHP] Another problem with conditional statements

2002-12-19 Thread Sean Malloy
Its all wrong. You shouldn't be using a switch statement anyway. A switch is for evaluating a single variable. alss, your code if ($a && $b == 124) is the equivelent of writing if ($a == true && $b == 124). if ($a == $b) { // do struff } elseif ( ($a == 124) && ($b == 124) ) { //do stuff } elsei

RE: [PHP] Problem with sessions.

2002-12-19 Thread Quentin Bennett
Hi, Is your 'other server' identical (Web Server, PHP Version, register_globals setting)? Quentin -Original Message- From: Mike Hillyer [mailto:[EMAIL PROTECTED]] Sent: Friday, 20 December 2002 12:43 p.m. To: PHP GENERAL LIST Subject: [PHP] Problem with sessions. Hello All; Please for

[PHP] Another problem with conditional statements

2002-12-19 Thread Beauford.2002
Hi, This should be as simple as breathing, but not today. I have two variables $a and $b which I need to compare in a switch statement in several different ways, but no matter what I do it's wrong. This is what I have tried, can someone tell me how it should be. TIA switch (true): case ($a

RE: [PHP] creating random strings?

2002-12-19 Thread Sean Malloy
My comment would be on the readability and portability of the code Think of someone else coming along to look at that! ;) This is what I would do; create one function, GenerateString(int $length, int $type) function GenerateString($length = 6, $type = 1) { $string = ''; // seed rand funct

[PHP] Problem with sessions.

2002-12-19 Thread Mike Hillyer
Hello All; Please forgive me if I am repeating an often asked question, but I am having a problem with sessions. I simply cannot get them to work. The sample code I provide works on another server perfectly, this is the first page: Session variables set!"; echo "go to next page"; ?> When call

[PHP] creating random strings?

2002-12-19 Thread Paul Chvostek
I need to create batches of randomly generated usernames and passwords. To start off, I have: $validuchars='abcdefghijkmnopqrstuvwxyz'; $validpchars='abcdefghijkmnopqrstuvwxyz23456789'; $lenu=strlen($validuchars)-1; $lenp=strlen($validpchars)-1; The first method I came up with was: $uid=''

[PHP] Some discoveries I've made. Anyone care to confirm/deny

2002-12-19 Thread Sean Malloy
Three different topics, perhaps suited to three seperate emails, but I'll cover them all in one. Firstly, something regarding accessing form/query string variables, on diffferent versions of PHP. Starts to become a nightmare, but you also want to make sure you _aren't_ requiring register_globals t

Re: [PHP] Question about the exit() command

2002-12-19 Thread Mike Joseph
No, for that use a if statement if($fname == "Select") { $errormessage = $error; include( "other.html" ); exit; } else { //code } A switch works like this switch($var) { case 1: //if $var==1 $thisvar = $something; break; case 2: //if $var==2 $thisvar = $something2; break; } ~M

Re: [PHP] Question about the exit() command

2002-12-19 Thread Rick Emery
What do you mean "return to the calling page"? The exit() command simply ceases processing of PHP and HTML. I believe what you're saying is that if the user clicks on a PHP hyperlink on the first page, then goes to another page. If there is something "wrong" there, you nwant to return to the pag

Re: [PHP] Question about the exit() command

2002-12-19 Thread Beauford.2002
Just to make sure I have this right. I have a switch() statement like below. If the case statement is true it should include the page indicated and exit the PHP script without displaying the echo or executing any other code. If the case is false the script should continue as normal. TIA. switch (

Re: [PHP] Question about the exit() command

2002-12-19 Thread Gerald Timothy Quimpo
On Thursday 19 December 2002 04:45 pm, Beauford.2002 wrote: > I want to be able to exit out of a PHP webpage and > return to the calling page if certain conditions are not met. > It appears using exit() will do this, but I am unclear exactly how to use > it. exit won't do what you want. exit d

Re: [PHP] Question about the exit() command

2002-12-19 Thread Philip Olson
How about: if (!$conn = mysql_connect($host, $user, $pass)) { include 'static_html.inc'; exit; } print "Welcome, yes the database is connected"; exit ends the script, nothing after its use is executed. Regards, Philip Olson On Thu, 19 Dec 2002, Beauford.2002 wrote: > Hi,

[PHP] Question about the exit() command

2002-12-19 Thread Beauford.2002
Hi, Could someone clarify this for me. I want to be able to exit out of a PHP webpage and return to the calling page if certain conditions are not met. It appears using exit() will do this, but I am unclear exactly how to use it. any info is appreciated. TIA -- PHP General Mailing List (htt

[PHP] odbc

2002-12-19 Thread Edward Peloke
Ok, I am lost now, I am just trying to read the documentation on odbc...here is what I have so far. This seems to work...or at least not give any errors. How do I know get to the result set in the select statement to move this data somewhere else? I just want to get the entire result set so I can

[PHP] Re: One php returning several htmls

2002-12-19 Thread Jeff
Go to page 1 "John Hinton" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'll go into index.php and return a portion of the html code, upon > clicking a link, I'll return another portion of the html code. > > My question is what seems to be the best/cleanest/f

RE: [PHP] Sound with PHP

2002-12-19 Thread James E Hicks III
The only way this would work with PHP on the webserver would be to the sound file in the webpage or some other to do it. I even think there is a way to queue files like you are asking about, but this would be an HTML thing and not PHP. James -Original Message- From: Alfonso Ballestero

Re: [PHP] Sound with PHP

2002-12-19 Thread Andrew Brampton
If you are trying to play the sounds on the client's PC, then you can't do this with PHP PHP is a server side language, so if you tried playing soudns with it, it would only be heard by the people standing next to your server :).. You might want to take a look at some HTML or JScript, or Flash, o

RE: [PHP] delete() and unlink()

2002-12-19 Thread @ Nilaab
Thanks Jason, That makes much more sense now. I forgot about recursive functions, as I don't use them often. I should look into it further. It seems to be very helpful in some cases. Thanks again for your help. - Nilaab > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED]] >

[PHP] Sound with PHP

2002-12-19 Thread Alfonso Ballesteros
Hello... I'm a newcomer and wish to know if it is possible to play sound files (mp3 or wav) using PHP. For example, if I have 2 sound files, how to play one after the other. Thanks Alfonso -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] speet testing (was URL parsing)

2002-12-19 Thread Sean Burlington
1LT John W. Holmes wrote: I wonder if you could pass on some pointers for speed testing. thanks Nothing fancy. Just using the getmicrotime() function defined on the microtime() manual page to get the time before the bit I'm testing and after and subtract to get the difference. www.php.net/mi

Re: [PHP] case statement?

2002-12-19 Thread Mark Charette
On Thu, 19 Dec 2002, Max Clark wrote: > Hi- > > I was wondering if php had a case function? > > Instead of building a large if/elseif/else block I would like to do a case > $page in (list). The documentation and search capabilities at http://www.php.net are your frientd. It would behhove you

Re: [PHP] case statement?

2002-12-19 Thread Manuel Ochoa
Yes, It's called "SWITCH" Just go to www.php.net and lookup "switch" in the function list Max Clark <[EMAIL PROTECTED]> wrote:Hi- I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). Thanks in advance, Max

RE: [PHP] Regex Help

2002-12-19 Thread John W. Holmes
There may be better ways, but this little example works. You basically match everything around the tag and run a replace on what's outside of it, and then put it all back together. This example should run as is. Adapt to your needs. test and this test is good This test on line 2thing foo test on

Re: [PHP] Regex Help

2002-12-19 Thread Rick Emery
gawd, Jim, you are s oicky test test"; ereg("(.*)()(.*)",$q,$ar); $w1 = ereg_replace("test","anotherword",$ar[1]); $w2 = ereg_replace("test","anotherword",$ar[3]); $t = $w1.$ar[2].$w2; print $t; ?> outputs: anotherword, something test anotherword - Original Message - From: "Jim" <

Re: [PHP] Regex Help

2002-12-19 Thread Jim
Whoops, sorry post aborted prematurely. What I was going say say was that: test, something test test! should become: anotherword, something test anotherword! Thanks again for helping! - Original Message - From: "Jim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, Decemb

RE: [PHP] Re: offline application

2002-12-19 Thread Edward Peloke
using php, can I extract data from an access file? -Original Message- From: Philippe Saladin [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:16 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: offline application > Would it be possible to use something like this to create

Re: [PHP] Regex Help

2002-12-19 Thread Jim
Thanks for helping. Unfortunately, that doesn't quite accomplish the task either. The other example for my first post would be mangled with that. - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Jim" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002

RE: [PHP] case statement?

2002-12-19 Thread Ford, Mike [LSS]
> -Original Message- > From: Max Clark [mailto:[EMAIL PROTECTED]] > Sent: 19 December 2002 18:19 > > I was wondering if php had a case function? > > Instead of building a large if/elseif/else block I would like > to do a case > $page in (list). http://www.php.net/control-structures.swit

Re: [PHP] case statement?

2002-12-19 Thread Chris Wesley
On Thu, 19 Dec 2002, Max Clark wrote: > I was wondering if php had a case function? > > Instead of building a large if/elseif/else block I would like to do a > case $page in (list). switch function ... http://www.php.net/manual/en/control-structures.switch.php ~Chris -- PHP General M

Fw: [PHP] case statement?

2002-12-19 Thread Rick Emery
switch() { case a: case b: case c: default: } RTFM - Original Message - From: "Max Clark" <[EMAIL PROTECTED]> To: <> Sent: Thursday, December 19, 2002 12:19 PM Subject: [PHP] case statement? Hi- I was wondering if php had a case function? Instead of building a large if/elseif/

[PHP] case statement?

2002-12-19 Thread Max Clark
Hi- I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date part

2002-12-19 Thread Rick Emery
Following on to the L T: $ar = explode("/",$thestring); thenL $ar[0] = 06 $ar[1] = 07 $ar[2] = 200 - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Diana Castillo'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 11:56 AM Subject: RE: [PHP]

Re: [PHP] Regex Help

2002-12-19 Thread Rick Emery
test test"; ereg("(.*)()(.*)",$q,$ar); $t = "anotherword".$ar[2]."anotherword"; print $t; ?> outputs: anotherwordtestanotherword - Original Message - From: "Jim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 11:55 AM Subject: Re: [PHP] Regex Help I'm sor

RE: [PHP] validate date

2002-12-19 Thread John W. Holmes
> If a user inputs a date into a form, what function can I use to validate > that he put in a valid date? > I want to use checkdate but that needs the date split up into day, month > year. > Anyone have an easy way of doing this? You have to specify a date format to your users, or at least assume

RE: [PHP] date part

2002-12-19 Thread John W. Holmes
> How can I get a string containing the month part of a date the user types > in? > e.g. if they type in "06/07/200" I want to get "06" If you know that's the format they're going to use, the you can just use substr() to grab the first two characters. ---John W. Holmes... PHP Architect - A month

RE: [PHP] Looping needs to re-open parm file

2002-12-19 Thread John W. Holmes
> I'm reading a paramter file and a text file. > Per line of the text file I want to check if there is a word in there from > the parameter file. > However I need to open and read the parameter file for each line in the > text > file. How can I change this? Can't you read the param file first into

Re: [PHP] Regex Help

2002-12-19 Thread Jim
I'm sorry, I accidentally left the slashes on my second example. My original message should read: Could someone show me how to use preg_replace to change this: test test test into: anotherword test anotherword Note that what I want to accomplish is to change 'test' into 'anotherword' only if i

Re: [PHP] Regex Help

2002-12-19 Thread Rick Emery
addslashes() - Original Message - From: "Jim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 11:26 AM Subject: [PHP] Regex Help Could someone show me how to use preg_replace to change this: test test test into: anotherword test anotherword basically, I

[PHP] Creating access DB in PHP ..

2002-12-19 Thread Chad Day
Not sure if this is possible, and I haven't turned up what I'm looking for in my searches yet.. I am running PHP on a FreeBSD box .. I need to create an Access database, fill it in with some data, and have a client download it (as the software the client is using only imports mdb files). Is this

RE: [PHP] Re: offline application

2002-12-19 Thread Edward Peloke
This is pretty much what I want with as little work to the user as possible. -Original Message- From: Philippe Saladin [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 12:16 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: offline application > Would it be possible to use som

[PHP] Regex Help

2002-12-19 Thread Jim
Could someone show me how to use preg_replace to change this: test test test into: anotherword test anotherword basically, I want to change a value only if it is not in an option tag. I also want to account for situations like : test, something test test! My thoughts were to do the repla

Re: [PHP] validate date

2002-12-19 Thread Manuel Ochoa
Here is a funtion that I use. A user can enter a date in any of the following ways: 01 01 03 01-01-03 1-1-03 01-1-2003 1-01/03 1/1 03 you get the idea... This function will standardize the date and make sure it's valid. If invalid it returns "ERROR" function fixdate($data){ $aux[0]=""; $aux[1]

Re: [PHP] Re: offline application

2002-12-19 Thread Philippe Saladin
> Would it be possible to use something like this to create a page that the > user can open up on their machine that would transfer data from an access > file on their machine to a mysql db on my server? If I understand well, you want to transfer data from Access to MySql ? 1) Could we imagine a

[PHP] One php returning several htmls

2002-12-19 Thread John Hinton
I'll go into index.php and return a portion of the html code, upon clicking a link, I'll return another portion of the html code. My question is what seems to be the best/cleanest/fastest method for doing this? I've done this with forms and the PHP_SELF action method... Wondering about simple lin

[PHP] Re: Image resizing

2002-12-19 Thread Bogdan Stancescu
What platform are you running PHP on? Shaun wrote: Hi, My webserver doesn't have the GD library installed, please can someone tell me how I can resize uploaded images for thumbnails? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] Getting the username

2002-12-19 Thread 1LT John W. Holmes
> I'm developing an Intranet at my company and was wondering if there is any way to get the username from someone who is already logged into a Windows network? I think $_SERVER['LOGON_USER'] or maybe $_ENV['LOGON_USER'] or something similar. I think you have to use NT permissions on the directory

[PHP] Getting the username

2002-12-19 Thread Manuel Ochoa
I'm developing an Intranet at my company and was wondering if there is any way to get the username from someone who is already logged into a Windows network?

RE: [PHP] Re: offline application

2002-12-19 Thread Edward Peloke
Would it be possible to use something like this to create a page that the user can open up on their machine that would transfer data from an access file on their machine to a mysql db on my server? Thanks, Edie -Original Message- From: Philippe Saladin [mailto:[EMAIL PROTECTED]] Sent: Thu

[PHP] Re: offline application

2002-12-19 Thread Philippe Saladin
> I have a database. And now I need to create something like offline > site with that database: ii means php pages, html and images. After > this I will burn all it to CD. And that CD should be working om every > machine (I suppose win32 as OS and php will be installed if needed). You would have a

[PHP] Error installing

2002-12-19 Thread Mako Shark
Anybody have any bright ideas? Trying to install my own PHP on my own server. I'm getting the error "Redirection limit for this URL exceeded. Unable to load the requested page." I'm using Apache 2 and php 4.2.3 and haven't loaded any extensions in PHP (yet). _

Re: [PHP] display all results

2002-12-19 Thread Jason Wong
On Thursday 19 December 2002 23:11, Simon wrote: > Hi, > > I have 6 records in mysql. How can i display all of them, but not using > while. Do i have to use 6 queries. Results need to be hard formated, so > that s the reason why i cant use while. Not really sure what you need here but I guess you

[PHP] offline application

2002-12-19 Thread Alexander Kuznetsov
Hi All! I have a database. And now I need to create something like offline site with that database: ii means php pages, html and images. After this I will burn all it to CD. And that CD should be working om every machine (I suppose win32 as OS and php will be installed if needed). Question: can I

[PHP] display all results

2002-12-19 Thread Simon
Hi, I have 6 records in mysql. How can i display all of them, but not using while. Do i have to use 6 queries. Results need to be hard formated, so that s the reason why i cant use while. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

RE: [PHP] validate date

2002-12-19 Thread Jon Haworth
Hi Diana, > If a user inputs a date into a form, what function can I > use to validate that he put in a valid date? You can't. Here are two dates in two different formats. Only one is valid. - 13/04/01 - 13/04/01 Can you spot which is which? > I want to use checkdate but that needs the da

RE: [PHP] date part

2002-12-19 Thread Adam Voigt
I do the same thing all the time, when you respond on mailing lists it's hard to keep track. =) On Thu, 2002-12-19 at 10:22, Edward Peloke wrote: Sorry ADAM, didn't mean to call you Allan, I apologize! -Original Message- From: Edward Peloke [mail

[PHP] validate date

2002-12-19 Thread Diana Castillo
If a user inputs a date into a form, what function can I use to validate that he put in a valid date? I want to use checkdate but that needs the date split up into day, month year. Anyone have an easy way of doing this? Thanks, Diana -- PHP General Mailing List (http://www.php.net/) To unsubsc

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
Sorry ADAM, didn't mean to call you Allan, I apologize! -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 10:11 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] date part Thanks Allan! That is good to know. It is just a script that I downloa

RE: [PHP] Random include???

2002-12-19 Thread Edward Peloke
Won't this work? $random=rand(1,5); print ""; include("folio_$random.php"); -Original Message- From: Benjamin Trépanier [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: [PHP] Random include??? Hi, I'm a newbie in php so sorry

[PHP] Random include???

2002-12-19 Thread Benjamin Trépanier
Hi, I'm a newbie in php so sorry for that question! I have a table in a html dcc and I want toinclude a file in a cell, but that file must be random so people load a different page each time they refresh... The basic syntax I use for the include is below now, I want to know how to generate the

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
Thanks Allan! That is good to know. It is just a script that I downloaded from the internet. Not sure how to make it work better for linux but I will look into it. I appreciate the info! Eddie -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED]] Sent: Thursday, Decemb

RE: [PHP] date part

2002-12-19 Thread Adam Voigt
I just tried that script, for me under Linux with Mozilla and Netscape, I had to try 5 times before I could move the mouse from the button to the menu fast enough, every other time it would just disappear when I tried to move the mouse from the button to it. On Thu, 2002-12-19 at 09:59, Edwa

[PHP] Re: Inserting tab delimited textfiles into mysql

2002-12-19 Thread David Eisenhart
I recommend that you check out phpMyAdmin http://www.phpmyadmin.net/ David "Thomas Goeminne" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I got a tab delimited file which looks like this: > > let us call it items.txt > > TypeCatalog NumberItem Desc

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
I used a javascript I found online in my php page. Click on the boxes next to the date fields: http://www.aircharterunited.com/pages/submit_bid.php This way, I know the format of the date when it is entered and I can pull out any part needed. Eddie -Original Message- From: Diana Castill

[PHP] Image resizing

2002-12-19 Thread shaun
Hi, My webserver doesn't have the GD library installed, please can someone tell me how I can resize uploaded images for thumbnails? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] date part[Scanned]

2002-12-19 Thread Michael Egan
You could use the explode function to break the string down into its different elements with '/' as the delimiter. Problem is if you're allowing users to input the date into a text box you can't be sure how they'll enter the data. The better option is probably to constrain what they can enter

  1   2   >