Re: [PHP] Form Processing - Multiple inputs of the same name

2003-01-31 Thread Tracy Finifter Rotton
Change the name of your checkboxes in your HTML to something like:

name=DeleteIDs[]

This will make it an array, and you can access all the elements like

$_POST['DeleteIDs'][0]

etc.



(This should really be in a FAQ somewhere...)

-- tracy

On 1/31/03 11:17 AM, Mike Potter [EMAIL PROTECTED] wrote:

 Is it possible to pass an group of input boxes of the same name, then get
 the values of all the checked boxes or filled out textboxes?
 How do I get ALL the IDs passed.  Right now it only passes the last ID.  Do
 I really have to give them all unique names?
 
 For example...
 
 html
 head
 /head
 body
 form action=testform.php method=post
 input type=checkbox value=0 name=DeleteIDs/input Jon Smithbr
 input type=checkbox value=1 name=DeleteIDs/input David Callowbr
 input type=checkbox value=2 name=DeleteIDs/input Peter Parkerbr
 .
 .
 .
 input type=submit value=Delete Users
 /form
 /body
 /html
 
 This list of DeleteIDs will be build dynamically.  I want the user to be
 able to check the boxes they want to delete and pull the IDs on the posted
 page.
 
 How do I get ALL the IDs passed.  Right now it only passes the last ID.
 
 Thanks,
 
 Mike
 
 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

  ... I like the 49ers because they're pure of heart,
  Seattle because they've got something to prove,
  and the Raiders because they always cheat.
 -- Lisa Simpson, Lisa the Greek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] mysql_connect problem..update

2003-01-21 Thread Tracy Finifter Rotton
Talk to the other admin.  If you're using RPMs, you just need to install the
php_mysql RPM, restart apache, and you should be up and running again.

If you're compiling PHP from scratch, you'll have to do so again with
--with-mysql in the configure command.  But, as this is the default when
compiling PHP from scratch, my hunch is the first option is what you really
need.

-- t

On 1/21/03 10:01 AM, Tom Ray [EMAIL PROTECTED] wrote:

 It turns out after some checking, the other admin on the machine ran a
 kernel update last week. I hadn't been testing any scripts over the last
 week myself so I didn't notice the issue until the other day.
 
 When I run a function_exists() for mysql_connect it comes back false. When
 I run phpinfo() there is no reference to mysql at all.
 
 I'm still kind of new to all this, and I'm just wondering what I need to
 do to get php and mysql talking again. Is there a service or command I can
 run to get things going again?
 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

  ... I like the 49ers because they're pure of heart,
  Seattle because they've got something to prove,
  and the Raiders because they always cheat.
 -- Lisa Simpson, Lisa the Greek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] ayuda...solo se ve el código cuandoejecuto los script

2003-01-20 Thread Tracy Finifter Rotton
También, se tiene que tener esta línea en su fichero httpd.conf:

AddType application/x-httpd-php .php

(donde .php es la extensión que se usa en sus ficheros de PHP)

Si no se tiene acceso al fichero httpd.conf, se necesita pedir a su
webmaster para hacer este cambio.

On 1/20/03 4:39 PM, R B [EMAIL PROTECTED] wrote:

 Tenes el codigo PHP entre ? y ? ... ?
 
 Ej.:
 ?
 echo Hello World;
 ?
 
 
 
 From: Rot Alvarez [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] ayuda...solo se ve el código cuando ejecuto losscript
 Date: Mon, 20 Jan 2003 09:20:51 -0800 (PST)
 
 
 Subo los script y solo veo código...q puedo hacer ayuda
 
 _
 Registra gratis tu cuenta email en http://www.exploraiquique.cl
 
 _
 Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No
 Ads, 6MB, POP  more! http://www.everyone.net/selectmail?campaign=tag
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 _
 MSN Fotos: la forma más fácil de compartir e imprimir fotos.
 http://photos.msn.es/support/worldwide.aspx
 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

  ... I like the 49ers because they're pure of heart,
  Seattle because they've got something to prove,
  and the Raiders because they always cheat.
 -- Lisa Simpson, Lisa the Greek


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Get your *own* IP...?!

2003-01-06 Thread Tracy Finifter Rotton
Use the super-global variable $_SERVER['SERVER_ADDR']

(or another solution might be to generate relative, rather than absolute,
URLs:  /somedir/somepage.php instead of
http://192.168.1.1/somedir/somepage.php)

On 1/6/03 12:45 PM, Charles likes PHP [EMAIL PROTECTED] wrote:

 Does anyone know a way to fetch your own IP-adress? I need it because I run
 a web server on my computer with a dynamic-IP so I need it to change all the
 URLs it creates dynamically...
 
 Thanks!
 
 -Charles
 
 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

  ... I like the 49ers because they're pure of heart,
  Seattle because they've got something to prove,
  and the Raiders because they always cheat.
 -- Lisa Simpson, Lisa the Greek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] help with preg_match

2003-01-04 Thread Tracy Finifter Rotton
You need to tell preg_match that there will be multiple characters.  Right
now, you're searching for one, and only one.

if (! preg_match ('/^[a-z0-9]+$/', $unchecked_text)) {


The + means one or more matches to the range in brackets.

-- tracy

On 1/4/03 9:03 AM, Anders Thoresson [EMAIL PROTECTED] wrote:

 Hi,
 
 I'm trying to write a function that validates the input in a textarea. I
 just want to allow alphanumrical characters, and if the user enters
 anything else, I display an error message by calling error().
 
 But the following doesn't work. Even if I enter hello in the textarea,
 I get the error message. What am I missing?
 
 
 // validate entered text in textarea
 
 function validate_textarea($unchecked_text) {
 
 if (!preg_match (/^[a-zåäö0-9]$/is, $unchecked_text)) {
 error(You have used unlegal characters, just alphanumeric is ok.);
 }
 }
 
 Best regards,
 
  Anders
 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

  ... I like the 49ers because they're pure of heart,
  Seattle because they've got something to prove,
  and the Raiders because they always cheat.
 -- Lisa Simpson, Lisa the Greek


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Help with functions()

2002-11-20 Thread Tracy Finifter Rotton
Try:

$meat = testfunction ($var1, $var2, $var3, $var4);
echo $meat;


Or, alternatively,

print (testfunction ($var1, $var2, $var3, $var4));


hope this helps.

--t

On 11/20/02 8:40 PM, Beauford 2002 [EMAIL PROTECTED] wrote:

 Hi,
 
 I have form that a user would input information and that info is sent to
 a function, but I need to be able to return a result of this function
 and is where I am having a problem.
 
 For example:
 
 testfunction($var1, $var2, $var3, $var4);  //the form fills these
 values.
 
 echo $meat;
 
 function testfunction($a, $b, $c, $d) {
 
 The $meat of the function goes here;
 
 Now I need to return the result of $meat;
 
 return $meat;
 }
 
 This does not work. I'm new to funtions and obviously missing something,
 but I haven't been able to find a good tutorial on this. The PHP manual
 isn't much help.
 
 Any help is appreciated.
 
 

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/

  ... I like the 49ers because they're pure of heart,
  Seattle because they've got something to prove,
  and the Raiders because they always cheat.
 -- Lisa Simpson, Lisa the Greek


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP, Apache, and MySQL on MacOS X (Jaguar)

2002-11-11 Thread Tracy Finifter Rotton
Check out Marc Liyange's site at
http://www.entropy.ch/software/macosx/welcome.html  He has a lot of Mac
software pre-compiled and ready for installation, including PHP installs for
Jaguar.

-- tracy

On 11/11/02 2:06 PM, Gregory Hernandez [EMAIL PROTECTED] wrote:

 hello everyone.
 
 would anyone point me to a site or online article with details
 regarding the installation of PHP, Apache, and MySQL on MacOS X
 (Jaguar).
 
 any assistance would be greatly appreciated.
 
 gregory hernandez
 [EMAIL PROTECTED]

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] User Contributed Notes at php.net?

2002-11-11 Thread Tracy Finifter Rotton
Hello All,

Does anyone know what happened to the User Contributed Notes on the PHP
Manual?  I went to go find one today, and they all appear to be gone!

-- tracy

-- 
Tracy F. Rotton
[EMAIL PROTECTED]
http://www.taupecat.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php