RE: [PHP] Struggling with code

2002-12-04 Thread Ben C.
I am now getting the following error: Warning: Supplied argument is not a valid MySQL-Link resource in /home/httpd/vhosts/localhost/httpdocs/data/up.php on line 21 Why do you think that is? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002

RE: Re[2]: [PHP] Max File Size

2002-12-04 Thread Roger Lewis
Hi, Thursday, December 5, 2002, 5:11:16 PM, you wrote: RL> Jason Wong responded Wednesday, December 04, 2002 10:24 PM RL> < On Thursday 05 December 2002 10:14, Roger Lewis wrote: RL> < > Thanks for the suggestion. I'll try ini_set although I'm not yet RL> certain RL> < > of how to use it. RL>

Re[2]: [PHP] Max File Size

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 5:11:16 PM, you wrote: RL> Jason Wong responded Wednesday, December 04, 2002 10:24 PM RL> < On Thursday 05 December 2002 10:14, Roger Lewis wrote: RL> < > Thanks for the suggestion. I'll try ini_set although I'm not yet RL> certain RL> < > of how to use it. RL> <

RE: [PHP] Max File Size

2002-12-04 Thread Roger Lewis
Jason Wong responded Wednesday, December 04, 2002 10:24 PM < On Thursday 05 December 2002 10:14, Roger Lewis wrote: < > Thanks for the suggestion. I'll try ini_set although I'm not yet certain < > of how to use it. < As has already been pointed out, the uploads take place *before* your script <

Re: [PHP] Struggling with code

2002-12-04 Thread Richard Baskett
Get rid of the double quotes around your variables so: $sql = "UPDATE $table_name SET name='$name', lname='$lname', mobil='$mobil' etc etc etc Cheers! Rick "Sir my concern is not whether God is on our side. My great concern is to be on God's side." - Abraham Lincoln > On Thursday 05 December 2

[PHP] How to create user in mySQL ?

2002-12-04 Thread Manisha
I want to create mySQL user thr phpMyAdmin. I inserted one record in mysql.user table and one in mysql.db table, testing with following program $conn = @mysql_connect ("localhost:/usr/home/nets/mysql/mysql-demo.sock", "manisha", "pass"); echo("before conn a"); if ($conn){ mysql_select_db

Re: [PHP] Struggling with code

2002-12-04 Thread Hugh Danaher
try $sql = "UPDATE $table_name SET name = '".addslashes($name)."', lname = '".addslashes($lname)."', mobil = '".addslashes($mobil)."', email = '".addslashes($email)."', url = '".addslashes($url)."', WHERE id= $id "; // mysql needs single quote marks ( ' ) around input values that are not numbers

Re: [PHP] Max File Size

2002-12-04 Thread Jason Wong
On Thursday 05 December 2002 10:14, Roger Lewis wrote: > Thanks for the suggestion. I'll try ini_set although I'm not yet certain > of how to use it. As has already been pointed out, the uploads take place *before* your script is run. The manual has table which shows what you can and cannot chan

Re: [PHP] Struggling with code

2002-12-04 Thread Jason Wong
On Thursday 05 December 2002 13:24, Ben C. wrote: > I am struggling with the code below. I keep getting the error "Couldn't > execute query". Please help me out, let me know where I am going wrong. > > > $db_name = "db1"; > $table_name = "user"; > > $connection = @mysql_connect("localhost", "use

Re: [PHP] Struggling with code

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 3:24:15 PM, you wrote: BC> I am struggling with the code below. I keep getting the error "Couldn't BC> execute query". Please help me out, let me know where I am going wrong. BC> $db_name = "db1"; BC> $table_name = "user"; BC> $connection = @mysql_connect("loca

Re[2]: [PHP] Max File Size

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 3:09:46 PM, you wrote: RL> Tom Rogers responded on Wednesday, December 04, 2002 6:11 PM RL> Hi, RL> Thursday, December 5, 2002, 11:54:08 AM, you wrote: RL>> Tom, RL>> Thanks for your response. If this is so, can you tell me how I check it RL> out RL>> and fix

[PHP] Struggling with code

2002-12-04 Thread Ben C.
I am struggling with the code below. I keep getting the error "Couldn't execute query". Please help me out, let me know where I am going wrong. -- The content of this email message and any attachments are confidential and

RE: [PHP] passing sessions via POST

2002-12-04 Thread Peter Houchin
> -Original Message- > From: Myrage [mailto:[EMAIL PROTECTED]] > Sent: Thursday, 5 December 2002 3:55 PM > To: [EMAIL PROTECTED] > Subject: [PHP] passing sessions via POST > > > How do we pass sessions via post ?? I seem to lose the session once it has > been submitted through the POST Me

RE: [PHP] Max File Size

2002-12-04 Thread Roger Lewis
Tom Rogers responded on Wednesday, December 04, 2002 6:11 PM Hi, Thursday, December 5, 2002, 11:54:08 AM, you wrote: RL> Tom, RL> Thanks for your response. If this is so, can you tell me how I check it out RL> and fix things. RL> Roger TR> Unless you have set it yourself that is probably

[PHP] passing sessions via POST

2002-12-04 Thread Myrage
How do we pass sessions via post ?? I seem to lose the session once it has been submitted through the POST Method. Any help?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] fopen() problems :-(

2002-12-04 Thread Hellkeeper
hi all :)) i have a problem with fopen() 1) i open the connection to the server $fp = fsockopen ("www.testserver.at", 80, &$errno, &$errstr, 30); 2) i make the fputs() fputs ($fp, 'GET /cgi-bin/portal/frameset.jsp HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/

Re: [PHP] Advice with encrypting+storing sensitive data

2002-12-04 Thread bahwi
That's a big question. The most secure way, using either mcrypt or PGP, is to have an application on the client's side that does the encryption and the decryptiong. This is probably the best solution. Heavily encrypt things on both sides, and this assumes the client side is secure. Barring thi

[PHP] Advice with encrypting+storing sensitive data

2002-12-04 Thread Robert Mena
Hi, I need to develop an application where the protection of the data (to be stored on a database) should be very important (perhaps the principal requirement). THe goal is to have the data stored in a way that even the admin or anyone that hacks the web and/or database server could not (or easil

Re: [PHP] formating numbers & date

2002-12-04 Thread Jeff Bluemel
worked great... the other method may be a little quicker, but this code is easier for me to understand, and although it is used in a loop there really is no visible difference in how quickly it displays. thanks, Jeff "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[E

RE: [PHP] Max File Size

2002-12-04 Thread Roger Lewis
Thanks for the suggestion. I'll try ini_set although I'm not yet certain of how to use it. It still seems odd that I can't simply set upload_max_filesize to whatever value I want. I checked again and post_max_size is not in my php.ini, but perhaps I should just add it. Also, I was wrong before -

Re[4]: [PHP] Max File Size

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 11:54:08 AM, you wrote: RL> Tom, RL> Thanks for your response. If this is so, can you tell me how I check it out RL> and fix things. RL> Roger Unless you have set it yourself that is probably not the reason. Try setting it like this upload_max_filesize = 8M

Re: [PHP] formating numbers & date

2002-12-04 Thread Justin French
on 05/12/02 12:47 PM, Rick Widmer ([EMAIL PROTECTED]) wrote: > Yes, it is simpler to code, but it also takes almost twice as long to run. > > 1000 iterations with strtotime: 0.2296 seconds > 1000 iterations with substr:0.1308 seconds > > Doesn't matter much if you only do it once, but it can

RE: [PHP] Looping Addition

2002-12-04 Thread John W. Holmes
> Let me explain this as best I can. The user enters how many numbers he > wants > to add. This form goes to another page. This page loops a form field and > it's name is "num" and after num is the number it is currently on. Here's > the code: > > > > How many numbers to add: >

Re: [PHP] Looping Addition

2002-12-04 Thread Stephen
Thank you! This is actually what I was wanting to do all along but I'm rather noobish when it comes to arrays. I can get by with them on MySQL and anything else, I suck at. Thanks again! - Original Message - From: "Chris Wesley" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Cc: "

RE: Re[2]: [PHP] Max File Size

2002-12-04 Thread Roger Lewis
Hi, Thursday, December 5, 2002, 11:00:14 AM, you wrote: RL> On Wednesday, December 04, 2002 3:03 PM, I wrote RL> Hi, RL> Further to my original post, to check if my php.ini was being recognized I RL> temporarily changed some other configuration options, i.e. register_globals RL> and include_pa

RE: [PHP] Max File Size

2002-12-04 Thread Roger Lewis
>From phpinfo.php I see that post_max_size is 8M; however, I don't find a setting for this in php.ini. Although I can live with 8M, can you tell me how to change this setting. I am using php 4.0.6 Also I understand that memory_limit may be affecting things, but I don't seem to have access to thi

Re: [PHP] formating numbers & date

2002-12-04 Thread Rick Widmer
At 11:51 AM 12/5/02 +1100, Justin French wrote: on 05/12/02 11:37 AM, Rick Widmer ([EMAIL PROTECTED]) wrote: > $Hour = substr( $Date, 11, 2 ); > if( $Hour ) > 12 { > $Hour = $Hour - 12; > $AMPM = 'PM'; > } > > else { > $AMPM = 'AM'; > } > > echo substr( $Date, 5, 2 ), '/', substr( $Date, 8, 2 ),

Re: [PHP] Looping Addition

2002-12-04 Thread Chris Wesley
On Wed, 4 Dec 2002, Stephen wrote: > This is only a snippet, there is more to it but for simplicities sake... > Then I calculate it. My question is, how would I loop the adding? I hope you > understand this now... Ah!, I think I understand better now. You want to add num1, num2, num3, ... numN, w

Re: [PHP] Looping Addition

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 7:26:57 AM, you wrote: S> Sorry for the uncontrolable emaling to the list but I'm in rather a stump. S> You may be hearing a lot from me over the next few days too. S> Anyway, I mentioned before my form with the addition that loops to the S> number of numbers the u

Re: [PHP] Get-type links won't complete querystring values

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 8:16:06 AM, you wrote: AB> Hi everyone. AB> I have certain links for document navigation with a query string where one of the values doesn't fill, so the links don't work. AB> The document is a law navigated with pieces of text taken from an array, where the key

Re: [PHP] formating numbers & date

2002-12-04 Thread Jeff Bluemel
thanks... I will play with this, and let ya know if I have a problem... looks easy enough. Jeff "Justin French" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > on 05/12/02 11:15 AM, Justin French ([EMAIL PROTECTED]) wrote: > > > Hi, > > > > > $date = '2002-12

Re[2]: [PHP] Max File Size

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 11:00:14 AM, you wrote: RL> On Wednesday, December 04, 2002 3:03 PM, I wrote RL> Hi, RL> Further to my original post, to check if my php.ini was being recognized I RL> temporarily changed some other configuration options, i.e. register_globals RL> and include_path

RE: [PHP] Max File Size

2002-12-04 Thread Roger Lewis
On Wednesday, December 04, 2002 3:03 PM, I wrote Hi, I'm having a problem uploading files greater than 2mb, but I believe the problem is related to php.ini. UPLOAD_MAX_FILESIZE in my submit form is set to 1000. Also, I set upload_max_filesize = 1000 in php.ini. After changing php.ini,

Re: [PHP] Looping Addition

2002-12-04 Thread Stephen
Let me explain this as best I can. The user enters how many numbers he wants to add. This form goes to another page. This page loops a form field and it's name is "num" and after num is the number it is currently on. Here's the code: How many numbers to add:

Re: [PHP] fopen over a network

2002-12-04 Thread Dara Dowd
Thanks for the advice lads but I realise I should have been clearer. I know about header(etc..) so displaying the download dialog isn't the problem, it's how to get to the file on the file server and then open it. The file server isn't a web server. This is probably ridiculously easy so I hope

Re: [PHP] formating numbers & date

2002-12-04 Thread Justin French
on 05/12/02 11:37 AM, Rick Widmer ([EMAIL PROTECTED]) wrote: > $Hour = substr( $Date, 11, 2 ); > if( $Hour ) > 12 { > $Hour = $Hour - 12; > $AMPM = 'PM'; > } > > else { > $AMPM = 'AM'; > } > > echo substr( $Date, 5, 2 ), '/', substr( $Date, 8, 2 ), '/', > substr( $Date, 0, 4 ), ' ', $Hour, subst

Re: [PHP] formating numbers & date

2002-12-04 Thread Justin French
on 05/12/02 11:15 AM, Justin French ([EMAIL PROTECTED]) wrote: > Hi, > > $date = '2002-12-04 23:21:49'; > $newdate = date('m/d/Y', strtotime($date)); > echo $newdate; > ?> Whooops, forgot the time bit! Should be echo's 12/4/2002 11:21:49 pm also fixed the leading zero's problem :) Justin

Re: [PHP] Looping Addition

2002-12-04 Thread Chris Wesley
On Wed, 4 Dec 2002, Stephen wrote: > I already have that. $_POST['vars'] is a number and I already check that you > on a page before. All I need to know is how to keep adding numbers until > there are no more to add... If you mean that $_POST['vars'] is an array of numbers: $total = 0; foreach(

Re: [PHP] formating numbers & date

2002-12-04 Thread Rick Widmer
At 04:58 PM 12/4/02 -0700, Jeff Bluemel wrote: I'm displaying a date that I get from a informix database query - the date format is as follows; 2002-12-04 23:21:49 I want it to display as 12/4/2002 11:21:49 PM $Hour = substr( $Date, 11, 2 ); if( $Hour ) > 12 { $Hour = $Hour - 12; $AMPM =

Re: [PHP] Looping Addition

2002-12-04 Thread Stephen
I already have that. $_POST['vars'] is a number and I already check that you on a page before. All I need to know is how to keep adding numbers until there are no more to add... - Original Message - From: "Ray Hunter" <[EMAIL PROTECTED]> To: "Stephen" <[EMAIL PROTECTED]> Cc: "PHP List" <[

Re: [PHP] Re: XSLT failing when DOCTYPE declaration present

2002-12-04 Thread Chris Wesley
On Wed, 4 Dec 2002, Dave wrote: Whoah ... was this reply sent several weeks ago when I sent the original message and I'm just getting it now, or was it sent just recently? > without seeing the specifics, and assuming that PHP is never wrong (in the 4 > years i've used it, it hasn't been!)... your

Re: [PHP] Re: querystring and PHP 4

2002-12-04 Thread Justin French
on 05/12/02 11:10 AM, Dave ([EMAIL PROTECTED]) wrote: > php.ini file, find a line called... > > register_globals = On > > > ... and make > > register_globals = Off > > that's it. It's worth pointing out that you'll be forced to write smarter, more secure scripts with register_globals = Off,

Re: [PHP] Problem with functions

2002-12-04 Thread Victor Halla
Thanks !!! Victor "Tom Rogers" <[EMAIL PROTECTED]> escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > Thursday, December 5, 2002, 9:15:53 AM, you wrote: > VH> Hi, > > VH> I have de following code for example > > > VH> > VH> $username = "victor"; > > > VH> function test()

[PHP] Re: querystring and PHP 4

2002-12-04 Thread Dave
php.ini file, find a line called... register_globals = On ... and make register_globals = Off that's it. "Dan Wade" <[EMAIL PROTECTED]> wrote in message 002f01c29bf1$73ed4b70$[EMAIL PROTECTED]">news:002f01c29bf1$73ed4b70$[EMAIL PROTECTED]... > Hello, > > i'm grabbing querystring data like: >

Re: [PHP] querystring and PHP 4

2002-12-04 Thread bahwi
register_globals which turned the id= into $id is turned off in PHP 4. This is a good thing(security reasons). You need to use $_GET['id'] (or in PHP3, $HTTP_GET_VARS['id'], and this also works in PHP4). It takes a bit to get used to it, but it's a much better way to handle things, especially w

[PHP] Re: How to setcookie with two domains

2002-12-04 Thread Dave
only 2 sub-domains! "Phil Powell" <[EMAIL PROTECTED]> wrote in message 002601c273c6$025292c0$dcbe6444@scandinawa1bo6">news:002601c273c6$025292c0$dcbe6444@scandinawa1bo6... Is it possible, w/o using sessionid session variables, to use setcookie to set a cookie that will have two domains or more?

Re: [PHP] querystring and PHP 4

2002-12-04 Thread Justin French
1. use $_GET['id'] rather than $id OR 2. turn off register globals in php.ini, or at a per-directory level with a .htaccess file 3. you should have searched the archives first 4. this question gets asked almost daily Justin on 05/12/02 11:01 AM, Dan Wade ([EMAIL PROTECTED]) wrote: > Hello,

[PHP] Re: Why this open_basedir warning?

2002-12-04 Thread Dave
check your php.ini first, then maybe your http.conf file (for php.ini settings that are targetted at specific directories). otherwise, it could be a result of overburden on the server!? it could also be a permission issue... make sure to check that, i've had weird sh** happen when i ftp's or even S

Re: [PHP] formating numbers & date

2002-12-04 Thread Justin French
Hi, Should do the trick -- although I haven't stripped out the leading 0 in either the day or month, hence it will echo 12/04/2002, not 12/4/2002. Season to taste, Justin on 05/12/02 10:58 AM, Jeff Bluemel ([EMAIL PROTECTED]) wrote: > I'm displaying a date that I get from a informix datab

[PHP] Re: XSLT failing when DOCTYPE declaration present

2002-12-04 Thread Dave
without seeing the specifics, and assuming that PHP is never wrong (in the 4 years i've used it, it hasn't been!)... your xml doc doesn't conform to the DTD. if you think this isn't the case, well, double check. if you still feel it is an error, you may want to email a bug issue to the sablotron pe

[PHP] querystring and PHP 4

2002-12-04 Thread Dan Wade
Hello, i'm grabbing querystring data like: www.myserver.com/foo.php?id=bar It works like a champ on dev server using php 3 but the sys admin use PHP 4 on the production box and the querystring is no longer being passed. I can't imagine this changed from version to version. Is he missing someth

Re: [PHP] formating numbers & date

2002-12-04 Thread Jeff Bluemel
I'm displaying a date that I get from a informix database query - the date format is as follows; 2002-12-04 23:21:49 I want it to display as 12/4/2002 11:21:49 PM Jeff "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Wednesday 04 December 2002

Re: [PHP] Problem with functions

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 9:15:53 AM, you wrote: VH> Hi, VH> I have de following code for example VH> $username = "victor"; VH> function test() { VH> echo $username; VH> } ?>> VH> If I call the funcion test(), echo print nothing what's is going on ? VH> []´s VH> [EMAIL PRO

[PHP] Problem with functions

2002-12-04 Thread Victor Halla
Hi, I have de following code for example If I call the funcion test(), echo print nothing what's is going on ? []´s [EMAIL PROTECTED] __ Victor Halla ICQ#: 114575440 Current ICQ status: + More ways to contact me

RE: [PHP] Max File Size

2002-12-04 Thread Roger Lewis
Yep, Mine is in /etc/httpd/php.ini and that's what phpinfo gives me Roger -Original Message- From: Marco Tabini [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 3:19 PM To: Roger Lewis Cc: PHP-General Subject: Re: [PHP] Max File Size Are you sure you're looking at the right

Re: [PHP] request for help/advice (xml/php content management)

2002-12-04 Thread Justin French
Haven't you already posted this? J on 05/12/02 10:20 AM, Robert Samuel White ([EMAIL PROTECTED]) wrote: > > Hello, I am the creator of eNetwizard Content Management Server, an open > source content management system using the LAMP suite. I am getting > ready for its first major release and ha

Re: [PHP] PHP Sessions

2002-12-04 Thread Justin French
Oops I screwed up :) Justin on 05/12/02 1:28 AM, Marco Tabini ([EMAIL PROTECTED]) wrote: > Are you sure? I thought $_SESSION was a superglobal. > > > Marco > > On Wed, 2002-12-04 at 09:15, Justin French wrote: >> Good point -- are the included files functions, or other stuff?? >> >> fun

Re: [PHP] Creating dynamic names for images

2002-12-04 Thread Justin French
well, a) use a table in the DB with the primary key (id) as an auto-increment column. 1, 2, 3 etc. Use this ID as the name of the file 1.jpg, 2.gif, and perhaps store the filetype / extension as well, so that you know what filename to look for in the folder. b) something as simple as file_exists

Re: Tom: [PHP] magic quotes

2002-12-04 Thread Tom Rogers
Hi, Thursday, December 5, 2002, 7:11:20 AM, you wrote: JTJ> Tom, JTJ> Sorry for the delay. I have tried your code. JTJ> SELECT id,AU,ST,BT,AT FROM ccl_main WHERE MATCH JTJ> (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO) AGAINST ('"ready maria" ' IN BOOLEAN MODE) JTJ> ORDER BY id asc

[PHP] request for help/advice (xml/php content management)

2002-12-04 Thread Robert Samuel White
Hello, I am the creator of eNetwizard Content Management Server, an open source content management system using the LAMP suite. I am getting ready for its first major release and have come across some problems that I need to address first... I'm not really sure where to start this is such a *hug

Re: [PHP] Max File Size

2002-12-04 Thread Marco Tabini
Are you sure you're looking at the right php.ini? Try calling phpinfo() and check where PHP is looking for the ini file. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com!

[PHP] Max File Size

2002-12-04 Thread Roger Lewis
Hi, I'm having a problem uploading files greater than 2mb, but I believe the problem is related to php.ini. UPLOAD_MAX_FILESIZE in my submit form is set to 1000. Also, I set upload_max_filesize = 1000 in php.ini. After changing php.ini, I stopped and then started httpd. I thought this

Re: [PHP] Post Variables

2002-12-04 Thread bahwi
The problem is right here: for ($i=0; $i<=12; $i++) { echo $_POST['$i']; } Single quotes cause variables to not be interpolated. IE: $i = 5; echo $i; echo "$i"; echo '$i'; ?> this prints out: 55$i See? Change that line to echo $_POST[$i]; and it should work just fine. Regards, --Joseph

Re: [PHP] Post Variables

2002-12-04 Thread Chris Shiflett
--- Brad Bonkoski <[EMAIL PROTECTED]> wrote: > for ($i=0; $i<=12; $i++) > { > echo ""; > echo ""; > } You only want one tag. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Post Variables

2002-12-04 Thread Brad Bonkoski
Hello, I am trying to make a script that looks something like: for ($i=0; $i<=12; $i++) { echo ""; echo ""; } Then I am posting those to another page, and trying to get the data out for ($i=0; $i<=12; $i++) { echo $_POST['$i']; } And it doesn't work. Any thoughts on if something li

[PHP] Get-type links won't complete querystring values

2002-12-04 Thread Alberto Brea
Hi everyone. I have certain links for document navigation with a query string where one of the values doesn't fill, so the links don't work. The document is a law navigated with pieces of text taken from an array, where the key is a 12-digit string. The key's first three figures identify each l

Re: [PHP] Send PHP results in email

2002-12-04 Thread Jason Wong
On Thursday 05 December 2002 05:58, Malcolm Brownell wrote: > Hi, > > I have some database fields I want to select and email. > > I have lines like -- > > $result = mysql_query("SELECT * FROM adopt_main order by idform desc limit > 1"); while( $row = mysql_fetch_array ($result)) > echo "".

[PHP] Send PHP results in email

2002-12-04 Thread Malcolm Brownell
Hi, I have some database fields I want to select and email. I have lines like -- $result = mysql_query("SELECT * FROM adopt_main order by idform desc limit 1"); while( $row = mysql_fetch_array ($result)) echo "".$row["first"].","; There are quite a few of these paragraphs in

[PHP] Re: Detecing a Number

2002-12-04 Thread Kyle Gibson
I have a repeating function to add. The user enters the number of how many numbers they want to add, then it repeats a form field. What I want to do is detect to make sure that the value they enter is a number. If not, don't do the do while loop and if it is, then go ahead and do it. How can I do t

Re: [PHP] Looping Addition

2002-12-04 Thread Ray Hunter
What type is $_POST['vars']? I think that it is a string...you might have to convert it to an integer... if( is_numeric( $_POST['vars'] ) ) { $vars = (int)$_POST['vars']; } else { echo "Error: \$_POST['vars'] is not an integer."; } On Wed, 2002-12-04 at 14:26, Stephen wrote: > So

[PHP] Looping Addition

2002-12-04 Thread Stephen
Sorry for the uncontrolable emaling to the list but I'm in rather a stump. You may be hearing a lot from me over the next few days too. Anyway, I mentioned before my form with the addition that loops to the number of numbers the user wants to add. Now to the part of the actual addition, how could

Re: [PHP] Re: Ping on Win32

2002-12-04 Thread Christopher J. Crane
Oh man...it's always the simple things you over look...thank you. "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Thursday 05 December 2002 04:08, Christopher J. Crane wrote: > > This is the output I get and you can see that on the lines where the

Re: [PHP] Detecing a Number

2002-12-04 Thread Ray Hunter
If you are getting a number from a user via a form you can use javascript to verify that the user inputed a number... search google -> validating forms that should give you some info. You could also verify that the data is a number by is_numeric or is_int... I think that when the data is POSTed

Tom: [PHP] magic quotes

2002-12-04 Thread John Taylor-Johnston
Tom, Sorry for the delay. I have tried your code. SELECT id,AU,ST,BT,AT FROM ccl_main WHERE MATCH (TNum,YR,AU,ST,SD,BT,BC,AT,PL,PR,PG,LG,AUS,KW,GEO,AN,RB,CO) AGAINST ('"ready maria" ' IN BOOLEAN MODE) ORDER BY id asc Without the space, as with addslashes, MySQL won't compute the sql. This is th

[PHP] Re: [PEAR-DEV] German [PEAR]-mailinglist arranged | webmaster@php.net out of order

2002-12-04 Thread Tobias Schlitt
Markus Wolff <[EMAIL PROTECTED]> artikulierte: > Yay! Together with the new PEAR column in PHP magazine Germany will > now be PEARized in no time :-) That's it! PEARize!!! > BUT... I think Ralf should really turn off the admin approval for new > members, or he´ll be flooded :-) I just told him!

[PHP] Detecing a Number

2002-12-04 Thread Stephen
I have a repeating function to add. The user enters the number of how many numbers they want to add, then it repeats a form field. What I want to do is detect to make sure that the value they enter is a number. If not, don't do the do while loop and if it is, then go ahead and do it. How can I do t

Re: [PHP] Re: Ping on Win32

2002-12-04 Thread Jason Wong
On Thursday 05 December 2002 04:08, Christopher J. Crane wrote: > This is the output I get and you can see that on the lines where the loss > is 0% it still says 100% > > if($Results2 = "100% loss") { print " Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * W

[PHP] Re: [PEAR-DEV] German [PEAR]-mailinglist arranged | webmaster@php.net out of order

2002-12-04 Thread Markus Wolff
On Wed, 4 Dec 2002 20:08:54 +0100 "Tobias Schlitt" <[EMAIL PROTECTED]> wrote: > Ralf Geschke has set up a german-language mailinglist about > PEAR. I would like it very much, if you add a link to this > mailingslist on the PEAR-website. Yay! Together with the new PEAR column in PHP magazine Ger

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread Dev
Well after reading John'ss and DL Neil's replys i came up with 2 functions. The first is to check to see if the entry is a valid IP address and the Next is to determine if it is a Private Network IP or not!. You can see this in action at: http://www.my-tangled-web.net/codebank/code/ip_check.php a

[PHP] Re: Ping on Win32

2002-12-04 Thread Christopher J. Crane
This is the output I get and you can see that on the lines where the loss is 0% it still says 100% 1 - Pinging 10.200.26.1 with 32 bytes of data: 2 - Request timed out. 3 - Ping statistics for 10.200.26.1: 4 - Packets: Sent = 1, Received = 0, Lost = 1 (100% loss), 100% loss 5 - Approximate round tr

[PHP] need help on Installation over Linux/apache/mysql

2002-12-04 Thread ppf
Hi : I tried to Install Apache1.3x/PHP4.0x/Mysql on Linux 6.1 I followed exact steps described in http://www.e-gineer.com/instructions/install-php4x-for-apache1xx-on-linux.phtml Apache/mysql installed and tested successfully, but when I tried to install php with mysql option it shows that instal

Re: [PHP] Changeing user

2002-12-04 Thread Adam Williams
change the directory ownership to the user apache runs as, or make the dir 777. Adam On Wed, 4 Dec 2002, [iso-8859-1] Davíð Örn Jóhannsson wrote: > I need to be able to create dirs, chmod and other stuff on the server, > but I get : Warning: MkDir failed (Permission denie

[PHP] PHP-MySQL-HPUX 11

2002-12-04 Thread Rick King
OS: HPUX 11 PHP: 4.2.3 GCC: gcc3.2 MySQL: 3.23.53 Apache: 1.3.27 PHP Compile Options: CC=gcc ./configure --with-mysql=/usr/local/mysql --with-apxs=/opt/apache-1.3.27/bin /apxs \ --enable-discard-path Hello PHP Guru's! I'm trying to install PHP w/ MySQL support and w/ Apache-DSO support. During t

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread DL Neil
John, > I think it'd be hard to verify the range with a regex. ip2long and long2ip > do not validate. So, an option would be to write your own little function > that splits the $ip on the period, verifies there are 4 parts, then checks > that each part is between 1 and 255 inclusive. My other po

[PHP] Changeing user

2002-12-04 Thread Davíð Örn Jóhannsson
I need to be able to create dirs, chmod and other stuff on the server, but I get : Warning: MkDir failed (Permission denied), so Is there any way for me to do something so I can change the user I attept to execute those functions. Something like exec(change user, pass). Thanks David

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread DL Neil
Hello Dev, > Now I am continuing on with the same script and I need to check for valid > IP address form. > Currently I have: > > $ip="255.255.255.0"; > if (preg_match ("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $ip)) { > print "Good Ip"; > } else { > print "Bad Ip"; > } > > Thi

Re: [PHP] MySQL Server

2002-12-04 Thread Gui Guy
> Thanks for the info... As it turns out, I am just a blithering idiot... I > didn't know that I had to create a separate user... As I said, that shows > my newbieness... Hey we don't always castrate blithering idiots here. Only those who pretend not to be one. > However, this has lead me to

Re: [PHP] Regular Expresion Work on IP address

2002-12-04 Thread 1LT John W. Holmes
> Now I am continuing on with the same script and I need to check for valid > IP address form. > Currently I have: > > $ip="255.255.255.0"; > > if (preg_match ("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $ip)) { > print "Good Ip"; > } else { > print "Bad Ip"; > } > > This does wor

[PHP] Ping on Win32

2002-12-04 Thread Christopher J. Crane
I am trying to get a script to work. The basic idea is to go into a database and grab some IP addresses for my LAN. Then for each one ping it using the exec command 1 time. If it is successful print output in green and if it is not, print output in red. This is being done on a Win32 system. The pin

Re: [PHP] fopen over a network

2002-12-04 Thread Philip Olson
Please reread the documentation found here: http://www.php.net/header It has a pdf file as an example, modify according to your needs. Regards, Philip On Wed, 4 Dec 2002, Elkan wrote: > Couldn't you set the Mime-Type on the server for the correct extenstion? > > Leif K-Brooks wrote: > >

[PHP] German [PEAR]-mailinglist arranged | webmaster@php.net out of order

2002-12-04 Thread Tobias Schlitt
Hi y'all! Ralf Geschke has set up a german-language mailinglist about PEAR. I would like it very much, if you add a link to this mailingslist on the PEAR-website. The official administration-link for subscribing/unsubscribing is: http://lists.phpcenter.de/mailman/listinfo/pear You can find a

Re: [PHP] fopen over a network

2002-12-04 Thread Elkan
Couldn't you set the Mime-Type on the server for the correct extenstion? Leif K-Brooks wrote: > Link them to a page like this to download the file: > > header("Content-type: application/octet-stream"); > //Code to display file > ?> > > Dara Dowd wrote: > > >Hello, > >I'd like a user to be able d

[PHP] Regular Expresion Work on IP address

2002-12-04 Thread Dev
Hello all, Let me first say thank you to Jason Wong and Adam Voigt for their help on my problem with Multidimensional Arrays!!! Now I am continuing on with the same script and I need to check for valid IP address form. Currently I have: $ip="255.255.255.0"; if (preg_match ("/[0-9]{1,3}\.[0-9

Re: [PHP] trouble with update from php 3 to php 4.2.3

2002-12-04 Thread Philip Olson
If you want to do relative includes, you must have a . in your include_path. Maybe this is what you are meaning to do. Please reread this: http://www.php.net/configuration.directives.php#ini.include-path And if you still have problems after adjusting it and restarting the web server, tell us

Re: [PHP] PHP 2.4.3 and Apache 2.0.x

2002-12-04 Thread Philip Olson
Read the docs: http://www.php.net/install.apache2.php Apache 2 is EXPERIMENTAL in PHP right now, it may or may not work. But, the following combination is known to work: PHP 4.2.3 along with Apache 2.0.39 But Apache 1.3.x is recommended and considered stable and will work with any PHP ver

Re: [PHP] ini function like ini_set and ini_alter

2002-12-04 Thread Philip Olson
Reread the docs here (the table): http://www.php.net/ini_set You cannot set this directive at runtime. Using .htaccess is as close as you'll get to that. I see no reason why using auto_prepend_file here would be better than include() as this is exactly what include() is for. Regards, Philip

Re: [PHP] magic quotes

2002-12-04 Thread Philip Olson
magic_quotes_gpc is simple, it essentially runs addslashes on all GET, POST and COOKIE data. That's it. http://www.php.net/ref.info#ini.magic-quotes-gpc http://www.php.net/addslashes http://www.php.net/variables.external Not sure about your problem, maybe someone else can help. Regards,

Re: [PHP] Creating dynamic names for images

2002-12-04 Thread Joakim Andersson
Davíð Örn Jóhannsson wrote: I have a situation where I allow users to upload images, and I store the names of the images in a database and the images I store in a some folder on the server, but what I would like to do is to dynamically create names for the images and dont ever have to worry about

Re: [PHP] Sigh :)

2002-12-04 Thread John Taylor-Johnston
Ray, I admit, it is a newer function in MySQL: http://www.mysql.com/doc/en/Fulltext_Search.html Since MySQL 3.23.23. All you need is a fulltext index. I am using, however, MySQL 4.0.5-beta-max-debug, but had the same problem in previous verisons. I have just never gottent his double quotes thi

Re: [PHP] Sigh :)

2002-12-04 Thread John Taylor-Johnston
Hi, I'm searching for an exact match of "ready maria". So I'm using the double quotes to demarcate the exact search, as per MySQL rules. I'm not searching for the double quotes. John Van Andel wrote: > One question that comes up is why are you putting the double quotes around the >search stri

  1   2   >