[PHP] ereg-digits only...

2002-02-12 Thread B. Verbeek


How do I check a string for it to only contain numbers?

 

  if(!ereg(([0-9]+),$string)){

print It contains characters other than numbers;

  }else{

print Only numbers;

  }



Can anyone give some feedback...

regards,
Bart



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




[PHP] difference !!??

2002-02-07 Thread B. Verbeek

Hello,

What's the difference between:

1.- $row[column_name];
2.- $row['column_name'];
3.- $row[column_name];

?

ragards Bart


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




[PHP] Images

2002-02-07 Thread B. Verbeek

Seem to have a problem...

I'm creating a form to upload a image to a dir on the webserver.

When I fill out the form and submit it (method=post) the variable in the
input type=file name=image-field doesn't get sent.
I also use enctype multipart/form-data.


Does anyone have any suggestions?
regards

Bart



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




RE: [PHP] Images

2002-02-07 Thread B. Verbeek

What Mod does it need?


-Oorspronkelijk bericht-
Van: Anna Gintere [mailto:[EMAIL PROTECTED]]
Verzonden: vrijdag 8 februari 2002 2:08
Aan: [EMAIL PROTECTED]
Onderwerp: RE: [PHP] Images


Does dir have aprpriate mod (permisions)?

-Original Message-
From: B. Verbeek [mailto:[EMAIL PROTECTED]]
Sent: ceturtdiena, 2002. gada 7. februârî 7:01
To: Php-General (E-mail)
Subject: [PHP] Images


Seem to have a problem...

I'm creating a form to upload a image to a dir on the webserver.

When I fill out the form and submit it (method=post) the variable in the
input type=file name=image-field doesn't get sent.
I also use enctype multipart/form-data.


Does anyone have any suggestions?
regards

Bart



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






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




[PHP] socket - e-mailaddress validation

2002-02-06 Thread B. Verbeek

Question:

Is it possible to validate an e-mailaddress by opening a socket-connection
to the specified domein (@domain.com) and then search for username
([EMAIL PROTECTED]) to validate an e-mailaddress?

I know how to set up a socket-connection, but how do I search for the user
in the given domain?

Regards,
bart





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




[PHP] question reg trim-strlen

2002-01-31 Thread B. Verbeek

 Does this work?
 
 if(strlen($cust_adres = trim($cust_adres))  50){ /*code here*/ }
 
 I mean that the new $cust_adres is trimmed when nessecary?
 
 regards
 Bart
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] question reg trim-strlen

2002-01-31 Thread B. Verbeek

Doing it...

Thanks

-Oorspronkelijk bericht-
Van: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Verzonden: donderdag 31 januari 2002 13:53
Aan: [EMAIL PROTECTED]; Php-General
Onderwerp: RE: [PHP] question reg trim-strlen


Then why don't you just trim() it before comparing?
$var = trim($var);


Niklas


-Original Message-
From: B. Verbeek [mailto:[EMAIL PROTECTED]]
Sent: 31. tammikuuta 2002 13:33
To: [EMAIL PROTECTED]
Subject: RE: [PHP] question reg trim-strlen


I want to trim it then check and the new var must stay trimmed!

-Oorspronkelijk bericht-
Van: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Verzonden: donderdag 31 januari 2002 11:55
Aan: Php-General
Onderwerp: RE: [PHP] question reg trim-strlen


I think it won't work.

If you don't want to trim the actual variable, but check if the trimmed
variable is longer than 50 chars, here you go:

if (strlen(trim($cust_adres))  50)
{

}


Niklas

-Original Message-
From: B. Verbeek [mailto:[EMAIL PROTECTED]]
Sent: 31. tammikuuta 2002 12:48
To: Php-General (E-mail)
Subject: [PHP] question reg trim-strlen


 Does this work?

 if(strlen($cust_adres = trim($cust_adres))  50){ /*code here*/ }

 I mean that the new $cust_adres is trimmed when nessecary?

 regards
 Bart




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Ereg/replace/i/ or something ??

2002-01-30 Thread B. Verbeek

Hello,

I want to check the data from a form-field if it excists only of digits
(0-9) and nothing else.

How do I use the ereg()-function for this?

ereg([0-9],$cust_tel, $cust_tel);  

It is also to turn it around but then the pattern will get larger because it
has to contain:
 / '.,-)(*^%# a-z A-Z and so on...

The field has to be 10 digits long and has to contain only digits!!!


Can anyone help me?

Regards,

Bart



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]