[PHP] Need email solution

2002-11-26 Thread Manuel Ochoa

I'm setting up a Windows 2000 server with Apache, PHP and MySQL. I also need to setup 
email service for 1 domain name.

I'm looking for any suggestions on SMTP software.



[PHP] Help with session variables

2002-12-03 Thread Manuel Ochoa

I'm running PHP 4.3 on a Windows .net server with Apache 2. Please look at the 
following code as I cannot figure out what I'm doing wrong.

Page1.
session_start();
session_register("step");
$step=1;
header("location: page_A.php");

Page_A.
session_start();
extract($_SESSION);
$step=2;
header("location: page_B.php");

Page_B.
session_start();
extract($_SESSION);
print("$step");

Output is always "1". I thought that session variables were global? What am I doing 
wrong?



[PHP] Mail Error

2002-12-13 Thread Manuel Ochoa

I have a Windows server running Apache 2 and PHP 4.3

I got the following error while using the mail() function:
Warning: mail() [function.mail]: SMTP server response: 550 User not local. We don't 
relay in C:\Apache2\htdocs\mymail.php on line 22 
Any ideas?



[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] 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]="";
 $aux[2]="";
 $z=0;
 for($i=0; $i wrote: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


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





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



Re: [PHP] accelerator and Apache 2

2003-01-02 Thread Manuel Ochoa

I recently installed the Zend Optimizer and noticed an improvement in preformance.
I'm running Windows .NET Enterprise Server 2003
PHP 4.3.0 as a module
Apache 2.0.43

Go to www.Zend.com


 Jochen Kaechelin <[EMAIL PROTECTED]> wrote:Is there a free php accelerator out there 
which runs under Apache 2?

-- 
Jochen Kaechelin 
[EMAIL PROTECTED]


[PHP] PHP complied code

2003-01-02 Thread Manuel Ochoa

I recently read a book on PHP and the author breifly said that if you compile the PHP 
code it would improve the performance.

Is there a way to compile the code? 



[PHP] Advice on uploaded files

2003-01-28 Thread Manuel Ochoa

I writting a php program for a small insurance company and they want to receive 
uploaded digital photos.

Should I store the photos in a mysql database or in a directory on the hard drive?

If you have experience with this any advice would be appreciated.



Re: [PHP] File upload problem

2003-02-18 Thread Manuel Ochoa

There may be several reasons why it doesn't work but the first thing I noticed is that 
"action" is blank. You need to have this defined.
 John M <[EMAIL PROTECTED]> wrote:Hello,

I have the code below. It's a simple file upload. But it doesn't work.
Before the line if(isset( $Submit )) is an echo which can I read. But after
choosing a file and press a submit nothing happens. Why is if(isset(
$Submit )) always false? Maybe my apache or php config is wrong?

I use WinXp Prof, Apache 2.0.43, PHP 4.2.3, safe_mode is on , upload_tmp_dir
is "c:\tmp\" and upload_max_filesize is 2M in PHP config file.

Thanks!










 [input] 
 [input] 

echo "Before submit 
\n";
if(isset( $Submit ))
{
echo "After submit 
\n";

if ($_FILES['imagefile']['type'] == "image/gif"){
copy ($_FILES['imagefile']['tmp_name'],
"files/".$_FILES['imagefile']['name'])
or die ("Could not copy");
echo "Name: ".$_FILES['imagefile']['name']."";
}
else {
echo "";
echo "Could Not Copy, Wrong Filetype
(".$_FILES['imagefile']['name'].")";
}
}
?>







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





~ Manuel Ochoa ~
Seven days is too long to wait for a gun!



[PHP] Internet Explorer toolbar

2003-03-27 Thread Manuel Ochoa
Is there any way of using php to launch a new browser without the IE toolbars?

[PHP] phpMyadmin with global variables off

2002-08-15 Thread Manuel Ochoa


I just installed phpMyadmin and I'm getting a message that I have an undefined 
variable. Is this because I have global variables off?

Or in other words, should this program work the same regardless of whether global 
variables are on or off? 



[PHP] Undefined variable: PHP_SELF

2002-08-15 Thread Manuel Ochoa


I keep getting "Undefined variable: PHP_SELF" when using the following:



Global variables are off... What am I doing wrong?



[PHP] Bad characters in a text field

2003-12-12 Thread Manuel Ochoa
I have a form with a "text area" that when submited, get stored in a "text" type field 
of a MySQL database. Occasionaly some of our users copy data from a DOS program and 
paste it in the text area which results in unwanted characters getting stored in the 
text field. What function can I use to strip out all but valid characters?
 
For example: I want to allow a-z ,A-Z, 0-9 and some others and strip out everything 
else.
 
 


[PHP] ereg is failing on this simple test

2003-12-12 Thread Manuel Ochoa
Why is this test failing?
 
$data = "A Simple test.";
If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) {
  echo "Valid text";
}
else {
  echo "Not valid text";
}
 
I'm running PHP 4.34 on a windows pc. This function is new to me, any help would be 
appreciated.


[PHP] PHP and DDE

2004-02-12 Thread Manuel Ochoa
Can PHP interface with other programs through DDE?